Sorry for posting but I’ve been the whole day looking for a solution and I’m not able to find it.
I have been using openhab since 1.x versions and yesterday I migrated my openhab 2.5 to openhab 3.0.
My surprise is that, despite jsr233 seems to be integrated in OH3, I’m not able to move my rules from my old OH2.5 to the new one for many reasons:
1- There is no misc add-on for rule engine (so seems it is already installed, nothing wrong there)
2- I added a jythonscripting add-on that seems to support jsr233 (seems rational)
3- There is no /etc/openhab/automation forlder. I created the folders (still noting strange)
4- Placed my rules there (automation/jsr233…) nothing happens…
There’s a slight difference between the support of the various languages and the “scripted automation” setup. JS and Rules DSL are supported out of the box if you choose to create your rules through the MainUI and use script actions as one of the rule actions or if you use .rules files in the ./conf/rules folder. Jython scripting can be added as a supported language via the binding you found (also Groovy via a another binding).
Scripted automation is separate. It’s installed using instructions found above and allows you to create rules in various languages in the ./conf/automation/ series of folders and comes with the extensive helper libraries so that you can streamline your code.
The helper libraries that come with the scripted automation are so useful, that many people, myself included, install them and still reference those library files even when using the more standard rule setups.
If you like to write your rules and python and are willing to try something new you can always use HABApp.
It’s a python 3 rule engine that’ll allow you to write concise and elegant rules.