Skip to content

v1.10.1 - DNS resolver fix

Choose a tag to compare

@EnO33 EnO33 released this 26 Apr 10:16

Bug fix

Fixes setup failures on some HAOS / Docker installations where the integration would error out at authentication step 1/5 with:

aiodns.error.DNSError: (11, 'Could not contact DNS servers')
[...]
Cannot connect to host espaceclients.<provider>.fr:443 ssl:default
[Could not contact DNS servers]

Root cause

aiohttp's default AsyncResolver (backed by aiodns / c-ares) talks UDP/53 directly to the DNS servers listed in /etc/resolv.conf. On some HAOS / Docker setups, the OS resolves names fine via systemd-resolved, NSS or /etc/hosts, but UDP to the upstream DNS is blocked or misconfigured — so aiodns fails while the rest of the system works normally.

Fix

The integration now uses ThreadedResolver (which goes through socket.getaddrinfo) for its aiohttp.ClientSession. This follows the same resolution path as the rest of the OS and works in all the configurations where aiodns failed.

If DNS resolution still fails for some reason, the error message is now clearer and points to the right HA setting:

DNS resolution failed for <host>. Check Home Assistant's DNS configuration
(Settings -> System -> Network -> Network adapter); underlying error: ...

What's not affected

  • No change to authentication, sensors, statistics import or any user-visible behaviour
  • No new dependency
  • Existing config entries continue to work as-is

Verified

  • Full pytest suite (24 tests, was 23 — added a regression test for the DNS branch)
  • mypy strict, ruff lint and format
  • Hassfest and HACS validation
  • Live smoke test on a Raspberry Pi against SEM (Ventabren contract): all 5 auth steps pass, all 3 fetch endpoints OK, historical statistics import OK