I have been wondering whether there is a preferred rules engine for OH3? To my understanding upcoming milestones will be providing more migrated stuff i.e. jython and more. What about Node-RED and how current it is as a rule engine even for OH3? I am aware of @Dome post on this topic from OCT '20 and his statement on node-red-contrib-openhab-v2 as OH3 fit.
I haven’t had time to follow the advice of others on the nodeRED OH3 thread, but it sounds like it’s been stable, as long as you:
Use the plugin with green nodes
Set up the access token
Don’t use both openHAB plugins simultaneously
As far as stability prior to 3 - I’ve run about 80% of my rules in nodeRED for several years. It’s just as stable as openHAB in my opinion. I’m going to try to teach myself some of the new programming options once they’re out, but my next task is moving my old nodeRED flows over to use my 3.0 install.
There is only one rule engine that comes with openHAB. This one engine supports Rules DSL, Blockly and ECMAScript 5.1 (i.e. JavaScript) out of the box and can support Python and Groovy with add-ons.
Anything else like Node Red, HABApp, etc. is external to openHAB so how current it is or is not is going to depend on which specific one you are talking about.
I know there is someone working on a jRuby add-on. There is a Helper Library that already exists for Python, has a little bit of JavaScript and Groovy too but it’s not yet updated to work with OH 3. But it will be at some point and will be installable as an add-on.
Anything outside of openHAB has it’s own roadmap and plans independent of openHAB.
The only reason I replied is because a lot of users have difficulty in understanding where the boundaries of openHAB are.
Thanks for your reply.
Also still struggling a bit with all the languages.
I know how to program e.g. PLC’s but not in code language like python or java script. My idea with OH3 was to move away from Node Red and learn to code this time, but with all the options in languages I decided to let things for the moment and wait a bit which language will be most common and learn that one.
Based on all the information JavaScript seems most logic (direct supported,universal and blocky is javascript). But this one has a smaller Helper Libary then e.g. Python. Also, some of your examples are Javascript, some python.
Support for different languages has existed since OH 1. Over time, most of the users who used a different language from the default have use JavaScript, so there are more examples and more work done on the helper libraries. Because the Helper Libraries are not ready for use in OH 3, I’m forced to do what work I’m doing without them. And if I’m going to do that, I’m going to further limit myself to what OH comes with out of the box so it is the most widely sharable with the most users. Since Rules DSL doesn’t support libraries that leaves JavaScript.
If popularity is going to be your measure, Rules DSL is by far the most popular and will likely continue to be so for a long time.