TimSoethout / goodwe-sems-home-assistant

Sensor for Home Assistant pulling data from the GoodWe SEMS API for solar panel production metrics.
89 stars 38 forks source link

Error while setting up sems platform for sensor #88

Closed reindruu closed 1 year ago

reindruu commented 1 year ago

Hi, I'm using the GoodWe SEMS PV API for more than a year now. Suddenly last night the API stopped working. I tried the usual things such as reboot, restart, reload etc. The error in the Home Assistant Core is:

Error while setting up sems platform for sensor Traceback (most recent call last): File "/config/custom_components/sems/sensor.py", line 57, in async_update_data inverters = result["inverter"]


TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 293, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 248, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/sems/sensor.py", line 97, in async_update_data
    raise UpdateFailed(f"Error communicating with API: {err}")
homeassistant.helpers.update_coordinator.UpdateFailed: Error communicating with API: 'NoneType' object is not subscriptable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/sems/sensor.py", line 118, in async_setup_entry
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 264, in async_config_entry_first_refresh
    raise ex
homeassistant.exceptions.ConfigEntryNotReady: Error communicating with API: 'NoneType' object is not subscriptable

Can someone help?

cthulu commented 1 year ago

+1 same here unfortunately :(

reindruu commented 1 year ago

And 15 hours later it works again. During those 15 hours the SEMS portal site was reachable normal. On my network and also outside. I think GoodWe had some maintenance again. They have maintenance a lot, but then the SEMS portal has also problems. If it happens again I will ask GoodWe support. I do not expect anything, but who knows...... I will close this tomorrow, maybe someone wants to add something.

cthulu commented 1 year ago

Yeah it works for me as well now. Strange

On Wed, 27 Sep 2023 at 18:30, reindruu @.***> wrote:

And 15 hours later it works again. During those 15 hours the SEMS portal site was reachable normal. On my network and also outside. I think GoodWe had some maintenance again. They have maintenance a lot, but then the SEMS portal has also problems. If it happens again I will ask GoodWe support. I do not expect anything, but who knows...... I will close this tomorrow, maybe someone wants to add something.

— Reply to this email directly, view it on GitHub https://github.com/TimSoethout/goodwe-sems-home-assistant/issues/88#issuecomment-1737725004, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI7OEFI4GKTV46SO3QZVVDX4RIAVANCNFSM6AAAAAA5JFEL3M . You are receiving this because you commented.Message ID: @.***>

reindruu commented 1 year ago

Closed because suddenly solved....