esphome should not anyhow reboot #3825
Describe the enhancementNo, I will describe the problem first:
Use casesIt is already quite stressful when the router (wifi) or servers (mqtt, api) are down, and the default behavior of ESPHome when any of the 3 are down is to reboot every 15 minutes. Please, there is no need to further contribute to the chaos. The better behavior is to actually do nothing. Visual examplesNo response Anything else?
|
Replies: 2 comments 2 replies
|
You can disable the reboot? |
|
The reboot timeout is a safety net for problems we can't predict, and that's why it's on by default. All of the proposed checks assume the firmware can correctly figure out what's wrong with itself. The failures that actually strand devices are the ones where it can't. Wifi drivers sometimes wedge while still reporting connected. The TCP stack can get into a state where pings work but connections don't. An esp-idf upgrade can introduce a regression nobody saw coming, or a board can have flaky hardware. In those states a gateway ping check is just more code running on the same broken device, and it will tell you everything is fine while the device sits unreachable. Rebooting is the one recovery path that doesn't need to understand what went wrong first. The cost of getting it wrong is also very lopsided. If the reboot fires when it didn't need to, you lose a few seconds on a device that was already unreachable for 15 minutes. If the device wedges and never reboots, someone has to physically power cycle hardware that might be in a ceiling, at a remote site, or in a relative's house. I'd much rather the default favor the failure that fixes itself. Your scenario 3 is actually where the safety net matters most. An SSID that's visible but never finishes associating is a classic sign of wedged radio state on the client side. A reconnect loop will spin on that forever. A reboot clears it in seconds. That said, the timeout isn't right for every setup, and that's fine. If you know your broker goes down for long stretches or you just don't want the behavior, set |
The reboot timeout is a safety net for problems we can't predict, and that's why it's on by default.
All of the proposed checks assume the firmware can correctly figure out what's wrong with itself. The failures that actually strand devices are the ones where it can't. Wifi drivers sometimes wedge while still reporting connected. The TCP stack can get into a state where pings work but connections don't. An esp-idf upgrade can introduce a regression nobody saw coming, or a board can have flaky hardware. In those states a gateway ping check is just more code running on the same broken device, and it will tell you everything is fine while the device sits unreachable. Rebooting is the one rec…