macxq / foxess-ha

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

Data pull working and stopping at some point #81

Open ViNYLeq opened 2 years ago

ViNYLeq commented 2 years ago

Hello, I'm quite fresh user of this integration but having big issues while using. Integration is working but very often stops pulling the data. Debug mode on and some log entries below. Please help!

Logger: custom_components.foxess.sensor Source: custom_components/foxess/sensor.py:143 Integration: foxess (documentation, issues) First occurred: 04:29:32 (46 occurrences) Last logged: 14:44:48

Unexpected error fetching FoxESS data: 'addressbook' Unexpected error fetching FoxESS data: 'NoneType' object is not subscriptable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data return await self.update_method() File "/config/custom_components/foxess/sensor.py", line 143, in async_update_data if int(allData["addressbook"]["result"]["status"]) == 1: KeyError: 'addressbook'

Logger: custom_components.foxess.sensor Source: custom_components/foxess/sensor.py:139 Integration: foxess (documentation, issues) First occurred: 04:29:32 (2 occurrences) Last logged: 11:04:43

Unable to get Addressbook data from FoxESS Cloud

Logger: homeassistant.components.rest.data Source: components/rest/data.py:74 Integration: RESTful (documentation, issues) First occurred: 11:04:43 (1 occurrences) Last logged: 11:04:43

Timeout while fetching data: https://www.foxesscloud.com/c/v0/device/addressbook?deviceID=xxxxxx

2022-10-11 14:54:48.001 DEBUG (MainThread) [custom_components.foxess.sensor] Updating data from https://www.foxesscloud.com/ 2022-10-11 14:54:48.394 DEBUG (MainThread) [custom_components.foxess.sensor] FoxESS Addressbook data fetched correcly {"errno":41808,"result":null} 2022-10-11 14:54:48.394 ERROR (MainThread) [custom_components.foxess.sensor] Unexpected error fetching FoxESS data: 'NoneType' object is not subscriptable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data return await self.update_method() File "/config/custom_components/foxess/sensor.py", line 143, in async_update_data if int(allData["addressbook"]["result"]["status"]) == 1: TypeError: 'NoneType' object is not subscriptable

bagienny commented 1 year ago

I just got it to work today for the first time and after a while I run into the same issue.

macxq commented 1 year ago

does this issue exist in the newest version v0.17?