PZEM-004T-v30 icon indicating copy to clipboard operation
PZEM-004T-v30 copied to clipboard

Not a bug, a better option on the ESP8266: using TelnetStream for console

Open rin67630 opened this issue 5 months ago • 0 comments

Since the ESP8266 has only one full UART, you have an option to sent the console messages to Telnet instead. Once the Setup is finished, you perform Serial.swap(), which moves the hardware UART to D7 (Rx) and D8 (Tx) where you connect the PZEM probe. Include the TelnetStream Library, instantiate it to Telnet and replace Serial1.print(...) by Telnet.print(...) You can then monitor the values upon starting good old Telnet* at the IP address of the ESP8266, which is ways more convenient than wiring a serial connection to the half-UART on Serial1.

  • Telnet is perfect on Linux and on macOS. On Windows Telnet handles CR and LF in a non-standard way. I use to start WSL and start Telnet from the Linux console.

rin67630 avatar Sep 02 '24 15:09 rin67630