Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native API's reboot_timeout should consider activity on the HTTP EventSource and RESTful APIs. #2694

Open
hjdhjd opened this issue Apr 19, 2024 · 0 comments

Comments

@hjdhjd
Copy link

hjdhjd commented Apr 19, 2024

Currently there's a watchdog/reboot failsafe in ESPHome where a reboot is forced by default if there isn't a native API connection that's made within 15 minutes. I'd like the watchdog/reboot failsafe to reset the timer if there's a connection to the ESPHome web APIs (EventSource or RESTful) as well. Some applications choose, for a variety of reasons, to access / control ESPHome devices through the terrific web APIs instead of the native one and they shouldn't be "penalized" by default to have to go through additional configuration hoops in order to prevent the watchdog/reboot failsafe from triggering.

Additionally, the watchdog/reboot failsafe serves an important function, and disabling it is far less preferable an option to ensuring that web API calls count toward resetting the reboot timer. That allows the failsafe to perform it's intended function while correctly interpreting connectivity from the various API clients.

Please describe your use case for this integration and alternatives you've tried:

Without explicitly setting the reboot_timeout configuration variable under the api block to 0s, an ESPHome device will always reboot every 15 minutes regardless of whether or not it's actually functioning correctly and being accessed through one of the other API mechanisms ESPHome provides (namely the web API in this case). Reboots can be disruptive/unnecessary for devices and can potentially provide gaps in functionality in between reboot cycles.

Additional context

While a workaround like:

api:
  reboot_timeout: 0s

does work, it also disables the reboot watchdog failsafe function, which is valuable. I believe a more comprehensive view of what ESPHome considers connecting to the API will provide a more complete functional experience for the end user where reboots related to the API watchdog are only triggered when there's truly no connection happening to any of the ESPHome API endpoints (native or web).

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

No branches or pull requests

1 participant