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?

  • Jenseitsjens@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    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.

    • SwingingTheLamp@piefed.zipOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 hours ago

      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.

    • fonix232@fedia.io
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      2 days ago

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

      • Jenseitsjens@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 day ago

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