remote_homeassistant: Version 3.0 doesn't reconnect after error
Hello,
i got this error in logs:
2020-12-08 17:24:25 ERROR (MainThread) [custom_components.remote_homeassistant] failed to fetch instance info
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
return await fut
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('192.168.1.246', 8123)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/remote_homeassistant/__init__.py", line 366, in _async_instance_get_info
return await async_get_discovery_info(
File "/config/custom_components/remote_homeassistant/rest_api.py", line 38, in async_get_discovery_info
async with session.get(url, headers=headers) as resp:
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 1124, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 527, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 541, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 898, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 1057, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 1026, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 981, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host hassio-slave1-wifi.lan:8123 ssl:default [Connect call failed ('192.168.1.246', 8123)]
2020-12-08 17:24:25 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/remote_homeassistant/__init__.py", line 399, in async_connect
if not (info or _async_instance_id_match(info)):
File "/config/custom_components/remote_homeassistant/__init__.py", line 381, in _async_instance_id_match
if info["uuid"] != self._entry.unique_id:
TypeError: 'NoneType' object is not subscriptable
Then there is no reconnection with slave device. Have to reload integration or restart HA
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (1 by maintainers)
I will try to replicate if possible later tonight and see if I can fix that.
I will take a look later tonight.
@jacekpaszkowski Great, thanks for testing so quickly! 👍
@lukas-hetzenecker Since #80 improves the situation, we should be ready to merge that.