I am very new to openHab (running version 2 on a synology) and I am trying to get the following working.
I already searched a bunch of topics related to timers incl. how to cancel, reschedule or set them to null, but I just don’t get it working.
What I want:
I want to switch a 2-channel virtual trigger (using ittt) on and off with specified delays inbetween.
I have created 4 ifttt webhook events (upoff, upon, downoff, downon) which are working and used to control a awning (power to move up/downwards and stopping)
The rule consists of the following entries:
(how the rule is triggered, is working fine!)
executeCommandLine(“curl -X POST httxx://maker.ifttt.com/trigger/downoff/with/key/xxxxxxxxxx”)
// this stops any potential downon event (here I’d like to wait 3 seconds)
executeCommandLine(“curl -X POST httxx://maker.ifttt.com/trigger/upon/with/key/xxxxxxxxxx”)
// this moves the awning upwards (here I’d like to wait 30 seconds)
executeCommandLine(“curl -X POST httxx://maker.ifttt.com/trigger/upoff/with/key/xxxxxxxxxx”)
// this stops moving the awning upwards (here I’d like to wait 3 seconds)
executeCommandLine(“curl -X POST https://maker.ifttt.com/trigger/downon/with/key/xxxxxxxxxx”)
// this moves the awning downwards (here I’d like to wait 20 seconds)
executeCommandLine(“curl -X POST https://maker.ifttt.com/trigger/downoff/with/key/xxxxxxxxxx”)
// this stops moving the awning downwards (here I’d like to wait 3 seconds)
Now what I you like to achieve is the following:
1 seconds after “downoff” event, start the “upon” event and let it go for 30 seconds.
This will assure, that a potentially opened awning gets closed completely.
Then, after the 30 seconds, the “upon” event will be followed by “upoff” to stop that movement.
Then I’d like to run the “downon” event for 20 seconds.
Within the 20 seconds, the awning opens as much as I’d like to.
Then, after 20 seconds, I use “downoff” the stop that movement.
Now, could anyone help me with getting the 5 executeCommandlLine into a working syntax with those timers/delays each inbetween?
I was able to get a timer working once, but in no was I was able to reset the timer or reschedule it to use it with the next executeCommandLine Option.
Any help is much appreciated!