modbus-sniffer
is little Go command line utility which sniffs Modbus communication (read holding registers commands) via Linux's ptrace
syscall.
It does so by attaching itself to a specified process and intercepting all read()
& write()
system calls which are used to communicate to a Modbus device attached to a serial port or TCP network.
This project is used as a firmware extension for the 1st generation LG ESS PV/Battery systems to publish the internal system state periodically via MQTT to Homeassistant.
- 1st generation LG ESS
- Make
- Go
- OpenSSH SCP
Adjust the flags in contrib/modbus-sniffer
before running make install
.
make install
- Steffen Vogel (@stv0g)