hi I am trying to sequence several switches in a sequence with different time delays between each switch but can't realy seem to get started.
example switch 1 on for 5 mins then off
switch 2 on for 15 mins then off
switch 3 on for 7 mins then off
repeat above
this sequence I need to turn on with one switch using a timer
I have tried various ideas and looking for some fresh ideas or even better an example script
Thanks in advance
dzvents sequence switches after different time delays
Moderator: leecollings
-
parrotface
- Posts: 36
- Joined: Monday 02 February 2015 15:50
- Target OS: Linux
- Domoticz version:
- Location: Cheshire England
- Contact:
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: dzvents sequence switches after different time delays
Code: Select all
return {
on = {
devices = { 'triggerSwitch' }
},
execute = function(domoticz, device)
if (device.active) then
-- asuming that these switches are currently Off:
domoticz.devices('switch1').switchOn().forMin(5)
domoticz.devices('switch2').switchOn().forMin(15)
domoticz.devices('switch3').switchOn().forMin(7)
end
end
}
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
parrotface
- Posts: 36
- Joined: Monday 02 February 2015 15:50
- Target OS: Linux
- Domoticz version:
- Location: Cheshire England
- Contact:
Re: dzvents sequence switches after different time delays
thanks for reply
I now have some ideas to work on
thanks
I now have some ideas to work on
thanks
-
parrotface
- Posts: 36
- Joined: Monday 02 February 2015 15:50
- Target OS: Linux
- Domoticz version:
- Location: Cheshire England
- Contact:
Re: dzvents sequence switches after different time delays
Hi tried your script and it works
What I am trying to do is turn on switch2 on after switch1 times out
then turn on switch3 when switch2 times out
Then keep repeating the process until the trigger switch is turned Off
The trigger switch can then be turned on/off manually or use the timer function in domoticz
Many Thanks for your help
What I am trying to do is turn on switch2 on after switch1 times out
then turn on switch3 when switch2 times out
Then keep repeating the process until the trigger switch is turned Off
The trigger switch can then be turned on/off manually or use the timer function in domoticz
Many Thanks for your help
Who is online
Users browsing this forum: No registered users and 1 guest