Sunset time is "hanging"
Moderator: leecollings
-
- Posts: 19
- Joined: Monday 15 January 2018 10:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Sunset time is "hanging"
All,
I have a dzvent script that is trigged at sunset and 15 minutes before sunset.
But is seems that after the daylight saving suddenly the sunset is "fixed" it is always 20:11 even the sunset is already later but the time does not change.
If I restart the Domoticz proces it will take that day the correct sunset time but after that it is again "hanging" and takes every day after the same time again.
I am running domoticz on a win10 machine and I downloaded already the latest beta release but nothing solved the problem, any one any idea what this could be.
My location is correct and the sunset is also correct displayed on the dashboard.
Thanks for any reaction
I have a dzvent script that is trigged at sunset and 15 minutes before sunset.
But is seems that after the daylight saving suddenly the sunset is "fixed" it is always 20:11 even the sunset is already later but the time does not change.
If I restart the Domoticz proces it will take that day the correct sunset time but after that it is again "hanging" and takes every day after the same time again.
I am running domoticz on a win10 machine and I downloaded already the latest beta release but nothing solved the problem, any one any idea what this could be.
My location is correct and the sunset is also correct displayed on the dashboard.
Thanks for any reaction
Re: Sunset time is "hanging"
If you share the script maybe somebody can help you. It's a wild guess now
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Sunset time is "hanging"
Or perhaps restart your domoticz?
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 19
- Joined: Monday 15 January 2018 10:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Sunset time is "hanging"
Thanks for the reply here is the script
Code: Select all
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 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' }
-- LET OP maak van daytime op zat en zon nighttime daytime was alleen om te testen
-- timer = { 'at sunrise' },
-- timer = { '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
}
Last edited by dannybloe on Tuesday 24 April 2018 8:01, edited 1 time in total.
Reason: Please use code blocks when posting code
Reason: Please use code blocks when posting code
-
- Posts: 19
- Joined: Monday 15 January 2018 10:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Sunset time is "hanging"
Here is also some logging, I will add the logging of tonight also that will be definitely also at 20:10, but according to my dashboard sunset is at 20:44 tonight.
2018-04-21 20:10:00.392 dzVents: Info: ------ Start internal script: DZ_SfeerVerlichtingBinnen:, trigger: at 15 minutes before sunset
2018-04-21 20:10:00.392 dzVents: Info: 15 minuten voor Zonsondergang
2018-04-21 20:10:00.392 dzVents: Info: ------ Finished DZ_SfeerVerlichtingBinnen
2018-04-21 20:10:00.642 EventSystem: Script event triggered: C:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
2018-04-22 20:10:00.187 dzVents: Info: ------ Start internal script: DZ_SfeerVerlichtingBinnen:, trigger: at 15 minutes before sunset
2018-04-22 20:10:00.187 dzVents: Info: 15 minuten voor Zonsondergang
2018-04-22 20:10:00.187 dzVents: Info: ------ Finished DZ_SfeerVerlichtingBinnen
2018-04-22 20:10:00.797 EventSystem: Script event triggered: C:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
2018-04-21 20:10:00.392 dzVents: Info: ------ Start internal script: DZ_SfeerVerlichtingBinnen:, trigger: at 15 minutes before sunset
2018-04-21 20:10:00.392 dzVents: Info: 15 minuten voor Zonsondergang
2018-04-21 20:10:00.392 dzVents: Info: ------ Finished DZ_SfeerVerlichtingBinnen
2018-04-21 20:10:00.642 EventSystem: Script event triggered: C:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
2018-04-22 20:10:00.187 dzVents: Info: ------ Start internal script: DZ_SfeerVerlichtingBinnen:, trigger: at 15 minutes before sunset
2018-04-22 20:10:00.187 dzVents: Info: 15 minuten voor Zonsondergang
2018-04-22 20:10:00.187 dzVents: Info: ------ Finished DZ_SfeerVerlichtingBinnen
2018-04-22 20:10:00.797 EventSystem: Script event triggered: C:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Sunset time is "hanging"
Interesting... looks like a bug in Domoticz. dzVents just gets the sunset and sunrise time from Domoticz. Does it show this time in the GUI as well?
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 19
- Joined: Monday 15 January 2018 10:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Sunset time is "hanging"
In the GUI the sunset time is correct.
- Attachments
-
- GUI Domoticz.jpg (142.99 KiB) Viewed 1393 times
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Sunset time is "hanging"
Can you print _G.timeofday['SunsetInMinutes'] and _G.timeofday['SunriseInMinutes'] from your script? And compare that with what you see in the GUI?
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 142
- Joined: Friday 21 October 2016 9:25
- Target OS: NAS (Synology & others)
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Sunset time is "hanging"
Running v3.9300 and using the Sunset/Sunrise in my scripts on RasPi without issue. Has been moving on daily as the sunset time gets later
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Sunset time is "hanging"
Yes. Just use print() in lua
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Re: Sunset time is "hanging"
Did some testing with parts of your script with latest Beta on Linux and do not see your problem. Could be something with the windows version.
Date Sunrise Sunset
2018-04-23 06:31 20:54
2018-04-23 20:39:00.426 dzVents: Info: dz_TimerTest: ------ Start internal script: dz_TimerTest:, trigger: at 15 minutes before sunset
2018-04-23 20:39:00.426 dzVents: Info: dz_TimerTest: 15 minuten voor Zonsondergang
2018-04-23 20:39:00.426 dzVents: Info: dz_TimerTest: ------ Finished dz_TimerTest
2018-04-23 20:54:00.217 dzVents: Info: dz_TimerTest: ------ Start internal script: dz_TimerTest:, trigger: at sunset
2018-04-23 20:54:00.217 dzVents: Info: dz_TimerTest: Slaaplekkerrrrrr binnen
2018-04-23 20:54:00.217 dzVents: Info: dz_TimerTest: ------ Finished dz_TimerTest
Date Sunrise Sunset
2018-04-24 08:29 20:56
2018-04-24 20:41:00.245 dzVents: Info: dz_TimerTest: ------ Start internal script: dz_TimerTest:, trigger: at 15 minutes before sunset
2018-04-24 20:41:00.246 dzVents: Info: dz_TimerTest: 15 minuten voor Zonsondergang
2018-04-24 20:41:00.246 dzVents: Info: dz_TimerTest: ------ Finished dz_TimerTest
2018-04-24 20:56:00.533 dzVents: Info: dz_TimerTest: ------ Start internal script: dz_TimerTest:, trigger: at sunset
2018-04-24 20:56:00.533 dzVents: Info: dz_TimerTest: Slaaplekkerrrrrr binnen
2018-04-24 20:56:00.533 dzVents: Info: dz_TimerTest: ------ Finished dz_TimerTest
Date Sunrise Sunset
2018-04-23 06:31 20:54
2018-04-23 20:39:00.426 dzVents: Info: dz_TimerTest: ------ Start internal script: dz_TimerTest:, trigger: at 15 minutes before sunset
2018-04-23 20:39:00.426 dzVents: Info: dz_TimerTest: 15 minuten voor Zonsondergang
2018-04-23 20:39:00.426 dzVents: Info: dz_TimerTest: ------ Finished dz_TimerTest
2018-04-23 20:54:00.217 dzVents: Info: dz_TimerTest: ------ Start internal script: dz_TimerTest:, trigger: at sunset
2018-04-23 20:54:00.217 dzVents: Info: dz_TimerTest: Slaaplekkerrrrrr binnen
2018-04-23 20:54:00.217 dzVents: Info: dz_TimerTest: ------ Finished dz_TimerTest
Date Sunrise Sunset
2018-04-24 08:29 20:56
2018-04-24 20:41:00.245 dzVents: Info: dz_TimerTest: ------ Start internal script: dz_TimerTest:, trigger: at 15 minutes before sunset
2018-04-24 20:41:00.246 dzVents: Info: dz_TimerTest: 15 minuten voor Zonsondergang
2018-04-24 20:41:00.246 dzVents: Info: dz_TimerTest: ------ Finished dz_TimerTest
2018-04-24 20:56:00.533 dzVents: Info: dz_TimerTest: ------ Start internal script: dz_TimerTest:, trigger: at sunset
2018-04-24 20:56:00.533 dzVents: Info: dz_TimerTest: Slaaplekkerrrrrr binnen
2018-04-24 20:56:00.533 dzVents: Info: dz_TimerTest: ------ Finished dz_TimerTest
Who is online
Users browsing this forum: No registered users and 1 guest