Reopen the setup portal when NTP never answers #1
Loading…
Reference in a new issue
No description provided.
Delete branch "rob/ntp-portal-fallback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A wrong or unreachable NTP server left the clock on the searching animation for good, with Home Assistant the only way to fix it. Now, if no time arrives within NtpPortalAfterMs (2 minutes) of joining WiFi, the setup AP opens so the NTP fields can be changed there. WiFi stays joined behind the AP, so NTP keeps retrying and the portal closes itself once the time arrives. Saving the form with the SSID blank changes the NTP fields without touching WiFi. If this portal times out the clock returns to Syncing instead of rebooting; the no-WiFi portal still reboots. Only a clock with no time since boot is affected. Note that an internet outage at power-up now brings up the open AP, whose form carries the MQTT password in its page source. Also points the ota env's upload_port at analogue-led-clock.iot. Testing: builds for both envs; not flashed or run on the clock.