Closed nordeep closed 1 year ago
See the README for why this happens. Nothing much to do about it except wait.
I read the README three times, but did not find anything that could relate to my case - error 409. Home Connect API documentation tell us - 409 - Command/Query cannot be executed for the home appliance, the error response contains the error details.
How can I get text of response to determine what is happening?
I have only one appliance.
What I tried to do: Register new application. Re-add Integration with new client_id, client_secret. Disable Integration for 12 hours. Checked that my Email does not contain capital letters.
To see the error you should enable debug logging (see how in the README). However, you won't learn anything from this particular message. You're getting it because the integration sent too many API calls and was blocked. If you only have a single device this is most likely a problem with the device disconnecting/reconnecting to the wifi network too often. You can see some examples of this here #193 and here #127. If you are absolutely certain that this is not a wifi connectivity issue then please upload the debug log here and I'll take a look.
I'm certain about that this is not a wifi issue. WiFi session of device is about 6 days long. HC connection status is always LOADED not BLOCKED. Nothing indicates that API requests are being exceeded.
Android App is going to https://api-rus.home-connect.com/ for authorization. I tried to set api_host: https://api-rus.home-connect.com
, unfortunately no luck. Stuck on another issue:
2023-04-12 17:30:32.026 DEBUG (MainThread) [home_connect_async.homeconnect] Exception in SSE event stream. Will wait for 2 seconds and retry
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
return await fut
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 541, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('5.8.181.130', 80)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/home_connect_async/homeconnect.py", line 248, in async_events_stream
await event_source.connect()
File "/usr/local/lib/python3.10/site-packages/aiohttp_sse_client/client.py", line 214, in connect
response = await self._session.request(
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api-rus.home-connect.com:80 ssl:default [Connect call failed ('5.8.181.130', 80)]
2023-04-12 17:30:34.037 DEBUG (MainThread) [aiohttp_sse_client.client] close
2023-04-12 17:30:34.037 DEBUG (MainThread) [home_connect_async.homeconnect] Connecting to SSE stream
2023-04-12 17:30:34.037 DEBUG (MainThread) [aiohttp_sse_client.client] connect
API does not respond to HTTP port, although the HTTPS is set.
Don't do that, that parameter is only for China.
I was wrong about the error code, the one I was referring to is 429, and I'm just so used to seeing it that I just saw your 409 as 429. Anyway, please add log_mode: 7
to the home_connect_alt configuration section in the configuration.yaml file and upload a new log file.
Attached log with next config:
home_connect_alt:
# HASS key
client_id: !secret hc_client_id
client_secret: !secret hc_client_secret
#api_host: "https://api-rus.home-connect.com"
log_mode: 7
Thanks. Unfortunately this doesn't help because the SSE library I'm using doesn't provide the actual error message received with the 409 error code. I can make the following suggestions of things to try (in increasing order of complexity):
If none of these work I'll need you send me your credentials privately so I can test it my self, but hopefully we won't get to that.
Closing for lack of progress
Describe the bug
After successfully added DishWasher from Home Connect to HA all entities available only once. In logs i can see next error:
If I toggle Turn on switch from HA I see as Dish Washer turn on, but state of switch doesn't update. Only if I press Home Connect Refresh button all states will be updated. Home Connect Status always LOADED.
Version of the custom_component
Configuration
Debug log