All,
Sometime ago my script(s) stopped working at 23:00 at nighttime. The entire script seems to work but the 23:00 at night time is not switching off. And there is no logentry anymore.
It started in 4.9700 and I upgrade to 4.10199 but it is still not working.
The state of "$Hulp-Laat-Thuis" is off.
I am familar with some programming but I can not explain this.
Is there anyone who could explain this?
Thanks in advance for your support,
BR,
Marc
return {
on = { timer = { 'at nighttime at 07:00 on mon, tue, wed, thu, fri',
'at nighttime at 08:20 on sat, sun',
'at sunrise',
'at sunset',
'at 17:26',
'at 15 minutes before sunset',
'at 22:00 at nighttime on mon, tue, wed, thu, fri, sat, sun',
'at 23:00 at nighttime on mon, tue, wed, thu, fri, sat, sun' }
},
execute = function(domoticz, timer)
if (domoticz.time.matchesRule('at 07:00')) then
domoticz.log('Dit werkt om 7:00 uur')
domoticz.groups('Binnen-Lampen').switchOn().repeatAfterSec(1,3)
elseif (domoticz.time.matchesRule('at 08:20')) then
domoticz.log('Dit werkt om 8:20 uur op Zaterdag en Zondag')
domoticz.groups('Binnen-Lampen').switchOn().repeatAfterSec(1,3)
elseif (domoticz.time.matchesRule('at sunrise')) then
domoticz.log('Zonsopkomst')
domoticz.groups('Binnen-Lampen').switchOff().repeatAfterSec(1,3)
elseif (domoticz.time.matchesRule('at 15 minutes before sunset') and domoticz.time.matchesRule('at 00:00-23:00')) then
domoticz.log('15 minuten voor Zonsondergang')
domoticz.groups('Binnen-Lampen').switchOn().repeatAfterSec(1,3)
elseif (domoticz.time.matchesRule('at 23:00') and domoticz.devices('$Hulp-Laat-Thuis').state == 'Off') then
domoticz.log('Slaaplekker')
domoticz.groups('Binnen-Lampen').switchOff().repeatAfterSec(1,3)
else
domoticz.log('Slaaplekkerrrrrr binnen')
end
end
}
Problems at specific time
Moderator: leecollings
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Problems at specific time
try switching domoticz.time.matchesRule to
timer.trigger = 'at 07:00'
timer.trigger = 'at 07:00'
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Problems at specific time
Please correct me if I am wrong but would
Code: Select all
on = { timer = { 'at nighttime at 07:00 on mon, tue, wed, thu, fri',
'at nighttime at 08:20 on sat, sun',
'at sunrise',
'at sunset',
'at 17:26',
'at 15 minutes before sunset',
'at 22:00 at nighttime',
'at 23:00 at nighttime' }
},
To investigate further I suggest to add some domoticz.log statements and maybe start with a domoticz.log(timer.trigger) .
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
Who is online
Users browsing this forum: No registered users and 1 guest