macxq / foxess-ha

Home Assistant & FoxESS integration. Monitor you photovoltaic installation directly from HA ☀️ ⚡️
115 stars 37 forks source link

Unexpected error fetching FoxESS data: 'addressbook' #215

Closed krzysiek15 closed 7 months ago

krzysiek15 commented 7 months ago

image

Logger: custom_components.foxess.sensor Source: helpers/update_coordinator.py:300 Integration: foxess (documentation, issues) First occurred: 14:48:01 (1 occurrences) Last logged: 14:48:01

Unexpected error fetching FoxESS data: 'addressbook' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/foxess/sensor.py", line 144, in async_update_data if int(allData["addressbook"]["result"]["status"]) == 1 or int(allData["addressbook"]["result"]["status"]) == 2 or int(allData["addressbook"]["result"]["status"]) == 3:


KeyError: 'addressbook'

Logger: custom_components.foxess.sensor
Source: custom_components/foxess/sensor.py:273
Integration: foxess (documentation, issues)
First occurred: 14:48:01 (1 occurrences)
Last logged: 14:48:01

Unable to get Addressbook data from FoxESS Cloud

Logger: homeassistant.components.rest.data
Source: components/rest/data.py:116
Integration: RESTful (documentation, issues)
First occurred: 14:48:01 (1 occurrences)
Last logged: 14:48:01

Timeout while fetching data: https://www.foxesscloud.com/c/v0/device/addressbook?deviceID=cd4f8108-541c-4c34-9801-4d21625b8228
FozzieUK commented 7 months ago

This happens when the integration fails to connect to the Foxess cloud, it could be a break in your internet connection or a temporary failure of the Fox servers - it is a common occurrence and nothing to be concerned about unless it happens continuously.

kamiljaworski88 commented 7 months ago

Same problem here. Could you add some loops to reconnect?

FozzieUK commented 7 months ago

The OpenAPI branch version of this integration is a fairly significant re-write and it will now retry every minute and continue to retry should the cloud not be available.

You can see the OpenAPI branch from the main page, and you are welcome to try it if you want - note the changes in the readme as you have to get a personal api key from your FoxESS cloud account and also add your inverter serial number to the configuration.yaml 'platform' , this release is quite stable (more so than the version you are using).

I am just waiting on confirmation from FoxESS that their new OpenAPI is production ready and it can be released, hopefully this will be very soon.