mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
148 stars 89 forks source link

hybrid sleep #502

Closed aneantisor closed 5 years ago

aneantisor commented 5 years ago

on a solar/batterie powered node, i execute kind of hybrid sleep. Arduino actually control the charge, so it check the voltage every 4 second and sleep beetween this. Every 2 minutes, the node send the sensors value and then i execute a smartsleep. I use smartsleep to send firmware update, and i can change the charging voltage to. MYSController actually wait for the pre sleep message and it work every time. MyController.org appear to forget to send the message and so it work about 5% of the time (just a guess).

jkandasa commented 5 years ago

@aneantisor can you increase MY_SMART_SLEEP_WAIT_DURATION_MS? may be 1000?

aneantisor commented 5 years ago

It was that. I updated the node and set MY_SMART_SLEEP_WAIT_DURATION_MS 2000. And now it's perfectly working. Thank you

jkandasa commented 5 years ago

@aneantisor please note. now your node consumes more power. As it awakes 2000ms instead of 500ms