Good evening everyone, I’m trying to set up an automatic irrigation system but I can’t get the right watering time to go for each zone.
You know how it is possible to create a delay between one operation and another and especially if this is the shortest way to accomplish what I am trying to do.
It’s all but impossible to read the screenshot on my phone but that looks like you are sending a command to an Item then executing a script to insert a delay. If you have to use a Script Action anyway, just put it all into a single Script Action?
But even if you do that this is probably not the best way to implement something like this because there is no way to stop it. Every time it runs it will run from start to end and there is nothing you can do about ti beyond stopping openHAB and manually closing the last valve. So please look at some of these other approaches above for approaches that use Timers and are cancelable.
The part of the code is very simple, (also because I was not able to implement it) it would be enough for me to wait two minutes and then move on to the next command
This is not a useful javascript action. Well, I suppose it is valid, but all it does is set a variable named “expire” to some string. Then the script exits and the variable is discarded.