JanJaapKo / domoticz-GoodWeSEMS

Domoticz GoodWe Solar Inverter plugin (SEMS API)
http://www.domoticz.com/forum/viewtopic.php?f=65&t=28983
MIT License
6 stars 4 forks source link

Some error's in the log #21

Closed mariusklop closed 1 year ago

mariusklop commented 1 year ago

first thank you for making the plugin

i have already install the plugin and it works. but it is not perfect i have some error's in the log and no input power and voltage ad string 2, the rest is working perfect. I can not find the issue maby can annyboddy help me.

the error's in the log: Error: Zonnepanelen: Call to function 'onHeartbeat' failed, exception details: Error: Zonnepanelen: Traceback (most recent call last): Error: Zonnepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 483, in onHeartbeat Error: Zonnepanelen: _plugin.onHeartbeat() Error: Zonnepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 408, in onHeartbeat Error: Zonnepanelen: self.startDeviceUpdateV2() Error: Zonnepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 125, in startDeviceUpdateV2 Error: Zonnepanelen: self.updateDevices(DeviceData) Error: Zonnepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 155, in updateDevices Error: Zonnepanelen: newCounter = calculateNewEnergy(theInverter.inputPower1Unit, inputPower) Error: Zonnepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 432, in calculateNewEnergy Error: Zonnepanelen: previousPower = previousPower.replace("w","").replace("W","") Error: Zonnepanelen: AttributeError: 'int' object has no attribute 'replace'

domoticz version 2022.2 python version 3.9.2

JanJaapKo commented 1 year ago

That is odd, they work perfectly on my side. What is going wrong is trying to take out a letter of a number, which obviously doesn't work. Just pushed a fix.

mariusklop commented 1 year ago

yes i understand and that is strainge. i kown the problem is one mine side. what i understand in the software is he take a letter en from string 1 everything is working. but string2 is the problem. is it maby posible that i have not the correct domoticz version or python of somthing? (im not a specialist in this problems)

JanJaapKo commented 1 year ago

I created a fix for this 2 days ago, did you try that already?

mariusklop commented 1 year ago

i have update it already it did not work. a few seconds ago i have instal the plugin again and it also not help.

JanJaapKo commented 1 year ago

Then please add logging, so I can see if something ha changed. Preferably with debug logging enabled

mariusklop commented 1 year ago

Is this what you mean?

