esphome / esphome/feature-requests

Timeout for OTA

Open
#112 8 comments 4 reactions 0 assignees View on GitHub
component: deep_sleep component: ota
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**
Please add a timeout parameter for OTA updates.
I wouldn't care if a terminal or docker process would wait and retry for 30 minutes until the device comes online after the deep sleep.

**Please describe your use case for this integration and alternatives you've tried:**
I'd like to use OTA updates with a deepsleeping node.
The ota_mode flag over mqtt to prevent deepsleep works somehow but has issues:
- you have to wait until the device comes online and is waiting for the update or reset it manually
- you should trigger the update shortly after the device got online because the battery operated node shouldn't be online for a long time
- timing to unset the ota_mode flag on mqtt is crucial, must happen between the device boot and before the device reboot after the update

**Additional context**

```
INFO Successfully compiled program.
INFO Connecting to 192.168.178.225
ERROR Connecting to 192.168.178.225:8266 failed: [Errno 113] No route to host
```
or (depending on host system)
```
INFO Successfully compiled program.
INFO Connecting to 192.168.178.225
ERROR Connecting to 192.168.178.225:8266 failed: timed out
```
This timeframe is about 5- 10 seconds only.

Danke!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the OTA update command and the connection timeout or retry handling used by the terminal and Docker process; no files or tests are named in the issue. Clarify how the timeout should cover a sleeping device and what should happen when the device connects, then verify that the requested wait and retry behavior works for OTA updates.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.