Feature Request: Periodic WiFi Reconnect Without Reboot #3416
Unanswered
DjordjeMandic
asked this question in
Component enhancements
Replies: 1 comment
-
|
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Component name
wifi
Link to component documentation on our website
https://esphome.io/components/wifi
Describe the enhancement
Current behavior:
When using ESPHome with
api_reboot_timeout: 0sandwifi_reboot_timeout: 0s(to avoid unwanted reboots), the device still relies on the WiFi component’s internal retry logic. If the device boots before the WiFi access point is available (common after a whole-house power outage), it may fail to connect and never try again, because there is no periodic reconnection logic when reboot timeouts are disabled.To work around this, I will try to use an
interval:automation that periodically disables and re-enables WiFi ifwifi.connectedisfalse.Desired behavior:
Add a parameter such as
wifi_reconnect_timeoutthat defines how long the WiFi component should wait when not connected before retrying a connection.On boot, if WiFi fails to connect within this timeout, retry again.
If WiFi disconnects while running, start the timeout and retry when it expires.
This allows connection recovery without relying on a reboot and without needing custom interval logic.
This would give users fine-grained control over reconnection behavior even when reboots are disabled.
Use cases
Smart plugs controlling appliances (e.g., washing machines) where any reboot or power cycle is unacceptable because the relay turns off during restart.
Devices that boot faster than the router after a power outage and must eventually reconnect without intervention.
Devices where frequent reboots are undesirable or cause functional issues.
General robustness: avoiding the need for custom interval hacks just to restore WiFi connectivity.
This enhancement would provide a safer built-in mechanism to ensure long-term WiFi stability without forcing device restarts.
Anything else?
Here is the workaround that I will try and see if it works:
Beta Was this translation helpful? Give feedback.
All reactions