I have migrated to OH3 from 2.x and loaded all my DSL rules as script actions within the UI. It seems to become unresponsive after some time to the point that OH crashes. Looking around it appears others have has similar experiences with high CPU ect.
In the short term I have disabled all my rules with DSL scripts in the THEN area of the UI. This seems to have stabilised my OH instance successfully.
I don’t have very complex needs. Just some if X & Y items are ON then do A and log it Else do B and log it. I would like to learn how to implement timers as well.
Does anyone have any script examples I could change to suit? Either languages is fine.
To help me learn a little could anyone point me in the right direction for starters in the languages.
I am not a programmer I just really wish to write some rules in the format that can drop into the script part of OH. I got my DSL rules from just modifying others work here in the community.
I’m not sure how you mean “in the THEN area of the UI”. Did you remove the Script Actions? Do you really mean that you added a but only if… condition to block the rule? Or did you click the || pause icon at the top of the Rule?
There are tons of Python examples on the forum including in all of the Design Pattern posts. However, those are all written from the perspective of writing rules in .py files and not through the UI and using the Helper Libraries. But they still work as piece part examples for how to do things like creating Timers and such. At some point soon hopefully the helper libraries will be available as an add-on so those examples will become more relevant.
When moving from 2.x to 3.0 I decided to try to use the UI as much as possible, the main UI is great and will really boost OH as a platform.
To recreate my rules I added the triggers to the ‘When’ area and thought it was ok to add the part of my existing rules as a DSL script to the ‘Then’ area. From my experience this has caused my instance to work initially however over several hours become unresponsive and eventually crash.
I have around 6 or so rules triggering when various people enter/leave locations, turning on/off stuff and sending notifications.
To get my instance stable I disabled the rules, by pressing pause. For nearly two days now my instance has been running smoothly, no errors ect.