tobiasfaust / SolaxModbusGateway

Modbus RTU to MQTT Gateway
GNU General Public License v3.0
54 stars 17 forks source link

Modbus-RTU to MQTT Gateway

for Solar Inverters and other Modbus-RTU Devices

license ESP32 Architecture GitHub release (latest by date including pre-releases) GitHub All Releases

This project implements a Gateway for Solar Inverters with Modbus-RTU communication to MQTT on ESP32 basis.
Direkt Communication with OpenWB is implemented. Sending "set" commands to inverter are basically implemented too.

Supported Solar Inverters

Basically, all Inverters with Modbus RS485 RTU communication are supported.
Currently the following Inverters with their special registers are integrated:

If your Solar Inverter is not listed, it´s quite simple to add it by yourself. Feel free to add the special registers, please check the wiki page or contact me by opening a new issue in github.

What you need

An ESP8266 is actually not sufficient, because Modbus communication works fail-free only with hardwareserial. ESP8266 has only one Hardwareserial port which is used by serial/debug output. ESP32 has 3 Hardewareserial ports and we use one of them. Another reason is available memory for such huge json definition or such large modbus answers.
Please check also the wiki page, how to wire the circuit.

How to start

It´s recommend to start with one example to check wiring works correctly. Both LED´s (TX and RX) on your RS-485 module should blink. If only TX-LED blinks, please check:

The example requests the inverter SerialNumber and if wiring is correct, the inverter will answer with his number or something like this.

request: 01 03 00 00 00 07 08 04

Response: 01 03 .....

please refer full documentation and How-To´s in our Wiki