What solar PV inverter(s) do you have *working* with openHAB, and how?

GivEnergy Inverters have a good cloud API available. I understand you can also get local data without going to the cloud using GitHub - britkat1980/giv_tcp: TCP connection (from inverter) and MQTT implementation (I’ve not tried it myself as the cloud API works fine for what I need)

Hi I’m also considering Huawei SUN2000 inverter and LUNA2000 battery. I read somewhere that I need to buy the Huawei Smart Dongle-WLAN-FE for ModBus TCP to work. Are you saying it’s no longer necessary? And can you have ModBus running in parallel with Fusion (ready somewhere only one can work at a time). Thank you!



Thanks! Looks like the model our supplier quote is: SUN2000-8KTL-M1
Do you know the differences between M1 and L1? There are also M2 and M3 very confusing…

L1’s are single phase, M1’s are 3-phase. Unless you have devices that require 3-phase I would suggest to convert your home to single phase. In my Country it’s cheaper, and also more imune to current peaks that can action circuit breakers.

Edit: I remember the installer saying that the dongle was included by default in M1’s but I don’t know if this is still the case

1 Like

Thanks! I think I need 3 phase for car charger. Will check with the installer, have a great day!

1 Like

I’ve a RCT Power converter and battery. I use the command line tool rctclient to read the values from the inverter. It’s called via bash script by a cron job and submits the data to openHAB by mqtt.

A native RCT binding would be welcome :wink: .

1 Like

I wrote a binding for Growatt inverters. The PR (below) was work-in-progress for quite some time during the summer holiday, but I have had it live on my own system for a couple of days, so the PR is now ready for review.


Hi JGluch,

I am also an owner of a RCT power inverter and battery.
So I’m also interested in an easy binding for OpenHab.

I tried to implement the rctclient. But I was not successful.

Was it easy to manage? Is there a step by step guidelines to implement it with scripts an anything?

Best regards Julian

Hi Julian, it’s quite easy and runs very robust on my xubuntu based machine.
I’ve an pv.items file that contains all related items like:

Number:Power PV_Input_A_Watt "solar power [%.1f W]" (gWatt, gWattChart, gPV) { channel="mqtt:topic:solar:PV_Input_A_Watt", unit="W"}

and the MQTT things are defined like (some with tranformations to get the desired format/scale):

Thing mqtt:topic:solar "Solaranlage" (mqtt:broker:mqttBroker) {
        // Monitoring/PV/Current
        Type number : PV_Input_A_Volt "Input A in Volt" [ stateTopic="solar/B55BA2CE" ]
        Type number : PV_Input_A_Watt "Input A in Watt" [ stateTopic="solar/DB11855B", transformationPattern="JS:| parseFloat(input) * 1" ]

and the MQTT messages come from the following script:

RctId="959930BF B55BA2CE DB11855B DB2D69AE A7FA5C5D 8B9FF008 959930BF 400F015B 4BC0F974 902AFAFB 1AC87AA0 91617C58 2AE703F2 3C87C4F5 867DEF7D 2F3C1D7D 81AE960B 65B624AB 126ABC86 F0BE6429"
# Iterate the string variable using for loop
for val in $RctId; do
 RctVal=$(/home/XXX/.venvs/MyEnv/bin/rctclient read-value --host $RctIP --id 0x$val)
 # RctVal=$(rctclient read-value --host $RctIP --id 0x$val)
 mosquitto_pub -h "192.168.1.YY" -u "mqtt" -P "myMQTTpassword" -t "solar/$val" -m "$RctVal"

which runs every minute by a cron job:

sudo crontab -e
* * * * * openhab /pathtothescript/pv2mqtt.sh

The script calls the rctclient script, that I managed to install with these commands:

mkdir -p $HOME/.venvs
python3 -m venv ~/.venvs/MyEnv
cd ~/.venvs/MyEnv/
~/.venvs/MyEnv/bin/python  --version
~/.venvs/MyEnv/bin/python -m pip install ~/Downloads/python-rctclient-0.0.4.tar.gz 
~/.venvs/MyEnv/bin/python -m pip install ~/Downloads/click-8.1.7.tar.gz

After install, you can check if it works by calling it on the command line to get the battery state of charge

~/.venvs/MyEnv/bin/rctclient rctclient read-value --host 192.168.1.XX --id 0x959930BF

The content of the different hex values is documented in the file that you have linked before.