esphome / esphome/feature-requests

Optional logs viewing timeout for the "run" command

Open
#1,373 8 comments 0 reactions 0 assignees View on GitHub
Type: CLI
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**

When using the `run` command of the CLI utility, logs are shown indefinitely and sending a signal (e.g.: CTRL+C'ing) is necessary to quit the process. An optional flag to specify a maximum time to show logs for before terminating automatically would be a nice addition.

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

When upgrading my fleet of ESPHome devices I use a simple script that cycles through my YAML configs and updates each unit through the `run` command. This makes it necessary to manually terminate each log viewing session to proceed to the next module.

An optional timeout that only starts when the module is reachable and logs starts streaming would be handy to automate this kind of upgrade and monitoring processes.

Using a sequence of `compile` and `upload` commands is already possible, but it doesn't give any information on the outcome of the upgrade and the status of the module after the reboot.

**Additional context**

Excerpt of the update script:
```bash
for conf in *.yaml; do
if [ -d "${conf%.yaml}" ]; then
docker run --rm -v "${PWD}":/config -it "esphome/esphome:$ESPHOME_VERSION" "$conf" run
fi
done
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the CLI implementation of the `run` command and how log streaming begins; the payload does not name a file or test. Compare its behavior with `compile` and `upload`, then define an optional timeout that starts when the module is reachable and logs begin streaming. Done means scripted upgrades can exit automatically while preserving post-reboot status feedback.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
cli, embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.