Exporter for prometheus to export metrics from GoodWe Inverter
This exporter should be working on GoodWe ET, EH, BT, BH, ES, EM, BP, DT, MS, and D-NS families of inverters. It may work on other inverters as well, as long as they listen on UDP port 8899 and respond to one of supported communication protocols. The inverters communicate via UDP protocol, by default running on port 8899. They use a native 'AA55' protocol and (some models) ModBus protocol. ET inverters support both protocols, some inverters may not support both of them.
(If you can't communicate with the inverter despite your model is listed above, it is possible you have old ARM firmware version. You should ask manufacturer support to upgrade your ARM firmware (not just inverter firmware) to be able to communicate with the inveter via UDP.)
more info about the python goodwe library: https://github.com/marcelblijleven/goodwe
Configured inverter:
Inverter must be connected to a 2.4GHz wifi network (if you have a wifi module)
If not, you can configure it following:
1.1 Connect to a wifi network called Solar-Wifi
. The default login is admin
and password admin
note: default password is sometimes 12345678
1.2 Open your browser and go to http://10.10.100.253 or http://10.10.100.254
1.3 enter admin
as username, and admin
as password
1.4 Click Start setup
, and select router's SSID (must be a 2.4GHz network) and it's password
1.5 click complete
to finish the setup process
Installed python (tested with python 3.8, 3.9, 3.10):
for Ubuntu:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install python3.8 python3.8-dev python3.8-distutils python3.8-venv
for RHEL/CentOS:
yum install python3.8
check:
python3.8 --version
python -m pip install asyncio prometheus_client goodwe
note: the inverter must be on the same network
To get the IP adress of the inverter, run:
python scripts/inverter_scan.py
you will see something like:
Located inverter at IP: 192.168.2.35, mac: 289C6E05xxxx, name: Solar-WiFi222W0782
Edit the file scripts/get-inverter-data.py
and on the line #7 add the IP address of the inverter
then run it with:
python scripts/get-inverter-data.py
and you should get all the data your inverter is exposing
check that you have:
To test, start the exporter with minimal configuration:
python src/exporter.py --port <desired port> --interval <interval (s)> --inverter <inverterIP>
ie.
python src/exporter.py --port 8787 --interval 30 --inverter 192.168.2.35
(for more settings, see Supported parameters)
now you can call it via curl (from another terminal) to see, if it exports some metrics: (run in a new tab)
curl http://127.0.0.1:8787
to show help, just run the script with a --help
parameter:
python src/exporter.py --help
if everything is OK, you can set up the script as a service: For Ubuntu: