Errors in Home Assistant after last upgrade.

Hi, I upgrade today my Dietpi (mini PC) to ver. 7.7. I have Home Assistant installed there and integration to meross thermostatic valves. After upgrade my velvets don’t work anymore in HA. I try to reinstall but that don’t help.

This error come from custom integration.

Logger: custom_components.meross_cloud
Source: deps/lib/python3.8/site-packages/meross_iot/http_api.py:226
Integration: Meross Cloud IoT
First occurred: 22:36:13 (50 occurrences)
Last logged: 23:37:30

Error occurred. ------------------------------------- Component version: 0.4.2.2 Device info: <Unavailable> Error Message: "An exception occurred while setting up the meross manager. Setup will be retried..."
Traceback (most recent call last):
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 865, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/resolver.py", line 31, in resolve
    infos = await self._loop.getaddrinfo(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo
    return await self.run_in_executor(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/homeassistant/custom_components/meross_cloud/__init__.py", line 206, in async_setup_entry
    client, http_devices, creds_renewed = await get_or_renew_creds(
  File "/mnt/dietpi_userdata/homeassistant/custom_components/meross_cloud/__init__.py", line 113, in get_or_renew_creds
    http_devices = await http_client.async_list_devices()
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/meross_iot/http_api.py", line 318, in async_list_devices
    result = await MerossHttpClient._async_authenticated_post(url, {}, cloud_creds=self._cloud_creds, http_proxy=self._http_proxy)
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/meross_iot/http_api.py", line 226, in _async_authenticated_post
    async with session.post(url, data=payload, headers=headers, proxy=http_proxy) as response:
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/client.py", line 1117, in __aenter__
    self._resp = await self._coro
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/client.py", line 520, in _request
    conn = await self._connector.connect(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 535, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 892, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host iot.meross.com:443 ssl:default [Temporary failure in name resolution]

Can I fix this?

Regards.
Przemek

Looks like you have issues to resolve host name

Cannot connect to host iot.meross.com:443 ssl:default [Temporary failure in name resolution]

I also have errors in HACS:

Logger: custom_components.hacs
Source: deps/lib/python3.8/site-packages/aiogithubapi/client.py:102
Integration: HACS (documentation, issues)
First occurred: 23:49:30 (4 occurrences)
Last logged: 23:59:35
 
Request exception for 'https://api.github.com/rate_limit' with - Cannot connect to host api.github.com:443 ssl:default [Temporary failure in name resolution]
Traceback (most recent call last):
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 865, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/resolver.py", line 31, in resolve
    infos = await self._loop.getaddrinfo(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo
    return await self.run_in_executor(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
 
The above exception was the direct cause of the following exception:
 
Traceback (most recent call last):
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/aiogithubapi/client.py", line 100, in async_call_api
    result = await self._session.request(**request_arguments)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/client.py", line 520, in _request
    conn = await self._connector.connect(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 535, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 892, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.github.com:443 ssl:default [Temporary failure in name resolution]
 
The above exception was the direct cause of the following exception:
 
Traceback (most recent call last):
  File "/mnt/dietpi_userdata/homeassistant/custom_components/hacs/base.py", line 211, in async_can_update
    response = await self.githubapi.rate_limit()
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/aiogithubapi/github.py", line 184, in rate_limit
    response = await self._client.async_call_api(endpoint="/rate_limit", **kwargs)
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/aiogithubapi/client.py", line 102, in async_call_api
    raise GitHubConnectionException(
aiogithubapi.exceptions.GitHubConnectionException: Request exception for 'https://api.github.com/rate_limit' with - Cannot connect to host api.github.com:443 ssl:default [Temporary failure in name resolution]

Ad by Valueimpression
RAW Paste Data
I see also errors in logs:


Logger: custom_components.hacs
Source: deps/lib/python3.8/site-packages/aiogithubapi/client.py:102
Integration: HACS (documentation, issues)
First occurred: 23:49:30 (4 occurrences)
Last logged: 23:59:35

Request exception for 'https://api.github.com/rate_limit' with - Cannot connect to host api.github.com:443 ssl:default [Temporary failure in name resolution]
Traceback (most recent call last):
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 865, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/resolver.py", line 31, in resolve
    infos = await self._loop.getaddrinfo(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo
    return await self.run_in_executor(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/aiogithubapi/client.py", line 100, in async_call_api
    result = await self._session.request(**request_arguments)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/client.py", line 520, in _request
    conn = await self._connector.connect(
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 535, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 892, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.github.com:443 ssl:default [Temporary failure in name resolution]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/dietpi_userdata/homeassistant/custom_components/hacs/base.py", line 211, in async_can_update
    response = await self.githubapi.rate_limit()
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/aiogithubapi/github.py", line 184, in rate_limit
    response = await self._client.async_call_api(endpoint="/rate_limit", **kwargs)
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/aiogithubapi/client.py", line 102, in async_call_api
    raise GitHubConnectionException(
aiogithubapi.exceptions.GitHubConnectionException: Request exception for 'https://api.github.com/rate_limit' with - Cannot connect to host api.github.com:443 ssl:default [Temporary failure in name resolution]

Seems similar

Cannot connect to host api.github.com:443 ssl:default [Temporary failure in name resolution]

I ask HACS support and they tell me that:

There are errors with DNS, You run venv… you should really know this, “socket.gaierror: [Errno -3] Temporary failure in name resolution” that is your hint

.
I don’t know what to do with that.

Regards.

Well you have issues to resolve DNS names. Check your configuration and DNS server used.

I try wire guard today but stop wg service. Do You think that’s it?

Depends what you have done. Try to ping a domain from command line. Does it resolve the host name?

I think it’s OK.

dietpi@DietPi:~$ ping 192.168.0.19
PING 192.168.0.19 (192.168.0.19) 56(84) bytes of data.
64 bytes from 192.168.0.19: icmp_seq=1 ttl=64 time=0.657 ms
64 bytes from 192.168.0.19: icmp_seq=2 ttl=64 time=0.717 ms
64 bytes from 192.168.0.19: icmp_seq=3 ttl=64 time=0.800 ms
64 bytes from 192.168.0.19: icmp_seq=4 ttl=64 time=0.643 ms
64 bytes from 192.168.0.19: icmp_seq=5 ttl=64 time=0.612 ms

Of course this is ok as you ping a host on your local network. This has nothing to do with DNS resolution. You would need to ping something like google.com or any other domain in the web.

I remove wire guard but still cannot ping google.com. What do I have to choose in static DNS in dietpi-config? I have google there 8.8.8.8…


Edit. I choose cloudflare and now works. Thanks.