Python Plugin: GoodWe solar inverter via SEMS API

Python and python framework

Moderator: leecollings

OOge
Posts: 4
Joined: Saturday 14 March 2020 15:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by OOge »

I already updated like you said.

This is my output.

pi@raspberrypi:~/domoticz/plugins/domoticz-GoodWeSEMS $ git pull https://github.com/JanJaapKo/domoticz-GoodWeSEMS
From https://github.com/JanJaapKo/domoticz-GoodWeSEMS
* branch HEAD -> FETCH_HEAD
Already up to date.

https://eu.semsportal.com/powerstation/ ... 52895bc931

Code: Select all

Enabled:	
Name:	
Zonnepanelen
Type: Goodwe Interver via SEMS API	
Data Timeout:	disabled
Specifying a Data Timeout will restart the hardware device if no data is received for the specified time.
Do not enable this option for devices that do not receive data!
GoodWe inverter (via SEMS portal)

SEMS Server:	
SEMS API Port:	
443
E-Mail address:	
*******
Password:	
••••••••
Power Station ID (Optional):	
858f9c60-ba99-471f-851f-df52895bc931
Refresh interval:	30
Log level:	debug
JanJaap
Posts: 191
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by JanJaap »

Hi,

I reproduced the issue and created a bug, please follow that one for more progress:
issue 10

By the way did you check what happened when not providing the station ID? do you have more than 1 inverter in this station? I am also curious what would happen then......
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
OOge
Posts: 4
Joined: Saturday 14 March 2020 15:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by OOge »

I have my family inverters in the portal.
When not using the station ID 205 devices get installed.
Funny thing is that only my inverter (1 out of 4) is being picked up.
It looks like they are all duplicates. They show the same S/N. No idea if it is the same issue. Do you want me to send you a log of those 205 devices :)
JanJaap
Posts: 191
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by JanJaap »

Hi OOge,

I updated the plugin to also work with an entered station ID, can you please check if it works? Feedback appreciated in GitHub.

The, yes, I'd love to see how this works. Do you have more than 1 power station in 1 account or more than 1 inverter on a powerstation? Please add the logs as a file. Please read the below on setting the logfile location, that may be easier than copy paste from the log window.

