for Solar Inverters and other Modbus-RTU Devices
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.
Basically, all Inverters with Modbus RS485 RTU communication are supported.
Currently the following Inverters with their special registers are integrated:
- Solax Hybrid X1
- Solax Hybrid X3
- Solax MIC
- Growatt SPH
- Sofar-KTL Solarmax-SGA
- Deye Sun SG04LP3
- QVolt-HYP-G3-3P
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.
- ESP32, ESP32-C3, ESP-S2 or ESP-S3 NodeMCU
- RS-485 TTL UART Module with MAX485 Semiconductor
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.
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:
- wiring
- baud rate
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 .....