2023-01-14 10:34:01.586 Status: Zonepanelen: Entering work loop.
2023-01-14 10:34:01.587 Status: Zonepanelen: Started.
2023-01-14 10:34:02.702 Zonepanelen: Debug logging mask set to: PYTHON
2023-01-14 10:34:02.702 Zonepanelen: Parameters count: 25
2023-01-14 10:34:02.702 Zonepanelen: Parameter: 'HardwareID':'36'
2023-01-14 10:34:02.702 Zonepanelen: Parameter: 'HomeFolder':'/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/'
2023-01-14 10:34:02.702 Zonepanelen: Parameter: 'StartupFolder':'/home/pi/domoticz/'
2023-01-14 10:34:02.702 Zonepanelen: Parameter: 'UserDataFolder':'/home/pi/domoticz/'
2023-01-14 10:34:02.702 Zonepanelen: Parameter: 'Database':'/home/pi/domoticz/domoticz.db'
2023-01-14 10:34:02.702 Zonepanelen: Parameter: 'Language':'nl'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Version':'3.0.1'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Author':'Jan-Jaap Kostelijk'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Name':'Zonepanelen'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Address':'www.semsportal.com'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Port':'443'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Username':'***********@outlook.com'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Password':'*******'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Key':'GoodWeSEMS'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Mode1':'********-****-****-****-************'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Mode2':'6'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'Mode6':'Debug'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'DomoticzVersion':'2022.2'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'DomoticzHash':'eea9db734'
2023-01-14 10:34:02.703 Zonepanelen: Parameter: 'DomoticzBuildTime':'2022-11-05 13:05:35'
2023-01-14 10:34:02.703 Zonepanelen: Device count: 18
2023-01-14 10:34:02.703 Zonepanelen: Device: 1 - ID: 1929, Name: 'Zonepanelen - Inverter temperature (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 2 - ID: 1930, Name: 'Zonepanelen - Inverter output current (SN: 53000DSN223W0725)', nValue: 0, sValue: '0A'
2023-01-14 10:34:02.703 Zonepanelen: Device: 3 - ID: 1931, Name: 'Zonepanelen - Inverter output voltage (SN: 53000DSN223W0725)', nValue: 0, sValue: '226.5V'
2023-01-14 10:34:02.703 Zonepanelen: Device: 4 - ID: 1932, Name: 'Zonepanelen - Inverter output power (SN: 53000DSN223W0725)', nValue: 0, sValue: '0W;8200.0'
2023-01-14 10:34:02.703 Zonepanelen: Device: 5 - ID: 1934, Name: 'Zonepanelen - Inverter input 1 voltage (SN: 53000DSN223W0725)', nValue: 0, sValue: '139.4V'
2023-01-14 10:34:02.703 Zonepanelen: Device: 6 - ID: 1935, Name: 'Zonepanelen - Inverter input 1 Current (SN: 53000DSN223W0725)', nValue: 0, sValue: '0A'
2023-01-14 10:34:02.703 Zonepanelen: Device: 7 - ID: 1937, Name: 'Zonepanelen - Inverter input 2 voltage (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 8 - ID: 1938, Name: 'Zonepanelen - Inverter input 2 Current (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 9 - ID: 1933, Name: 'Zonepanelen - Inverter state (SN: 53000DSN223W0725)', nValue: 1, sValue: '20'
2023-01-14 10:34:02.703 Zonepanelen: Device: 10 - ID: 1939, Name: 'Zonepanelen - Inverter input 3 voltage (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 11 - ID: 1940, Name: 'Zonepanelen - Inverter input 3 Current (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 12 - ID: 1941, Name: 'Zonepanelen - Inverter input 4 voltage (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 13 - ID: 1942, Name: 'Zonepanelen - Inverter input 4 Current (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 14 - ID: 1936, Name: 'Zonepanelen - Inverter input 1 power (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 15 - ID: 1943, Name: 'Zonepanelen - Inverter input 2 power (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 16 - ID: 1944, Name: 'Zonepanelen - Inverter input 3 power (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 17 - ID: 1945, Name: 'Zonepanelen - Inverter input 4 power (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.703 Zonepanelen: Device: 18 - ID: 1946, Name: 'Zonepanelen - Inverter output frequency 1 (SN: 53000DSN223W0725)', nValue: 0, sValue: ''
2023-01-14 10:34:02.697 Status: Zonepanelen: Initialized version 3.0.1, author 'Jan-Jaap Kostelijk'
2023-01-14 10:34:02.702 Status: Zonepanelen: Starting Goodwe SEMS API plugin, logging to file goodwe.log

2023-01-14 10:34:03.705 Zonepanelen: create station with id: '019b000d-0262-480f-9d90-b2b39df16d01' and inverters: 1
2023-01-14 10:34:03.706 Zonepanelen: inverter created: '53000DSN223W0725'
2023-01-14 10:34:03.706 Zonepanelen: PowerStation created: '019b000d-0262-480f-9d90-b2b39df16d01'
2023-01-14 10:34:03.706 Zonepanelen: Status of GoodWe inverter (SN: 53000DSN223W0725): '0 waiting'
2023-01-14 10:34:03.769 Error: Zonepanelen: Call to function 'onStart' failed, exception details:
2023-01-14 10:34:03.773 Error: Zonepanelen: Traceback (most recent call last):
2023-01-14 10:34:03.773 Error: Zonepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 455, in onStart
2023-01-14 10:34:03.773 Error: Zonepanelen: _plugin.onStart()
2023-01-14 10:34:03.773 Error: Zonepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 211, in onStart
2023-01-14 10:34:03.773 Error: Zonepanelen: self.startDeviceUpdateV2()
2023-01-14 10:34:03.773 Error: Zonepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 125, in startDeviceUpdateV2
2023-01-14 10:34:03.773 Error: Zonepanelen: self.updateDevices(DeviceData)
2023-01-14 10:34:03.773 Error: Zonepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 155, in updateDevices
2023-01-14 10:34:03.773 Error: Zonepanelen: newCounter = calculateNewEnergy(theInverter.inputPower1Unit, inputPower)
2023-01-14 10:34:03.773 Error: Zonepanelen: File "/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py", line 432, in calculateNewEnergy
2023-01-14 10:34:03.773 Error: Zonepanelen: previousPower = previousPower.replace("w","").replace("W","")
2023-01-14 10:34:03.773 Error: Zonepanelen: AttributeError: 'int' object has no attribute 'replace'

i have the log from starting. the last alinia is when it goning wrong. en i wil see the error every 10 seconds in the log the refeshing time of the plugin is every 1minut.

i hope that you can fint what the isue is.

JanJaapKo commented 1 year ago

You have to get the latest version there I tried to fix it. Error is indicated on line 432, which is where I placed the fix, but I do not see the updated line here.

mariusklop commented 1 year ago

sorry i have update it it did not help en complet reinstal the seem error.

yes i understand the error line but i don't understand what the isue is

JanJaapKo commented 1 year ago

OK, my bad I pushed the change into another branch. It is now in master, can you pull again?

mariusklop commented 1 year ago

that looks good. he is updating now inverter string 1 and 2 and inverter input power. there is 1 error in the log right now mayby because the inverter is offline

Error: zonnepanelen: RequestException: HTTPSConnectionPool(host='eu.semsportal.com', port=443): Read timed out. (read timeout=10)

JanJaapKo commented 1 year ago

That time out just happens from time to time, nothing to worry about.