Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's been a few versions of HA that I can't start the integration with FoxESS... #175

Open
ebesuman opened this issue May 22, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@ebesuman
Copy link

Describe the bug
It's been a few versions of HA that I can't start the integration with FoxESS... Before it worked perfectly, I don't know what could have changed...
I enter https://www.foxesscloud.com/ with my credentials without problems

Debug logs:
2023-05-22 19:48:02.332 DEBUG (MainThread) [custom_components.foxess.sensor] Updating data from https://www.foxesscloud.com/
2023-05-22 19:48:02.332 DEBUG (MainThread) [custom_components.foxess.sensor] Token is empty, authenticating for the firts time
2023-05-22 19:48:15.003 ERROR (MainThread) [homeassistant.components.rest.data] Timeout while fetching data: https://www.foxesscloud.com/c/v0/user/login
2023-05-22 19:48:15.010 ERROR (MainThread) [custom_components.foxess.sensor] Unable to login to FoxESS Cloud - No data recived
2023-05-22 19:48:15.011 ERROR (MainThread) [custom_components.foxess.sensor] 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 258, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 217, in _async_update_data
return await self.update_method()
File "/config/custom_components/foxess/sensor.py", line 141, in async_update_data
await getAddresbook(hass, headersData, allData, deviceID, username, hashedPassword,0)
File "/config/custom_components/foxess/sensor.py", line 270, in getAddresbook
await restAddressBook.async_update()
File "/usr/src/homeassistant/homeassistant/components/rest/data.py", line 72, in async_update
response = await self._async_client.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1517, in request
request = self.build_request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 347, in build_request
headers = self._merge_headers(headers)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 414, 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 52, in normalize_header_value
return value.encode(encoding or "ascii")
AttributeError: 'bool' object has no attribute 'encode'
2023-05-22 19:48:15.015 DEBUG (MainThread) [custom_components.foxess.sensor] Finished fetching FoxESS data in 12.683 seconds (success: False)
2023-05-22 19:48:15.015 ERROR (MainThread) [custom_components.foxess.sensor] FoxESS Cloud initializaction failed, fix error and restar ha

HA version:
2023.5.3 Docker

@ebesuman ebesuman added the bug Something isn't working label May 22, 2023
@EnriqueBesuman
Copy link

Hi, any news about this error? I still have the problem in 2023.6.3...

@tomaszdab
Copy link

same here :(

@kamiljaworski88
Copy link

Same here
Today 05 feb 2024
First occurred: 13:16:05 (1 occurrences)
Last logged: 13:16:05
Unexpected error fetching FoxESS data: 'bool' object has no attribute 'encode'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants