Rapsberry pi V3
Domoticz version 3.8153
Dzvents version 2.20
I need a timer that:
- starts 60 minutes after sunrise
- is activted inly during daytime
- every 5 minutes
I tried : timer = {' 60 minutes after sunrise at daytime every 5 minutes'}, but that doesn't work
I tried to solve the problem by retrieving the minutes after sunrise with: MinAfterSunrise = timeofday['SunriseInMinutes'] and put the output in an if/then statement, but "MinAfterSunrise " always returns with the same number.
Can anyone help me with this one?
thanks a lot
regards
Paul
dzvents timer problem [Solved]
Moderator: leecollings
-
landaisbenj
- Posts: 147
- Joined: Wednesday 02 August 2017 18:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: stable
- Location: France
- Contact:
Re: dzvents timer problem
If you do this 60 after sunrise it's not daytim...
Try to create a planified dummy.
And do a script who start like this:
If otherdevice['ThisDummy']=='On' and (os.date('%M') % 5)==0 then
Try to create a planified dummy.
And do a script who start like this:
If otherdevice['ThisDummy']=='On' and (os.date('%M') % 5)==0 then
Platforme: Rpbi3b
Domoticz: Last stable
Bridge: RFLINK last stable
Domoticz: Last stable
Bridge: RFLINK last stable
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzvents timer problem
This code will not work in dzVents 2.4 (not sure it will in 2.2)landaisbenj wrote: Monday 19 March 2018 12:28 If you do this 60 after sunrise it's not daytim...
Try to create a planified dummy.
And do a script who start like this:
If otherdevice['ThisDummy']=='On' and (os.date('%M') % 5)==0 then
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
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzvents timer problem
Trypgas37 wrote: Monday 19 March 2018 11:56 I need a timer that:
- starts 60 minutes after sunrise
- is activted inly during daytime
- every 5 minutes
Code: Select all
return {
on = { timer = { 'every 5 minutes at daytime' } },
execute = function(domoticz, _)
if (domoticz.time.secondsSinceMidnight/60) > (domoticz.time.sunriseInMinutes + 60) then
print ("I should do something now")
else
print ("I should wait a little longer")
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
Re: dzvents timer problem
both thanks for your answer.
I tested the solution of Waaren (no extra dummySwitch), which can be followed with some simple print commands, and it worked well.
Thanks a lot!
regards
Paul
I tested the solution of Waaren (no extra dummySwitch), which can be followed with some simple print commands, and it worked well.
Thanks a lot!
regards
Paul
- McMelloW
- Posts: 434
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: dzvents timer problem [Solved]
dzVents is far more easier then that.
I use this for a dzVents script and it works perfect
So you try this for a change
The syntax is about this
Look here for the Timer trigger rules
Thanks to dannybloe
I use this for a dzVents script and it works perfect
Code: Select all
on = {
timer = { 'every minute between 15 minutes before sunrise and 15 minutes after sunset' }
},
Code: Select all
on = {
timer = { 'every 5 minutes between 60 minutes after sunrise and sunset' }
},
Code: Select all
on = {
timer = { 'interval between first time and second time' }
},
Thanks to dannybloe
Greetings McMelloW
Who is online
Users browsing this forum: No registered users and 1 guest