MorneSaunders360 / Solar-Sunsynk

Monitor your energy generation, storage, and usage data using an unofficial API from Sunsynk
MIT License
9 stars 2 forks source link

1.0.8 fails to start #15

Closed freaksdotcom closed 2 months ago

freaksdotcom commented 2 months ago

HA reports that 1.0.8 fails to setup.

Reverting to 1.0.6 fixes the problem.

From the logs:

2024-04-09 09:03:32.160 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Calling get_plant_data with args: ()
2024-04-09 09:03:32.160 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Error while getting plant data: 'NoneType' object is not subscriptable
2024-04-09 09:03:32.160 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data
for invertor in jsondata:
TypeError: 'NoneType' object is not iterable
MorneSaunders360 commented 2 months ago

Hi

Apologies for the integration not starting up. Can you provide me with a bit more detail? Example can you uninstall the integration and reinstall version 1.0.6 and while you are busy with the setup what region you were using? (I know Sunsynk has move all of the solar systems for region 2) If you are using version 1.0.6 uninstall it and download v1.0.8 and run the setup and if you get any errors please provide those logs as well.

Verion v1.0.8 does have a few breaking changes where we have removed the regions selector and only using region 2 since the cross over to the new region

freaksdotcom commented 2 months ago

I'm using the integration with a Sol-Ark 15K, not a Sunsynk. It was set up using region 1.

MorneSaunders360 commented 2 months ago

Ahh okay, that makes more sense now, I wrote this integration for Sunsynk exclusively. I can however add an extra check box that will allow for other solar systems that is using region 1.

MorneSaunders360 commented 2 months ago

Okay, I added two regions called Sunsynk and PowerView, you can safely update to v1.0.10

freaksdotcom commented 2 months ago

Thank you! It appears to be working.