macxq / foxess-ha

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

Problems running the integration #128

Open MrHenriques opened 1 year ago

MrHenriques commented 1 year ago

Hello. First of all thank you for the enormous effort made by the developers who allowed the use of these tools to monitor our foxess systems. So thanks everyone.

For the last few days, I haven't been able to get real readings from foxess-ha integration. There were several times when I found myself restarting HA but without success.

Therefore, I turn to you in the hope that you can help to find out what is going on.

I regularly get the following logs:

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

Error fetching data: https://www.foxesscloud.com/c/v0/user/login failed with [Errno -2] Name does not resolve

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

Unable to login to FoxESS Cloud - No data recived

Logger: custom_components.foxess.sensor Source: components/rest/data.py:63 Integration: foxess (documentation, issues) First occurred: 14:48:18 (1 occurrences) Last logged: 14:48:18

Unexpected error fetching FoxESS data: 'bool' object has no attribute 'encode' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 195, in _async_update_data return await self.update_method() File "/config/custom_components/foxess/sensor.py", line 139, in async_update_data await getAddresbook(hass, headersData, allData, deviceID, username, hashedPassword,0) File "/config/custom_components/foxess/sensor.py", line 222, in getAddresbook await restAddressBook.async_update() File "/usr/src/homeassistant/homeassistant/components/rest/data.py", line 63, in async_update response = await self._async_client.request( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1520, in request request = self.build_request( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 349, in build_request headers = self._merge_headers(headers) File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 416, in _merge_headers merged_headers.update(headers) File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 200, in update headers = Headers(headers) File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 71, in init self._list = [ File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 75, in normalize_header_value(v, encoding), File "/usr/local/lib/python3.10/site-packages/httpx/_utils.py", line 55, in normalize_header_value return value.encode(encoding or "ascii") AttributeError: 'bool' object has no attribute 'encode'

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

FoxESS Cloud initializaction failed, fix error and restar ha

macxq commented 1 year ago

it this issue still occurs?

MrHenriques commented 1 year ago

At the moment the problem does not happen so often. Apparently when I open the FoxCloud application in the browser or on the smartphone, sometimes this problem appears, but after 10/15 min I have the add on available again.