esphome / esphome/feature-requests

Option to log to file from the Esphome UI

Open
#1,754 5 comments 4 reactions 0 assignees View on GitHub
Project: Dashboard
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**

For rare (once in a long time) issues it would be a really nice feature to be able to have the log of EspHome devices redirected to a file. Much like you can now already wirelessly look at the live logs, It would be a great feature to have the option to 'store the log of the device to a file' added to the choices in the `How to get the logs for your device?` menu.
I would then also envision another button next to the `secrets` button in the top of the UI that allows you to look at (or download) the currently stored logfiles on the EspHome server.

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

The use for this would of course be capturing the logfiles of the EspHome devices from within the docker container, which should later on be viewable through the UI. This would aid in debugging hard to track problems that only occur once every so often.

I am currently doing this through CLI in the docker container by running `esphome logs device.yaml >> device.log`. But it would be so much better to have the option to do so through the web interface.

**Additional context**

Additional things to consider when adding this feature could be:
* Start / stop buttons for logging to file
* Storing each devices logfile in a date-time formatted filename
* Auto cleanup of old logfiles?
* Start logging for _x_ amount of time?

Contributor guide

No contributing guide indexed for this repository

Research direction

The request names no files or tests; start by tracing the UI's “How to get the logs for your device?” menu and the existing `esphome logs device.yaml >> device.log` CLI workflow. Clarify the scope for starting and stopping capture, storing logs, and viewing or downloading them before implementation, then verify the complete flow through the UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
cli, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.