RetroFed Forum
Your home away from modern life.
Serial over Ethernet with HA
Post Reply
AuthorMessage
SwingingTheLamp piefed.zip SwingingTheLamp@piefed.zip
Joined: 2025-12-27
Quote

I just picked up a 4K commercial display to upgrade my TV for cheap. It has an RS232C port on the back for control, and Home Assistant has a native integration to control it via a local Linux tty. The hitch is that my Home Assistant server is located in a spot not near the television, and running physical serial line to it would be inconvenient. But, since I have a Raspberry Pi connected as the streaming media box, I should be able to plug a USB adapter into it and route the serial data over the network, right?

Is there a a good way to do this in HAOS?

21   Original
CameronDev programming.dev CameronDev@programming.dev
Joined: 2023-06-18
#2 · Quote Reply

https://esphome.io/components/serial_proxy/

https://tasmota.github.io/docs/Serial-to-TCP-Bridge/

A esp32 dev board and some soldering might work.

9
SwingingTheLamp piefed.zip SwingingTheLamp@piefed.zip
Joined: 2025-12-27
#3 · Quote Reply

https://esphome.io/components/serial_proxy/ https://tasmota.github.io/docs/Serial-to-TCP-Bridge/ A esp32 dev board and some soldering might work.

Thanks! I've got the TV end covered, the issue is at the HAOS end. The LG serial TV integration talks to a Linux device node (e.g. /dev/ttyUSB0), so the issue is stuffing the TCP stream back into a pty.

2
CondorWonder lemmy.ca CondorWonder@lemmy.ca
Joined: 2023-06-14
#4 · Quote Reply

Thanks! I've got the TV end covered, the issue is at the HAOS end. The LG serial TV integration talks to a Linux device node (e.g. /dev/ttyUSB0), so the issue is stuffing the TCP stream back into a pty.

That’s what they’re saying - you can use an ESP32 device as a serial proxy without having to do anything special. If you already have a device attached to it you could use the socket:/… syntax below.

Per the integration documentation:

Port

The serial port the TV is connected to. This can be a local device path or a remote serial proxy URL. For example, /dev/ttyUSB0 (USB adapter), socket://192.168.1.100:2000(network proxy), or socket://esphome-device.local:6638 (ESPHome).

10
Jenseitsjens lemmy.world Jenseitsjens@lemmy.world
Joined: 2024-01-19
#5 · Quote Reply

As mentioned by CondorWonder, the LG via Serial HA Integration can already connect to a TCP socket instead of a TTY device.

If you want to use your Raspberry Pi as the serial proxy server, there's tons of options. To recommend something kinda modern, I'd put a systemd service on your raspberry pi which starts netcat on a stty, see https://stackoverflow.com/a/71173551/2232127 as an example.

5
SwingingTheLamp piefed.zip SwingingTheLamp@piefed.zip
Joined: 2025-12-27
#6 · Quote Reply

That’s what they’re saying - you can use an ESP32 device as a serial proxy without having to do anything special. If you already have a device attached to it you could use the socket:/… syntax below. Per the integration documentation: Port The serial port the TV is connected to. This can be a local device path or a remote serial proxy URL. For example, /dev/ttyUSB0 (USB adapter),&nbsp...

Oh, nice, thanks!

(Oddly, the documentation that came up when I looked didn't mention the socket options.)

2
fonix232 fedia.io fonix232@fedia.io
Joined: 2023-06-13
#7 · Quote Reply

As mentioned by CondorWonder, the LG via Serial HA Integration can already connect to a TCP socket instead of a TTY device. If you want to use your Raspberry Pi as the serial proxy server, there's tons of options. To recommend something kinda modern, I'd put a systemd service on your raspberry pi which starts netcat on a stty, see https://stackoverflow.com/a/71173551/2232127 as an example.

I think even a simple ESP32 would serve well as a serial to TCP adapter. And it's considerably cheaper.

3
Jenseitsjens lemmy.world Jenseitsjens@lemmy.world
Joined: 2024-01-19
#8 · Quote Reply

I think even a simple ESP32 would serve well as a serial to TCP adapter. And it's considerably cheaper.

Well since the Pi is already there and has a serial interface, getting an ESP32 is still more expensive :)

2
SwingingTheLamp piefed.zip SwingingTheLamp@piefed.zip
Joined: 2025-12-27
#9 · Quote Reply

As mentioned by CondorWonder, the LG via Serial HA Integration can already connect to a TCP socket instead of a TTY device. If you want to use your Raspberry Pi as the serial proxy server, there's tons of options. To recommend something kinda modern, I'd put a systemd service on your raspberry pi which starts netcat on a stty, see https://stackoverflow.com/a/71173551/2232127 as an example.

Thanks! I see now that HA documentation just assumes that one knows that one can use the URL schema to specify the "port, " without saying so. iYKYK, I guess.

1
Post Reply
Back to top