A configurable RS232/RS485-to-TCP bridge for Voltronic-protocol and Modbus-RTU inverters (Axpert, Voltronic, Anenji, and similar OEM-rebadged units)
The original add-on this was based on only supported a fixed device path
(/dev/ttyUSB0) and a single fixed baud rate. And I needed to change some things around, so here we are.
This fork adds:
- Configurable serial device path: supports
/dev/ttyUSB1,/dev/serial/by-id/..., not just/dev/ttyUSB0 - Configurable TCP port
- Configurable serial framing: data bits, parity, and stop bits, for inverters
aarch64added to supported architectures (untested)
This was built and tested against an Anenji ANJ-HHS-11KW-48V-WIFI
inverter, which appearances as a Voltronic/Axpert-style unit and communicates via Modbus RTU at 9600 baud, slave 1.
If you have a -WIFI variant Anenji and PI30 tools arent getting a response, Modbus RTU is worth trying before assuming a hardware fault.
This addon is based on the common socat serial-to-TCP bridge pattern
used across Home Assistant / solar-inverter community addons-
I sourced the original version of this particular addon some time ago and its config.yaml didnt contain a
repository URL, author name, or license header, so I've been unable to trace it back to a specific author.
If you recognize this code or know who originally wrote it, please open an issue as I woudl like to credit them properly and link back to the source repository.
- Add this repository to your Home Assistant add-on store:
Settings → Add-ons → Add-on Store → ⋮ → Repositories, then add:https://github.com/davight/Voltronic-Bridge-Configurable - Find Voltronic Serial Bridge Configurable in the store and install it.
- Configure the options (see below), then start the add-on.
| Option | Type | Default | Description |
|---|---|---|---|
device |
str |
/dev/ttyUSB0 |
Path to the serial device |
baud_rate |
int |
9600 |
Serial baud rate. Common valuesaare 2400 (older Voltronic PI30) or 9600 (Modbus) |
tcp_port |
port |
8899 |
TCP port the bridge listens on |
data_bits |
list(7|8) |
8 |
Serial data bits |
parity |
list(none|even|odd) |
none |
Serial parity |
stop_bits |
list(1|2) |
1 |
Serial stop bits |