View remote log __without__ OTA update?

Hi everybody,

when I run esphome <file.yaml> run --upload-port=<ip>, it will upload my new code and then display a lot in the terminal. When I CTRL+C, this log stops, of course.

Is it possible to view this log later on? I have tried different combinations of the logs command, for example esphome logs --host-port=<ip>, but this only throws an error.

It’d be quite nice to view the logs instead of waiting for the integration in Home Assistant to reload, especially when testing things. I am currently trying to set up an SR-HC04 distance sensors. It keeps showing different values in Home Assistant (without being moved). I thought this might be related to my USB hub, so I connected it to an outlet via a USB adapter. It works, but there are still different values showing up. Now that it is connected to an outlet, I cannot even try viewing the logs via something like /dev/ttyUSB0 or similar.

Thank you for your help :slight_smile:

esphome <file.yaml> logs

1 Like

Thank you. Is there still a way to specify the device to grab the logs from? My computer is in a different VLAN than the IOT devices, so mDNS does not work (and esphome is automatically looking for the mDNS name).

Have you tried the good old hosts file?

1 Like

I did not actually think of that!! It is a great idea. Though I was hoping there’d be an easier way like --log-host=<ip>. I’ll go with hosts for now :slight_smile: