Page 12 of 13
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Saturday 11 March 2023 13:53
by MikeyMan
I'm getting the same error now:
Code: Select all
Goodwe SEMS: TokenRequestException: HTTPSConnectionPool(host='www.semsportal.com', port=443): Read timed out. (read timeout=10)
Any known issues?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 12 March 2023 11:16
by JanJaap
The read time outs in general are a known issue, see the Github page. The server did not respond for a configurable (which I set to 10 seconds) amount of time. I made the plugin such that it will retry 3 times and if it did not succeed, then it will throw an error like 'too many retries'. After which it will try again at the next polling interval. So nothing to worry about. And nothing I can fix either.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 13 March 2023 21:18
by MikeyMan
Ok, no worries... In general it's working fine!
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 26 September 2023 15:00
by JanJaap
I'll check it our ASAP. Can you create an issue in Github and add log file with debug logging enabled? Probably the information received from SEMS Portal does not fit the expected format anymore
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 26 November 2023 17:28
by erpi1962
Hi JanJaap,
Installed your latest (V4) plugin on Domoticz 2023 running in Docker. Hardware created without error, but no Devices appear.
Looking at the log the message is: Error: Zonnepanelen: KeyError: '95000.........9'
Any idea what I am doing wrong? The key is correct and I can log in to the portal and get data with the username/password/ID
Thanks, Erwin
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 28 November 2023 22:25
by provedance
Why is it when i install the Goodwe sems api pugin an other plugin (CRONBEE) is not working anymore and this plugin complains that there is no requests library ? and i should pip install or pip3 install requests again. (this gives an error also)
When i deinstall the SEMS API plugin the other one is working again.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 28 November 2023 22:31
by JanJaap
@erpi, did you follow the upgrade instructions to exchange the old key with the serial number of the inverter? Please post some loglines....
@provedance it is hard to say. Normally, these plugins are quite well separated from each other by the plugin framework. Normally, also the dependencies (the libraries you have to install) should not bite each other. Also for you: hard to say anything without logging. Btw normally it is pip3 install.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 03 December 2023 16:11
by Zeil
Hallo,
I'am a new user to Domoticz and the whole Pi scene. I managed to put up a pi with Domoticz and Zigbee2MQTT.
Now i'm trying to add my Goodwe 2500-ns to Domoticz. I've installed your plugin and get the following errors;
2023-12-03 15:59:30,485 Error: Zonnepanelen: Call to function 'onHeartbeat' failed, exception details:
2023-12-03 15:59:30,486 Error: Zonnepanelen: Traceback (most recent call last):
2023-12-03 15:59:30,486 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin,py", line 648, in onHeartbeat
2023-12-03 15:59:30,486 Error: Zonnepanelen: _plugin,onHeartbeat()
2023-12-03 15:59:30,486 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin,py", line 538, in onHeartbeat
2023-12-03 15:59:30,486 Error: Zonnepanelen: self,startDeviceUpdateV2()
2023-12-03 15:59:30,486 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin,py", line 150, in startDeviceUpdateV2
2023-12-03 15:59:30,486 Error: Zonnepanelen: self,updateDevices(DeviceData)
2023-12-03 15:59:30,486 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin,py", line 158, in updateDevices
2023-12-03 15:59:30,486 Error: Zonnepanelen: self,createDevices(inverter["sn"])
2023-12-03 15:59:30,486 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin,py", line 217, in createDevices
2023-12-03 15:59:30,486 Error: Zonnepanelen: numDevs = len(Devices[serialNumber].Units)
2023-12-03 15:59:30,486 Error: Zonnepanelen: KeyError: '12500NSU15300047'
Can you tell me what this means or what i'm doing wrong?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 03 December 2023 21:08
by JanJaap
it is a bit hard to say like this, I'd need some more logging.
Questions:
1) do you recognize the serial number 12500NSU15300047 from your SEMS portal?
2) when looking in th devices page of domoticz, are there any devices created for your solar panels?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 03 December 2023 21:40
by Zeil
1. Serial number is the right one.
2. There are no devices are visible
some other logs..
2023-12-01 15:27:09,162 Status: Zonnepanelen: Entering work loop.
2023-12-01 15:27:09,162 Status: Zonnepanelen: Started.
2023-12-01 15:27:11,180 Status: Zonnepanelen: Initialized version 4,0,0, author 'Jan-Jaap Kostelijk'
2023-12-01 15:27:11,184 Status: Zonnepanelen: Starting Goodwe SEMS API plugin, logging to file goodwe Zonnepanelen,log
2023-12-01 15:33:50,922 Status: Zonnepanelen: Stop directive received.
2023-12-01 15:33:50,999 Status: Zonnepanelen: Exiting work loop.
2023-12-01 15:33:51,023 Status: Zonnepanelen: Stopping threads.
2023-12-01 15:33:51,023 Status: Zonnepanelen: Stopped.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 03 December 2023 21:54
by JanJaap
could you switch debug logging on and look for relevant statements in the mentioned logfile (you might need to change ownership with sudo chown if you want to download it)
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 04 December 2023 9:48
by Zeil
Thanks for putting time and energy in my problem. (Noob mode activated) Can you tell me how i switch debug mode on? And do the rest you mentioned!
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 04 December 2023 14:00
by waltervl
See in your screenshot a few posts back the bottom parameter:
Log Level: Normaal
This can be switched to Debug.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 04 December 2023 16:39
by Zeil
I've switched the the log level from normal to debug. Where can i find this debug?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 04 December 2023 17:57
by waltervl
In your normal Domoticz log (menu setup - log) you find now more logging regarding this plugin.
You also have to press on update after you have changed the value.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 04 December 2023 18:42
by Zeil
This is what the log spits out
2023-12-04 18:35:32.826 Zonnepanelen: Worker thread started.
2023-12-04 18:35:32.826 Status: Zonnepanelen: Entering work loop.
2023-12-04 18:35:32.826 Status: Zonnepanelen: Started.
2023-12-04 18:35:33.780 Zonnepanelen: Debug logging mask set to: PYTHON
2023-12-04 18:35:33.781 Zonnepanelen: Parameters count: 25
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'HardwareID':'5'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'HomeFolder':'/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'StartupFolder':'/home/jon/domoticz/'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'UserDataFolder':'/home/jon/domoticz/'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Database':'/home/jon/domoticz/domoticz.db'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Language':'nl'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Version':'4.0.0'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Author':'Jan-Jaap Kostelijk'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Name':'Zonnepanelen'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Address':'www.semsportal.com'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Port':'443'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Username':'****************.com'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Password':'****************'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Key':'GoodWeSEMS'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Mode1':'ab9******************************18'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Mode2':'90'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'Mode6':'Debug'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'DomoticzVersion':'2023.2'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'DomoticzHash':'19efd039c'
2023-12-04 18:35:33.781 Zonnepanelen: Parameter: 'DomoticzBuildTime':'2023-07-21 17:23:44'
2023-12-04 18:35:33.781 Zonnepanelen: Device count: 0
2023-12-04 18:35:33.783 Zonnepanelen: Starting version: 4.0.0
2023-12-04 18:35:33.777 Status: Zonnepanelen: Initialized version 4.0.0, author 'Jan-Jaap Kostelijk'
2023-12-04 18:35:33.781 Status: Zonnepanelen: Starting Goodwe SEMS API plugin, logging to file goodwe Zonnepanelen.log
2023-12-04 18:35:36.229 Error: Zonnepanelen: Call to function 'onStart' failed, exception details:
2023-12-04 18:35:36.244 Error: Zonnepanelen: Traceback (most recent call last):
2023-12-04 18:35:36.244 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 620, in onStart
2023-12-04 18:35:36.244 Error: Zonnepanelen: _plugin.onStart()
2023-12-04 18:35:36.244 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 337, in onStart
2023-12-04 18:35:36.244 Error: Zonnepanelen: self.startDeviceUpdateV2()
2023-12-04 18:35:36.244 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 150, in startDeviceUpdateV2
2023-12-04 18:35:36.244 Error: Zonnepanelen: self.updateDevices(DeviceData)
2023-12-04 18:35:36.244 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 158, in updateDevices
2023-12-04 18:35:36.244 Error: Zonnepanelen: self.createDevices(inverter["sn"])
2023-12-04 18:35:36.244 Error: Zonnepanelen: File "/home/jon/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 217, in createDevices
2023-12-04 18:35:36.244 Error: Zonnepanelen: numDevs = len(Devices[serialNumber].Units)
2023-12-04 18:35:36.244 Error: Zonnepanelen: KeyError: '12500NSU15300047'
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 11 December 2023 23:46
by erpi1962
JanJaap wrote: ↑Tuesday 28 November 2023 22:31
@erpi, did you follow the upgrade instructions to exchange the old key with the serial number of the inverter? Please post some loglines....
JanJaap, My errors are EXACTLY the same as @Zeil posted. From my debugging, it seems the plugin breaks because of the new format that Domoticz expects for JSON commands (which seem to result from the python code). CreateDevices uses Devices call which must be GetDevices now...
Answer to your question: It was a fresh install so no database upgrade needed.
Erwin
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 12 December 2023 9:28
by JanJaap
Hey,
I pushed a change a couple of days ago, this should fix it (Apparently I never properly tested a clean install). I think it should work now. I just struggle because I apparently messed up the database, therefore cannot test anything new until I solved that.......
Btw logging is placed in separate log file in the Domoticz directory on your RPi. The name of the file is displayed in the domoticz logging, it is a combination of the plugin name (goodwe) and the name you gave the hardware (probably zonnepanelen) so would be "goodwe zonnepanelen.log"
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 12 December 2023 17:22
by erpi1962
JanJaap wrote: ↑Tuesday 12 December 2023 9:28
Hey,
I pushed a change a couple of days ago, this should fix it (Apparently I never properly tested a clean install).
Hi JanJaap, with the latest code it works for me.
Thanks!
Erwin
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 12 December 2023 19:29
by Zeil
JanJaap wrote: ↑Tuesday 12 December 2023 9:28
Hey,
I pushed a change a couple of days ago, this should fix it (Apparently I never properly tested a clean install). I think it should work now. I just struggle because I apparently messed up the database, therefore cannot test anything new until I solved that.......
Btw logging is placed in separate log file in the Domoticz directory on your RPi. The name of the file is displayed in the domoticz logging, it is a combination of the plugin name (goodwe) and the name you gave the hardware (probably zonnepanelen) so would be "goodwe zonnepanelen.log"
Did a git pull., and now under devices i see 18 hardware entries from my Goodwe inverter. At the moment it's dark outside, so no numbers to be seen. Will check again if the sun shows up.
I can find my "Goodwe zonnepanelen.log in my Domoticz directory on my Raspi. Tried to copy the file to my windows pc with SSH/Putty. No success yet.
Is there a way to see the log file through SSH? what's the command for that? And is there a way to give the user on a pi "admin" control?