Closed kickbutts closed 4 years ago
The value that is limited to 255 is the "awake" time between sleeps. The other timer ("Sleep Delay") is the sleeptime, which is maxed to 4294 seconds (limited by hardware) to ~1.2h
Still waiting for support for an external RTC such as the DS3231. This particular module would be great. Seems to me it would solve a lot of deep sleep time issues. Programmable timers for milliseconds to days and all in between.
Oh i see. My fault. Did not look close enough. The versions before were different. Maybe you should think of renaming the fields to prevent errors like mine.
Yep naming is one thing we should definitely look into. But it's also the hardest part of programming, finding proper names.
Maybe: Sleep duration & Sleep delay !?
Sleep duration and Awake time? I guess "Sleep delay" is too confusing given the current naming.
Sleep duration sounds fine to me. I am not sure what the other value is doing. Is it keeping the ESP awake for the entered time? Then i would suggest: Awake time between sleeps ( a bit long but self explaining).
It has changed very recently. First it was just a checkbox enable/disable sleep. (stored as a 0 or not 0 in a byte) I changed it into "0 = disabled" and otherwise "awake time in seconds" Actually it is more like "maximum time awake before going to sleep again", since you can put it to sleep earlier using rules. Good luck finding a description of max. 20'ish characters ;)
The wiki doesn't mention this "sleep awake time" and I too am confused by what the purpose of this is. https://www.letscontrolit.com/wiki/index.php/SleepMode
We must add better documentation on this.
I am coming from R120 build and Sleep awake time is confusing. What value should I choose? I want to go to sleep mode immediately after read values are sent to the controllers.
@adrianmihalko You can set the "awake" time to match some time in which all sensors can collect their data and send it. You can also call the sleep from the rules, which I think is more reliable, since that can be done event based.
It looks like starting Core 2.4.1 there is support for more than 2^32 usec (71 minutes)
The deep sleep now supports 64-bit ints, but the max you can use is determined by deepSleepMax()
and should not set any longer or else it will not wake up any more.
The max is now somewhere between 3:25h and 3:50h.
I will have a look at how this can be implemented.
Any progress on increasing the max sleep time?
Maybe the possibility to configure the 108th byte of init parameter and use of deep_sleep_set_option(0) stated in the documentation of espressif for low power solutions may increase the running time on battery?
This has been implemented. The max. sleep time will be computed and can be set.
NOTE: This is not a support forum! For questions and support go here: https://www.letscontrolit.com/forum/viewforum.php?f=1
Steps to reproduce
How can we trigger this problem? Set the sleep time. In the config menu.
Does the problem persists after powering off and on? (just resetting isn't enough sometimes) yes
Expected behavior
Tell us what should happen? It should be possible to set a sleep time longer than 255 seconds.
Actual behavior
Tell us what happens instead? The input field (page config, filed name: Sleep awake time) does not allow a value greater 255. Maybe its just an html form problem or a wrong setting.
System configuration
Hardware: D1 mini
Software or git version: git version v2.0-20180311