Skip to content

[REQUEST] Add a port of the new "Serial Proxy" component from ESPHome #264

@Hedda

Description

@Hedda

Low-priority idea and perhaps slightly out-of-scope but maybe someday still consider porting and adding the new "Serial Proxy" component from ESPHome to the Linux-Voice-Assistant project to allow it to be used as a HA proxy-server for serial devices over a persistent WebSocket connection (to pipe serial communication over TCP/IP to Home Assistant's integrations from serial devices connected to a remote system running LVA)?

The new serial_proxy in ESPHome is a new experimental component that proxies UART communication to Home Assistant API clients (i.e. Home Assistant's integrations and apps/addons) over the network (#13944). This experimental component enables remote access to serial devices connected to ESPHome nodes, similar to how the zwave_proxy component bridges Z-Wave modems. Configure a UART bus and expose it as a named serial port with a specified type (TTL, RS232, RS485) in a standardized way that is exposed to Home Assistant integrations or apps/addons.

It is a custom TCP connection based on Protocol Buffers (a.k.a. Protobuf, Google's data interchange format for serializing structured data) and from an end-user point-of-view it works kind similar to the Ser2net Linux-deamon serial communication (and serial communication over socat multipurpose relay) but uses ESPHome's native API communication layer so plug-and-play for Home Assistant users, and under the hood ESPHome's serial_proxy component features more advanced processes for Protobuf encoding and Protobuf devirtualization, plus the fact that it has been optimized for performance.

Use case is to allow proxying of serial data frames between Serial/UART devices (example product using modbus) via ESPHome’s API over Wi-Fi or Ethernet, for connecting remote to an Home Assistant integration or app/addon. This allows for more flexibility when placing your serial hardware within your home. I think this would be added value to the feature-set if could utilize a Linux-Voice-Assistant installation deployment as a proxy for serial devices too.

Home Assistant's core also migrated to a new "serialx" Python library for synchronous and asynchronous serial communication:

Again another customized implementation is ESPHome's Z-Wave Proxy component which is available to test to as a "portable Z-Wave experiment" for connecting the ZWA-2 adapter (serial Z-Wave controller) remotley to the Z-Wave JS server addon and seen many oprimization since announced:

PS: Off-topic but FYI for reference, ESPHome also have somewhat related "Bluetooth Proxy" feature for proxying BLE devices (meaning that only supports proxying Bluetooth Low Energy devices such as exampel common Bluetotth temperature sensors like BTHome or BLE Trackers) which broadcast its data then it receieves and automatically aggregates then exposes to Home Assistant's Bluetooth integration:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions