This is my first OpenHAB project and I am using Paper UI.
Have installed Debian 9 on an old IBM X41 labtop.
Have installed OpenHAB 2 and it works fine.
I have access to Z-wave via a Z-stick from AEOTEC.
I have included a Four-key Scene Controller (from HANK) and a Smart Plug (HKSW-SO05 from HANK).
The Scene Controller has 2 channels (Scenes and Battery) and I have connected the Thing to a scene Item.
The Scene item seems to work as I under “Control” can see the scene numbers (1-4) when I press the buttons.
I have also created an item on the “Switch” channel. That also works as I can switch it on and off from the “Control” menu.
I have then made a rule to connect the two items as follows:
When: “an item state is updated” with item “Scene Number” equals 3
Then: " send a command" to item Hank Switch
But only if: empty
The “Then part” seems to work as expected as I can activate it via the “play” button in the Rule menu.
But pressing the button (or any button) dont work.
I have tried different other options in the “When” part without luck.
What am I doing wrong? or cant I use Paper UI at all?
First of all, the Experimental Rules Engine is still experimental. There isn’t a lot of documentation nor a lot of people using it just yet.
Try getting rid of the equals 3 part and let the Rule run every time the Item is updated. If that works we know the problem is the equals 3. If it still doesn’t work the problem is with the item. Did you just type the name of the Item in or did you select it from the list?
Thanks for the answer.
But it actually works!!!
The problem was that after a rule is saved there is a delay of maybe 1 minute before it works. Then I have sometime seen that the rule works wrong(switch on at OFF button press) and thereafter works as expected.
Before that time I had long judget it to fail.
But as you pinpoint the experimental nature of the rules in Paper UI how should I continue with a larger house automation?
A mixture of scripts and Paper UI?
Or take the full step to “text only” scripts?
One last question on Paper UI rules. I have tried to use “an item state is updated” instead of “an item state changed” (so I could alternate ON/OFF with one button) but that seems not to work. Should it?
Whatever you are most comfortable with. I’d probably recommend sticking with Rules DSL Rules until the Experimental Rules Engine matures a bit, in particular when it supports timers, actions, logging, and gets some documentation.
Should it? Yes. Does it? Can’t say. It’s a work in progress. Maybe that trigger hasn’t been implemented yet.