%sunrise% and %sunset% question

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
trendkill
Normal user
Posts: 31
Joined: 22 Feb 2022, 09:04

%sunrise% and %sunset% question

#1 Post by trendkill » 02 Apr 2024, 20:08

Hello guys,

I'm using the %sunrise% and %sunset% variables with the latest firmware on an esp8266. ESP_Easy_mega_20240229_normal_ESP8266_4M1M Feb 29 2024.
I noticed, that these variables are only set when the device boots, then never change. So if I want to have correct values, I have to reboot the device time to time, which I'm trying to avoid. How can I force it to recalculate %sunrise% and %sunset% without reboot?

Thank you!

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: %sunrise% and %sunset% question

#2 Post by TD-er » 02 Apr 2024, 21:34

Does the device have its system time set via either NTP, or via other ESPEasy p2p nodes or some other time source (GPS, battery powered RTC module) ?

If you have the GPS coordinates set on the tools->Advanced page, and the system time is set, then the sunset and sunrise times should be recalculated every day.

However I wouldn't blame the device if it doesn't want to update the sunrise/sunset times as this year has been really lacking sunshine ;)

trendkill
Normal user
Posts: 31
Joined: 22 Feb 2022, 09:04

Re: %sunrise% and %sunset% question

#3 Post by trendkill » 02 Apr 2024, 21:51

Sorry, I forgot to mention those. It has an battery powered external RTC, DS1307 which works well. And yes I set the coordinates. So it works well, new sunset/sunrise value sets after boot. But that's it, it doesn't recalculate it daily.

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: %sunrise% and %sunset% question

#4 Post by TD-er » 02 Apr 2024, 21:53

Is the RTC the only one to supply the system time?
If so, then this might be a bug which has been unnoticed for years...

trendkill
Normal user
Posts: 31
Joined: 22 Feb 2022, 09:04

Re: %sunrise% and %sunset% question

#5 Post by trendkill » 02 Apr 2024, 22:04

Yes, it's at a remote site with no internet.

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: %sunrise% and %sunset% question

#6 Post by TD-er » 03 Apr 2024, 10:33

Fix will be implemented in the next release (probably today)
Test build is still running here: https://github.com/letscontrolit/ESPEas ... 8535646040

Reason for a new build so soon after the last one is that there is some issue with LittleFS builds on ESP32-C3/C6/S2/S3

trendkill
Normal user
Posts: 31
Joined: 22 Feb 2022, 09:04

Re: %sunrise% and %sunset% question

#7 Post by trendkill » 03 Apr 2024, 19:07

okay, I'll test it once it's released. i'll post here my experience with it. Thanks!!

trendkill
Normal user
Posts: 31
Joined: 22 Feb 2022, 09:04

Re: %sunrise% and %sunset% question

#8 Post by trendkill » 15 Apr 2024, 07:29

Works perfectly! Me and our chickens thanks you very much!

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: %sunrise% and %sunset% question

#9 Post by TD-er » 15 Apr 2024, 08:44

Great!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest