esphome / esphome/feature-requests
Add command line parameter to specify ota timeout
- 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**
Add a command line parameter to specify the timeout in seconds for ota upload.
**Please describe your use case for this integration and alternatives you've tried:**
Often, the esphome cli timeouts on upload because the device is still receiving. In https://github.com/esphome/esphome/blob/dev/esphome/espota2.py#L259 the timeout was increased to 20 seconds, but this should be configurable to cover more scenario's.
**Additional context**
```
Uploading: [============================================================] 100% Done...
INFO Waiting for result...
ERROR Error receiving acknowledge receive OK: timed out
```
```
[14:39:41][D][ota:147]: Starting OTA Update from 10.1.1.10...
[14:39:41][D][ota:316]: OTA in progress: 0.3%
[14:39:45][D][ota:316]: OTA in progress: 5.4%
[14:39:46][D][ota:316]: OTA in progress: 10.5%
[14:39:47][D][ota:316]: OTA in progress: 19.8%
[14:39:48][D][ota:316]: OTA in progress: 23.0%
[14:39:49][D][ota:316]: OTA in progress: 26.3%
[14:39:50][D][ota:316]: OTA in progress: 32.3%
[14:39:51][D][ota:316]: OTA in progress: 37.4%
[14:39:52][D][ota:316]: OTA in progress: 44.4%
[14:39:52][D][ota:316]: OTA in progress: 46.4%
[14:39:53][D][ota:316]: OTA in progress: 48.6%
[14:39:54][D][ota:316]: OTA in progress: 50.5%
[14:39:56][D][ota:316]: OTA in progress: 56.5%
[14:39:57][D][ota:316]: OTA in progress: 61.1%
[14:39:58][D][ota:316]: OTA in progress: 68.1%
[14:39:59][D][ota:316]: OTA in progress: 73.2%
[14:40:01][D][ota:316]: OTA in progress: 78.4%
[14:40:02][D][ota:316]: OTA in progress: 86.7%
[14:40:03][D][ota:316]: OTA in progress: 95.1%
[14:40:04][W][ota:393]: Remote closed connection
[14:40:04][W][ota:342]: Reading back acknowledgement failed!
[14:40:04][I][ota:349]: OTA update finished!
[14:40:04][I][app:134]: Rebooting safely...
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading esphome/espota2.py around line 259 and tracing the ESPHome CLI upload path. Confirm where the OTA acknowledgement timeout is applied and how a command-line value could reach it. Done means the upload timeout is configurable in seconds and the reported timeout case can use a longer value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100