Skip to content

Logging without MQTT over aioesphomeapi #5528

@Falcosc

Description

@Falcosc

Feedback

Would be nice to know how to do it.

While reading the logging section https://esphome.io/guides/cli/#using-logging-tools-supplied-with-esphome, it is not clear what the difference between esphome logs and aioesphomeapi-logs actually is. Does any of them support connection interruptions like esp crash/reboot?

It looks to me like aioesphomeapi-logs will handle it because it uses the reconnection logic. Would be nice to copy this documentation into the logging page https://github.com/esphome/aioesphomeapi/blob/280e14ac05e0f0c489ec2633cb90a3cabb22e085/aioesphomeapi/reconnect_logic.py#L61C1-L63C112

Would it be ok to put aioesphomeapi-logs into a daily crone job and directly redirect it's output into a daily logfile? Or should we avoid using this script for unattended use cases?
If this script is already as good as it gets, it would be even better to have a section "Persist logs over native API" and mention that this tool supports reconnection and can be used to redirect log outputs into log files.
Using Native API instead of MQTT for logging will reduce memory consumption, which could be interesting on complex esp8266 configurations.

URL

https://esphome.io/guides/cli/#using-logging-tools-supplied-with-esphome

Additional information

I can try to formulate this information in a documentation page pull request. But you might have more work reviewing and adjusting it, since I'm terrible at writing easy to follow statements.

But my main goal is to get the answer of my question in this documentation page instead of hiding the answer in a github issue or discord because nobody will find your answer there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions