using Openhab since years but still a newbie when using rules
I’ve a openhabian 2.4.0 installation and I need to do one thing. I’ve some ‘dumb’ rollershutter where I cannot open or close with a percentage. Only full up or full down. I’d like to setup a rules so that I can close a rollershutter at 50%. Basically going full up (to ‘reset’ the status) then going down for x number of seconds, then stop.
Now simple rule with thread::sleep like this:
Item Tapparella_Cameretta_Balcone_50 changed
// Goes up for 24 seconds (maximum time to reach full openness)
// Goes down for 12 seconds (time to reach desired openness)
would work, but I understand by reading the forums that it’s not safe. But I can’t for the life of me understand how I would do the same using timers. Since timers really fork another thread that goes in parallel, how can I actually ‘wait’ those seconds?
It does everything that the Expire binding does plus a couple of new features around being able to set a String Item to NULL as well as “NULL”.
I don’t know that I would recommend it’s use from the start as I intended it mainly as a way for people who are already using Expire to move to OH 3 (where Expire 1.x won’t exist) without major changes to their config. But I did not really intend it to be something people would use forever.
But it works and it works well so there is no real harm in using it.