/SolaxModbusGateway

Solax Modbus to MQTT Gateway

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Modbus-RTU to MQTT Gateway for Solar Inverter

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:

  • Solax Hybrid X1
  • Solax Hybrid X3
  • Solax MIC
  • Growatt SPH
  • Sofar-KTL Solarmax-SGA
  • Deye Sun SG04LP3

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

  • 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.

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:

  • wiring
  • baud rate

The example requests the inverter SerialNumber and if wiring is correct, the inverter will answer with his number or soomething 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