Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improv works but serial log does not #448

Open
thenewwazoo opened this issue Dec 8, 2023 · 3 comments
Open

Improv works but serial log does not #448

thenewwazoo opened this issue Dec 8, 2023 · 3 comments

Comments

@thenewwazoo
Copy link

I have kind of a weird situation. I am using esp web tools to flash devices in my project, and flashing devices works fine. So does provisioning WiFi, and visiting the device. But the serial log page doesn't.

The logs aren't anything weird. Lines are terminated with \n, and are prepended with >>> or !!! depending on severity. There are no escape codes/control characters. I can easily monitor serial log lines with any other method pio run monitor or screen(1) or even a python script that uses pyserial.

Any suggestions?

@thenewwazoo
Copy link
Author

thenewwazoo commented Dec 8, 2023

A user reported CRLF weirdness in screen(1), which led me to do some experimentation. My line endings are, right now, \n. I changed the ones I controlled to \r\n, and the serial log worked, for a short time. I have a suspicion that it stopped working when a line with only \n came through, but I haven't extensively tested it yet.

I can't find anything in documentation about line endings.

@thenewwazoo
Copy link
Author

Looking at this line:

const lines = this.chunks.split("\r\n");

this implies to me that line endings must be \r\n, but the definition of LOG_FORMAT does not include \r.

@balloob
Copy link
Member

balloob commented Jan 18, 2024

hm ya, I wrote that logging based on the ESPHome output and it seemed to always work for everything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants