Wled forgetting current time in deep sleep

In order to make a solar powered project work, I need to put my ESP32-S3 into deep sleep when the LEDs are off. As I would not know how to code, I was happy to find this usermod in the latest release.

Switching the LEDs off using the API command {“on”:false} puts the ESP now into deep sleep. However, it also seems to make wled forget the current time, making it impossible for me to switch the LEDs on again with a time-controlled preset. On reboot, wled says “Current local time is 1970-1-1, 1:0#:##”. Switching to another preset makes wled to retrieve the correct local time again. I am not sure why …

I would appreciate any ideas how this could be fixed.

there is an updated that will be merged in a bit that allows for scheduled wake-up. If you want to test it, its here: https://github.com/wled/WLED/pull/4456

the ESP32 family does not have an internal RTC so it cannot remember the time. It could be derived from internal clock but that is not very accurate and it would drift a lot over time, like a minute a day or more. Any command you send to the ESP will contain a timestamp and it will set its internal calendar to that. The other option is to use NTP time sync.

1 Like

Thank you! I will give it a try.