JSR223: does it still make sense to use the helper libraries?


I am experimenting a bit with Jython and wonder if it still makes sense to use the helper libraries ? The last change is already 2 years old. :thinking:

regards, DJ

It’s still a ton better than not using the Helper Libraries. But Jython is a bit of a zombie. The upstream is stuck on the two years past end of life Python 2.7 with no support for Python 3 in sight. And support for the 2.7 is pretty anemic. At some point something’s going to break and upstream won’t fix it.

If you want to protect yourself long term, consider slowly migrating your rules to some other language. If you like Python, give HABApp a try. That would be just as much work as trying to strip the Helper Library out of your rules.

Ok, thanks for the tips. I’ll have a look at HABApp.
I picked Jython because most of the examples seem to exist and all the other JSR223 languages also have limitations. Or is there a text-based language that can be recommended above all others in the meantime.

HABApp is great for Python support. If you are open to other languages, JS Scripting and jRuby are improvements even over Jython in capability and usability. As you say, there’s been two years worth of development on their helper libraries and improvements in the OH platform itself they take advantage of.

But note, unlike the old Jython and JavaScript support and Helper Libraries, these go to great lengths to provide a more pure environment. You usually will not be messing with Java Objects (and you don’t have to pay as close attention to type as a result).

JS Scripting comes with the helper library out of the box and jRuby’s helper libraries can be installed through MainUI, or you can install them using gems.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.