Firmware replacement for Growatt ShineWiFi-S (serial), ShineWiFi-X (USB) or custom-built sticks (ESP8266/ESP32).
- Graphical UI using a built-in webserver with live visualization. Screenshots.
- The inverter is queried using Modbus protocol.
- Inverter data is made available via
- The data received will be transmitted using MQTT to a server of your choice.
- The data received is also provided as JSON and Prometheus format
- Firmware update via WifiManager
- Basic access to arbitrary modbus data
- Tries to autodetect which stick type to use
- Configuration access point for initial configuration of Wifi and MQTT server (IP, SSID, Password)
- Supports Growatt protocol versions v1.20, v1.24 and v3.05
- Other Growatt protocol versions can easily be implemented / modified
- TLS support for ESP32
- Debugging via Web and Telnet
- Power limiting (allows zero export)
Important
The precompiled version will only work if your inverter uses version 1.24 of the Growatt Protocol (here is why). You can start with it, but you will likely need to compile OpenInverterGateway yourself.
- Download a precompiled release from the GitHub release page matching your hardware.
- Follow the flashing / hardware section below.
- Download / clone this repo.
- Setup PlatformIO.
- Open the project folder and choose the correct environment for your hardware by opening i.e.the Project Tasks > ShineWiFiX section.
- Rename the
Config.h.example
toConfig.h
and adapt it according to your requirements. - Compile using the Build task from PlatformIO.
- Follow the flashing / hardware section below.
- Flash the image to your hardware (ESP32 / ESP8266esp32 / ShineWifiX-S / ShineWifi-X / …). Details on how to do this are provided in the documentation.
- A configuration WiFi access point (SSID:
GrowattConfig
, Pass:growsolar
) will be available. Connect to it and configure the firmware via web interface at http://192.168.4.1. - If you need to reconfigure the stick, you have to either
- Press the AP button on the front (configured with
ENABLE_AP_BUTTON
inConfig.h
) - Reset the stick twice within 2-10 seconds.
- Press the AP button on the front (configured with
- ShineWifi-S with a Growatt Inverter connected via serial (Modbus over RS232 with level shifter)
- ShineWifi-X with a Growatt Inverter connected via USB (USB-Serial Chip from Exar)
- Wemos-D1 with a Growatt Inverter connected via USB (USB-Serial Chip: CH340)
- NODEMCU V1 (ESP8266) with a Growatt Inverter connected via USB (USB-Serial Chip: CH340)
- ShineWifi-T (untested, please give feedback)
- Lolin32 (ESP32) with a Growatt Inverter connected via USB
I tested several ESP8266 boards with built-in USB-Serial converters. So far, only boards with the CH340 chipset do work (CP21XX and FTDI chips do not work). Almost all ESP8266 modules with added 9 pin serial port and level shifter should work with little soldering via serial.
Check out the documentation for more details including pictures.
- It does not make use the RTC or SPI Flash of these boards.
- It does not communicate to Growatt Cloud at all.
- The ShineLAN-X stick is not supported. However, there is another project with support for that stick.
- Growatt 1000-3000S
- Growatt MIC 600-3300TL-X (Protocol 124 via USB/Protocol 120 via Serial)
- Growatt MID 3-25KTL3-X (Protocol 124 via USB)
- Growatt MOD 3-15KTL3-X-H (Protocol 120 via USB)
- Growatt MOD 12KTL3-X (Protocol 124 via USB)
- Growatt MID 25-40KTL3-X (Protocol 120 via USB)
- Growatt SPH 4000-10000STL3-X BH (Protocol 124 via Serial)
- Growatt MID 15KTL3-XH (Protocol 3000 via USB)
- And others …
The documentation from Growatt on the Modbus interface is available, search for "Growatt PV Inverter Modbus RS485 RTU Protocol" on Google.
The older inverters apparently use Protocol v3.05 from year 2013. The newer inverters apparently use protocol v1.05 from year 2018. There is also a new protocol version v1.24 from 2020. (used with SPH4-10KTL3 BH-UP inverter) TL-XH hybrid inverters use version v1.24 with a different set of input and holding registers.
For IoT applications, the raw data can be read in JSON format (Content-Type: application/json
) by calling http://<ip>/status
.
If you want to scrape the metrics with a Prometheus server, you can use the endpoint http://<ip>/metrics
.
A possible configuration is described in the documentation.
To make use of this feature, #define ENABLE_MODBUS_COMMUNICATION 1
must be set in Config.h
(default: 0
).
Then, once compiled and flashed, access /postCommunicationModbus
.
There are several ways to debug OpenInverterGateway:
- Define
ENABLE_WEB_DEBUG
to enable a debug HTTP endpoint available athttp://<ip>/debug
. - Define
ENABLE_TELNET_DEBUG
to enable a debug Telnet endpoint. Access usingtelnet <IP_OF_OPEN_INVERTER_GATEWAY>
, i.e.telnet 192.168.178.91
. - Define
DEBUG_MODBUS_OUTPUT
to enable debug more for Modbus communication.
These values must be set in your Config.h
.
Check Config.h.example
for examples.
This project is based on Jethro Kairys work on the Modbus interface.