/modbus-sniffer

MQTT Firmware Extension for 1st generation LG ESS BESS

Primary LanguageGoApache License 2.0Apache-2.0

modbus-sniffer

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.

Requirements

Tested LG ESS products

Configuration

Adjust the flags in contrib/modbus-sniffer before running make install.

Usage

make install

Credits