It’s been a couple years, but it’s still called Experimental Rule Engine. Just need more volunteers to use/test it so that it bcomes mainstream.
Hmm that is exactly what has been holding me off. In OH1 I never got around to using it, in OH2 I never bothered as its well “hidden” an marked as experimental
Glad to here otherwise !
My rules are all migrated to Jython and they’ve been running great. The ESH guys are pretty quick to resolve any issues too. I also have a nice update for the rule decorators that really simplifies rule creation. Just want to get one more thing fixed up before posting in the forum.
Cool! Looking forward to that then!
If that is an existing thread here, could you please share the link?
It sounds like everything your doing could be done in the rule engine.
I quickly browsed your repo on github. Not clear on the point if I can implement items/bindings in python as well?
That would definitely solve a lot…
No need to stop OH to make changes to a script, and there are a lot of scheduling options. With your Python experience, I would think you’d love to get away from the Rules DSL and into Jython.
omg I’ve been dying to get away from it for a long time… so much head banging and horrible debugging (and that often on a super fast rpi2 …though I must admit that with vcode etc it has become easier/better)… so yes definitely.
I will give this a try then thanks for the info!
It will probably not solve all my use-cases as I use it for forwarding states from custom IoT devices, small scheduled jobs which are only used sporadically etc…
I guess if I would be moving to jython though I would have to move away from my rpi2 sooner than anticipated; we’ll see.
Not yet! I am wrapping some things up in the PR before I put it into the forum for feedback. Definitely by the end of the weekend.
JSR223 can be used for much more than rules/automation. You can create/remove/modify items, monitor folders, there’s even the potential to write an entire binding. BTW, the repo is not mine… it’s shared and open to anyone wanting to move JSR223-Jython further in OH. All credit goes to our benevolent benefactor @steve1, who put together pretty much everything you see in that repo, which lucid is based on.
You can run both at the same time too. Helps with transitioning.
I bet you will find that it does!
Why? There shouldn’t be any need to upgrade hardware. If anything, I see better performance and less load than with the Rules DSL.
Ok sry, did only a quick browsing.
Hmm is there any code already for creating bindings or is this just a theoretical thing for now ?
If I was to create a binding, sure. Otherwise I don’t see how?
In one case I need to open a serial device and keep polling it.
Not sure how that would be doable?
Really? I would not have expected that quite frankly. I have a bunch of extensions running and quite some rules. So the system is nicely responsive but I see nearly 100% CPU all the time… RAM is also used a lot.
But OK that motivates me even more now
Unfortunately, there is still a lot that needs to be be tested and updated with the API changes. This is definitely on my to-do list… I’d love to see a full blown Jython binding. I haven’t tried to use it, but here’s something…
Whatever you are doing now in Python, you could do in Jython. Possibly with the same code, and the OH integration is already taken care of for you.
I need to qualify this… a migration from DSL Rules to Jython should be at least the same performance. I don’t have any stats, but my perception is that my system is performing better with less load. If you’re adding in a bunch of load from some other Python scripts on top of OH, you very well may need a hardware upgrade!
@sim0nx
I have quesion about script, becuase I receive an error. Previsuly I used your lib on OH1 without any problem. After migration I can not make it work. I based on python 2.7, so this my script:
Your code looks find, but I no longer support Python2. I started using some features which are no available in older version of Python, especially Python2.
Hence your script should run fine if you just run it with python3 (apt-get install python3).
Is there a last version of the library that do support python 2.7 available somehow?
Python3 works great with it but I’m limited by the E-ink display driver and have to use python2.