syrhus / solax_inverter

Domoticz plugin for Solax inverters
1 stars 0 forks source link

Call to function 'onStart' failed #8

Closed vivienkit closed 1 year ago

vivienkit commented 1 year ago

Hi Since a few day, plugin does not start. Could you help resolve this ? Please find the log below :

2022-12-20 15:19:21.959 Error: PV Maison: Call to function 'onStart' failed, exception details:
2022-12-20 15:19:21.972 Error: PV Maison: Traceback (most recent call last):
2022-12-20 15:19:21.979 Error: PV Maison: File "/home/pi/domoticz/plugins/solax_inverter/plugin.py", line 255, in onStart
2022-12-20 15:19:21.979 Error: PV Maison: _plugin.onStart()
2022-12-20 15:19:21.980 Error: PV Maison: File "/home/pi/domoticz/plugins/solax_inverter/plugin.py", line 92, in onStart
2022-12-20 15:19:21.980 Error: PV Maison: self.getSunset()
2022-12-20 15:19:21.980 Error: PV Maison: File "/home/pi/domoticz/plugins/solax_inverter/plugin.py", line 125, in getSunset
2022-12-20 15:19:21.980 Error: PV Maison: self.sunrise = datetime.time(hour=int(dJson['Sunrise'].split(':')[0]),minute=int(dJson['Sunrise'].split(':')[1]),second=0)
2022-12-20 15:19:21.980 Error: PV Maison: TypeError: 'NoneType' object is not subscriptable

Did Solax change something in their API ? it seems that the eu.solaxcloud.com:8443 is not always reachable. I tried to modify the url in the plugin to go to https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=[...] which work in my browser but still the same from the plugin.

Thanks!

syrhus commented 1 year ago

Did you enter you local IP address in the configuration? If it failed on sunrise, it means the code is not able to reach domoticz instance to get sunset and sunrise time.

vivienkit commented 1 year ago

yes, localhost on port 80, I tried 127.0.0.1 as well, same errors

syrhus commented 1 year ago

Port 80? did you change the default configuration? By default this is 8080 for domoticz

vivienkit commented 1 year ago

Yes I did change it to 80

syrhus commented 1 year ago

did you try to enter the following URL: http://127.0.0.1:80/json.htm?type=command&param=getSunRiseSet

If this is your Domoticz IP Address with the good port, it should work, else, you have a configuration issue

vivienkit commented 1 year ago

ok got it ! your url didn't because I put an authentication to access the web server and misconfigured the local network. Thanks a lot for your help !