Skip to content

Add WiFi reconnect watchdog to self-heal from wedged WiFi stack#2319

Merged
1technophile merged 1 commit into
developmentfrom
claude/github-issue-2276-oRlhu
Jun 1, 2026
Merged

Add WiFi reconnect watchdog to self-heal from wedged WiFi stack#2319
1technophile merged 1 commit into
developmentfrom
claude/github-issue-2276-oRlhu

Conversation

@1technophile
Copy link
Copy Markdown
Owner

Description:

When the network drops at runtime and the WiFi stack is wedged (e.g. the ESP32 driver getting stuck after a long uptime, see #2276), the main loop kept calling wifi_reconnect_bypass() forever with no recovery: the device stayed stale until a manual reboot. The reboot watchdog only existed in the ESPWifiManualSetup path, which the default WiFiManager build doesn't compile.

Count consecutive reconnection failures in the runtime loop and ESPRestart(2) once they exceed maxRetryWatchDog, mirroring the existing manual-setup watchdog. Gated behind the new WifiReconnectWatchDog flag (default on) so environments where an unexpected reboot is undesirable can opt out; disabled for theengs-plug to avoid interrupting the relay state.

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

When the network drops at runtime and the WiFi stack is wedged (e.g. the
ESP32 driver getting stuck after a long uptime, see #2276), the main loop
kept calling wifi_reconnect_bypass() forever with no recovery: the device
stayed stale until a manual reboot. The reboot watchdog only existed in the
ESPWifiManualSetup path, which the default WiFiManager build doesn't compile.

Count consecutive reconnection failures in the runtime loop and ESPRestart(2)
once they exceed maxRetryWatchDog, mirroring the existing manual-setup
watchdog. Gated behind the new WifiReconnectWatchDog flag (default on) so
environments where an unexpected reboot is undesirable can opt out; disabled
for theengs-plug to avoid interrupting the relay state.
@1technophile 1technophile merged commit 4d94585 into development Jun 1, 2026
125 of 128 checks passed
@1technophile 1technophile deleted the claude/github-issue-2276-oRlhu branch June 1, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants