Conversation
…tter boot stability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There have been reports of Pow-U not being able to boot successfully which have become more problematic after enabling the new 15min price interval. In combination with Home-Assistant MQTT payload, this triggers a lot of sensor configurations being sent on MQTT not long after boot. A normal boot without a lot of MQTT communication is already consuming a lot of power, so this extra time spent with WiFi modem awake causes the onboard capacitor to run out of power and brown out.
To remedy this situation, code have been added that causes the firmware to wait for the capacitor to charge, by entering a deep sleep mode for a few seconds and then check again. To prevent the device from staying in this deep sleep state, a maximum of 5 tries have been enforced, thus it will not sleep for more than 15 seconds in total.
On top of this, the code will also wait a period for the capacitor to charge before collecting prices from the server, but no longer than 30 seconds.