It works really well, and with the helper libraries it’s easier than Rules DSL for anyone with a degree of programming knowledge. I’d also say easier for someone learning to program - start with one of the millions of python tutorials out there, and then progress onto openhab/NGRE.
I should have moved over sooner - and anyone else prevaricating should take the leap (given present circumstances mean many of us have more time than we did before…).
Couldn’t agree more, converting my rules from DSL to Jython was actually not at all as much work as I feared. I did have some experience with python so I had an advantage but I also agree that you will probably get more out of learning basic python than spending time on learning the DSL syntax.
Indeed many thanks to all those contributing to OpenHAB!
Which guides are you referring to? If there is something missing from the helper library docs, please let me know in the forum or preferably as an issue or PR. The official docs are due for an update, but automation will be going through some changes in OH 3.0 that will also need documenting.
That’s the message I’ve been trying to get out for a couple years now!
I like the idea of a sticky. We’d need a moderator to buy into it and a good post. When/if the Jython addon and now a separate helper library addon are merged, I’ll definitely be putting out a post, so that one would be a good candidate.
Another quick thought: the new rule engine is much faster.
I’m surprised at this - I have openHAB running on a ridiculously overpowered media PC (i5) and I’m not sure why simple rules should have held up Rules DSL - but they did.
Example: I have a hard button attached to a sonoff device. That triggers a rule which makes a sound and does a thing. Under Rules DSL, there was a noticeable lag between the button pressing and the sound playing - perhaps half a second. Now there is no gap at all.
There are many benefits to using the new rule engine and scripted automation with Jython vs the old rule engine and the rules DSL. Performance is definitely one of them!
Here’s another benefit. Under Rules DSL I’d often have stalled threads sucking up CPU time. The problem seemed to be bugs in executeCommand but I was never able to identify them or fix them.
Under Jython all that goes away.
Really, anyone with even basic python skills should move all their rules to Jython yesterday.
Haha. Nothing wrong with making a point so positively, Dan.
I have no experience with Python, so I’ve bookmarked a bunch of resources for the eventual move to NGR. Posts like this one reinforce the benefits of doing so.
From a change-management perspective, I think the tricky part will be assisting new users who will be told they should use NGR going forward, but find old posts in the community with examples that are coded in DSL. So the more people who move early, the better we’ll be able to assist newcomers starting from scratch!