sure: You need the goodwe library installed (see first post).
But maybe in your case that failed as newer debian versions prevent the direct installation in order to avoid problems with other dependencies.
I went the short way and installed with
sudo pip3 install goodwe --break-system-packages
and
pip3 install paho-mqtt --break-system-packages
I don’t think that this will cause any problems for my system (only openhab) but if somebody has an easy but more elegant or correct solution please tell us.
I downloaded the python library and made the goodwetest.py script.
I am not sure were to place it. I am on OH 4.1.1 on a Raspberry 3. I made the file access via samba. I tried:
\…\openHAB-conf\scripts
and
\…\openHAB-userdata\etc\scripts
None of these places work.
The error message in openhabian via putty is:
python3: can’t open file ‘/home/openhabian/goodwetest.py’: [Errno 2] No such file or directory
Apparently python3 looks in your home directory. Before you execute the script, you should go to the correct directory and then execute it:
cd /etc/openhab/scripts
python3 goodwetest.py
Or you can put it in your home directory and execute it without changing directories. But the definitive files goodwejson.py and goodwe.sh must be placed in /etc/openhab/scripts.
/etc/openhab/scripts/goodwe.sh: line 2: $‘\r’: command not found
/etc/openhab/scripts/goodwe.sh: line 4: $‘\r’: command not found
/etc/openhab/scripts/goodwe.sh: line 2: $‘\r’: command not found
/etc/openhab/scripts/goodwe.sh: line 4: $‘\r’: command not found
The goodwe.sh is copied and pasted as given in the first post. I just re-did it and saved it in UFT-8 format. The error message is still there. This error is issued three times and then all the values come in formated style.
Can anyone spot the issue? What do I need to change?
One remark for items definition. Some of the items defined are not energy but power. E.g. for Number:Power zpActivePower “zpActivePower [%.0f W]”
That makes the difference in the items overview. Otherwise there the wrong unit kWh instead of W is shown. When you click into the item the unit is always as defined in “[” “]”.
For information: I changed a little my above script and the things-file:
remove loop from python-script so that only openhab loops
increase looping delay to 180sec, because polling more often breaks the connection of the inverter to the sems-portal. (The critical time seems to be different for different models)
hello guys, I was just on the way to set up openhabian and connect it to Goodwe inverter with battery. Nice work done already acording to that thread. But I did not saw anyone to also send some commands to inverter… Anybody tried for example set up export limit? Or force charging battery?