Page 1 of 1

Timer switchOn/Off with after/forXXX in dzvents 2.4.3

Posted: Wednesday 04 April 2018 20:03
by MiWa4711
Hi,

got Pi3 with
Version: 3.9177
Build Hash: 8833e747
Compile Date: 2018-04-03 22:05:17
dzVents Version: 2.4.3

in //www.domoticz.com/wiki/DzVents:_next_gen ... _scripting there is a description how to ..... but it does not really work. Please advice....

Thanks.
Michael

That's just how it works and you will have to deal with it in your script. So, instead of simply re-issuing switchOn().forMin(5) you have to check the switch's state first:

if (light.active) then
light.switchOff().afterMin(5)
else
light.switchOn().forMin(5)
end
or issue these two commands both as they are mutually exclusive:

light.switchOff().checkFirst().afterMin(5)
light.switchOn().checkFirst().forMin(5)

Re: Timer switchOn/Off with after/forXXX in dzvents 2.4.3

Posted: Wednesday 04 April 2018 20:15
by dannybloe
So what is your setup? What switches do you have, how are they called and what is the exact script that you created?