dbus driver for victron cerbo gx / venus os for huawei sun 2000 inverter
This script is intended to help integrate a Huawei Sun 2000 inverter into the Venus OS and thus also into the VRM portal.
I use a Cerbo GX, which I have integrated via Ethernet in the house network. I used the WiFi of the device to connect to the internal WiFi of the Huawei Sun 2000. Attention: No extra dongle is necessary! You can use the integrated Wifi, which is actually intended for configuration with the Huawei app (Fusion App or Sun2000 App). The advantage is that no additional hardware needs to be purchased and the inverter does not need to be connected to the Internet.
To further use the data, the mqtt broker from Venus OS can be used.
- better logging
- find out why the most values are missing in the view
- repair modelname (custom name in config)
- possibility to change settings via gui
- alarm, state
- more values: temperature, efficiency
- clean code
Cooming soon
-
Copy the full project directory to the /data/etc folder on your venus:
- /data/dbus-huaweisun2000-pvinverter/
Info: The /data directory persists data on venus os devices while updating the firmware
Easy way:
wget https://github.com/kcbam/dbus-huaweisun2000-pvinverter/archive/refs/heads/main.zip unzip main.zip -d /data mv /data/dbus-huaweisun2000-pvinverter-main /data/dbus-huaweisun2000-pvinverter chmod a+x /data/dbus-huaweisun2000-pvinverter/install.sh rm main.zip
-
Edit the config.py file
nano /data/dbus-huaweisun2000-pvinverter/config.py
-
Check Modbus TCP Connection to gridinverter
python /data/dbus-huaweisun2000-pvinverter/connector_modbus.py
-
Run install.sh
sh /data/dbus-huaweisun2000-pvinverter/install.sh
You can check the status of the service with svstat:
svstat /service/dbus-huaweisun2000-pvinverter
It will show something like this:
/service/dbus-huaweisun2000-pvinverter: up (pid 10078) 325 seconds
If the number of seconds is always 0 or 1 or any other small number, it means that the service crashes and gets restarted all the time.
When you think that the script crashes, start it directly from the command line:
python /data/dbus-huaweisun2000-pvinverter/dbus-huaweisun2000-pvinverter.py
Also useful:
tail -f /var/log/dbus-huaweisun2000/current | tai64nlocal
svc -d /service/dbus-huaweisun2000-pvinverter
svc -u /service/dbus-huaweisun2000-pvinverter
If you want to restart the script, for example after changing it, just run the following command:
sh /data/dbus-huaweisun2000-pvinverter/restart.sh
Run
sh /data/dbus-huaweisun2000-pvinverter/uninstall.sh
rm -r /data/dbus-huaweisun2000-pvinverter/
DenkBrettl
modified verion of https://github.com/olivergregorius/sun2000_modbus
https://github.com/RalfZim/venus.dbus-fronius-smartmeter
https://github.com/fabian-lauer/dbus-shelly-3em-smartmeter.git