Check the domoticz service config:
/etc/init.d/domoticz.sh
for the logfile location (by default logging to file is not enabled, remove # on the line with

Code: Select all

DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
JanJaap
Posts: 191
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by JanJaap »

Dear all,

The version by the original author, Dylian, seems not to be maintained anymore. I have taken over maintenance, please get an up to date version by:

initial install:
cd domoticz/plugins
git clone https://github.com/janjaapko/domoticz-GoodWeSEMS.git

Update:
cd domoticz/plugins
cd domoticz-GoodWeSEMS
git pull

When updating from the original version:
cd domoticz/plugins/domoticz-GoodWeSEMS
git pull https://github.com/janjaapko/domoticz-GoodWeSEMS

I could not update the wiki page with plugins since I could not create an account.....
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
vinjon
Posts: 7
Joined: Tuesday 24 March 2020 9:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by vinjon »

Hi,

I can see all devices , but in the power device in my utility view I don't see Total generated kWh (only actual Power and today generated)

Total generated energy is visible in the device configuration:

GoodWe Inverter 00190004 4 Solar Power L2 General kWh 54.800 kWh

any clues?
JanJaap
Posts: 191
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by JanJaap »

Yes: intended behavior of domoticz.....
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
bldewit
Posts: 59
Joined: Tuesday 09 May 2017 23:31
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by bldewit »

Today I upgraded from the original Dylian-commit to this one. So I guess I am using the latest commit.

Now I get the following errors in my log:

2020-04-07 16:00:11.135 Error: (Zonnepanelen direct) 'onMessage' failed 'TypeError':'Can't convert 'NoneType' object to str implicitly'.
2020-04-07 16:00:11.136 Error: (Zonnepanelen direct) ----> Line 365 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onMessage
2020-04-07 16:00:11.136 Error: (Zonnepanelen direct) ----> Line 206 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onMessage
2020-04-07 16:00:11.136 Error: (Zonnepanelen direct) ----> Line 241 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/GoodWe.py', function createStation
2020-04-07 16:00:11.136 Error: (Zonnepanelen direct) ----> Line 181 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/GoodWe.py', function __init__
2020-04-07 16:00:11.136 Error: (Zonnepanelen direct) ----> Line 76 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/GoodWe.py', function __repr__

No devices have been created.
What could be wrong?
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
JanJaap
Posts: 191
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by JanJaap »

Hi,

You were not on the latest since I did not merge that one yet. I have now version 1.2.5 merged which should fix this issue (more users reported it). Please let me know if it worked.

Btw when in doubt of correct version enter:

Code: Select all

cd domoticz/plugins/domoticz-GoodWeSEMS
git status
Should report something like:

Code: Select all

On branch master
Your branch is up to date with 'origin/master'.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
bldewit
Posts: 59
Joined: Tuesday 09 May 2017 23:31
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by bldewit »

"After some doings" (na wat gedoe ) it is now working properly (don't backup your plugin directory within your plugin directory!). Nice! Just some log messages about truncated streams...

Verstuurd vanaf mijn SM-T590 met Tapatalk


Last edited by bldewit on Thursday 09 April 2020 20:08, edited 1 time in total.
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Moonbase
Posts: 1
Joined: Sunday 03 May 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by Moonbase »

I installed the latest plugin. Works like a charm! :D

i do have a powerplant with 2 inverters and every seperate inverter data is displayed correct. It would be a nice add-on though if it was possible to display the total of the 2 inverters. I can't see/find how to do this. Is this possible at all?
Wiljums
Posts: 28
Joined: Sunday 11 February 2018 21:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by Wiljums »

If I set refresh interval to 10 sec. the data only changes once per minute. Is that a limitation of the Sems portal?
Wiljums
Posts: 28
Joined: Sunday 11 February 2018 21:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by Wiljums »

And I get the following error, which is related to this plugin (chaning the refresh interval, also changes the interval of the error):

Image

What is causing this?
JanJaap
Posts: 191
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by JanJaap »

Hi Wiljums,

I browsed a bit though the Web GUI of SEMS portal but could not find anything about their refresh rate. Bit once a minute would make sense. Personally I have set the refresh to 5 minutes which is enough to keep track of the performance for me. Please mind that the plugin connects to the SEMS portal on the internet, not directly to your inverter. So fo a 10 second refresh, SEMS needs to fetch data from your inverter, store it in their database and then the plugin needs to get it back. Lots of traffic there.

Then second question: I do not use this data push mechanism so can't help you with that. I propose to keep track of that in your other topic: https://www.domoticz.com/forum/viewtopi ... =6&t=32577. The plugin 'just' registers the data in Domoticz. What the data push is doing should not relate to the plugin. Perhaps you configured pushing some data that isn't there?
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
Wiljums
Posts: 28
Joined: Sunday 11 February 2018 21:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by Wiljums »

The errors occur when domoticz tries to push the data of the 'current' devices to InfluxDB:
- Inverter output current
- Inverter input 1 Current
- Inverter input 2 Current

The other devices do not cause errors, so I think something is not ok with these devices..
JanJaap
Posts: 191
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by JanJaap »

Hi,

If you can provide me with info about what's wrong in the current I can fix it but now I have no clue.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
MeAlbert
Posts: 65
Joined: Friday 06 December 2019 14:23
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by MeAlbert »

I installed a GoodWe inverter today and the Sems portal works fine.
I added the Goodwe solar inverter via Web API in the hardware. Filled in all that was needed( Name, location and username) but nothing happens.
I check if I have the latest version and that is the case.
pi@domoticz:~/domoticz/plugins/domoticz-GoodWeSEMS $ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
I do not see any devices appearing. What should I do more or what do I do wrong?
(Also restarted Domoticz without any result.)
Get this error messages:

Code: Select all

2020-05-12 12:31:47.423 Error: GoodweAPI: Error getting http user data!
2020-05-12 12:36:48.555 Error: GoodweAPI: Error getting http user data!
2020-05-12 12:41:49.860 Error: GoodweAPI: Error getting http user data!
2020-05-12 12:44:51.302 Error: GoodweAPI: Error getting http user data!
Last edited by MeAlbert on Tuesday 12 May 2020 12:46, edited 1 time in total.
Wiljums
Posts: 28
Joined: Sunday 11 February 2018 21:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by Wiljums »

JanJaap wrote:Hi,

If you can provide me with info about what's wrong in the current I can fix it but now I have no clue.
The only information I have is the log info posted earlier.

Verstuurd vanaf mijn SM-G950F met Tapatalk

MeAlbert
Posts: 65
Joined: Friday 06 December 2019 14:23
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by MeAlbert »

Sorry. Found the right hardware in Domoticz. Now I get devices and see power etc.
Looks like it works fine now. If not I will get here again.
Thanks.
PS do you get the information from the SEMS portal? To get it directly out of the inverter would be nicer. I do it with my Hosola inverter.
JanJaap
Posts: 191
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by JanJaap »

@wiljums,

As far as I can see, I don't think it is an issue with the plugin but with the datapush system. I googled a bit and found some topics on tweakers (guess you're Dutch too): Tweakers and I found this topic deep down in Domoticz forum: Current (ampere) does not push to InfluxDB

Further, I tried adding the 'current' devices to the Influxx data push but did not run into errors (I do not actually push as I do not have anything setup so that may be the difference):
datapush configure.png
datapush configure.png (65.05 KiB) Viewed 2349 times
Do you push current values from other data sources as well? If so, are there any differences to the data structure?

@MeAlbert I spent quite some time in Google, apparently there are 2 ways to get the data from the inverter:
1. via the web portal (which is indeed indirect but relatively easy)
2. via connection to the RS485 port, which requires some more hardware hacking (see for instance https://github.com/jantenhove/GoodWeLogger)

So I chose the first option but maybe go for the second if I have a lot of spare time and feel like hardware hacking......
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest