Finished my porting of JSR223 to HABApp

At the start a big thanks to @Spaceman_Spiff for his great work.
HABApp is excellent I would encourage everybody to try it out.

I have managed to port my 3000+ lines of code written in Jython to HABApp.

I took the lift-and-shift approach by wrapping the Rule class on my own in order to have the event and triggers handled the way I did in JSR223. I also ported my timer libraries and some other stuff.

Here are some of the highlights:

HABApp is running separately from openhab, in my case as a docker container.
This makes a restarting of the rules engine a piece of cake (timewise). Making it possible to switch between production and test. Even running multiple instances of HABApp at once

Using of libraries without any limit
I at the start was missing actions. Then I realized that all the stuff actors implement in OH can be easily found as libraries or example code. I then implemented the persistence for influxdb, pushover client, mail, tts, etc.

Debugging possibilities are excellent.
Just stop the container running production and start the project in VSC. Or disable the rule in production and enable it in the development environment.

Connection to openhab is fast.
I do not see any difference in performance between JSR before and HABApp now.

In next future I will post updates in the tutorial section for my lights and blinds controlling rules:

Blinds
Lights

2 Likes