Hello,
i have one Question to all, maybe possible in dzVents?
I want to run a water pump for my pool just 1min every 15min, also just 4 minutes in a hour.
Also, if my Dummy switch x is on, then the switch y should be go on every 15min for 1min.
If the dummy switch x is off then no action.
Can anyone help me here? i`m a beginner, domoticz is the best soft.
Greetings,
Jubbes
Switch on every 15min for 1min
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Switch on every 15min for 1min
If you are not yet familiar with dzvents then please look at the 10 lines using dzVents with Domoticz for an intro to dzVents and howto get this script active in domoticz.Jubbes wrote: Friday 29 March 2019 5:02 I want to run a water pump for my pool just 1min every 15min, also just 4 minutes in a hour.
Also, if my Dummy switch x is on, then the switch y should be go on every 15min for 1min.
If the dummy switch x is off then no action.
script could look like
Code: Select all
return { on = {
timer = { 'every 15 minutes' },
},
logging = {
level = domoticz.LOG_DEBUG, -- switch to LOG_ERROR when OK
marker = 'Pool pump'
},
execute = function(dz)
pump = dz.devices('Pool pump') -- change to real name
controlSwitch = dz.devices('x') -- change to real name
realSwitch = dz.devices('y') -- change to real name
pump.switchOn()
pump.switchOff().afterSec(60)
if controlSwitch.state == 'On' then
realSwitch.switchOn()
realSwitch.switchOff().afterSec(60)
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Jubbes
- Posts: 33
- Joined: Wednesday 24 October 2018 14:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Switch on every 15min for 1min
Hello, thanks. that does not look so hard. i think i would step by step change from blockly to dzVents
Viele Grüße,
Jubbes
Viele Grüße,
Jubbes
Who is online
Users browsing this forum: No registered users and 1 guest