CoreDNS not resolving ESPHome Nodes

So I have some issues with ESPHome and the CoreDNS.

I have lost connection to some ESPHome nodes, I think I might have configured some nodes with IP and some with hostnames, don’t remember.
They are shown as active in ESPHome add-on but I can’t connect to them to show logs or update firmware.
They are shown as unavailable in home assistant.
While debugging I found out that if I downgrade the coredns to 2022-04-0 from 2022-04-1 then it instantly connects to the node and I can show logs etc. but this is temporary as it auto updates to 2022-04-1 and then brakes the resolve once the cache has expired.

[core-ssh ~]$ nslookup pow

*** Can't find pow: No answer


[core-ssh ~]$ nslookup pow

Name:   pow

Im using ADguard add-on and it’s set on the dhcp server as the default DNS.
ADguard resolves the nodes hostnames.

I was searching for a solution to this and found something about the fallback, which I suppose can disable on 2022-04-1, but for some reason it’s not working.
Not sure if this would fix my issue, but unable to try it either way.

[core-ssh ~]$ ha dns info
fallback: true
llmnr: true
- dns://
mdns: true
servers: []
update_available: false
version: 2022.04.1
version_latest: 2022.04.1

I get the following:

[core-ssh ~]$ ha dns options --fallback=false
Error: unknown flag: --fallback
  ha dns options [flags]

  options, option, opt, opts, op


  ha dns options --servers dns:// --servers dns://

  -h, --help                  help for options
  -r, --servers stringArray   Upstream DNS servers to use. Use multiple times for multiple servers.

Global Flags:
      --api-token string   Home Assistant Supervisor API token
      --config string      Optional config file (default is $HOME/.homeassistant.yaml)
      --endpoint string    Endpoint for Home Assistant Supervisor (default is 'supervisor')
      --log-level string   Log level (defaults to Warn)
      --no-progress        Disable the progress spinner
      --raw-json           Output raw JSON from the API

FATA[0000] Error while executing rootCmd: unknown flag: --fallback

ha dns options -h
to check if your version of ha supports this option

you should see something like:

      --fallback              Enable/Disable fallback DNS (Cloudflare DoT) (default true)
  -h, --help                  help for options
  -r, --servers stringArray   Upstream DNS servers to use. Use multiple times for multiple servers.

if you do not see --fallback in flags that probably means you are running old version of “ha command”

You need “Home Assistant CLI” version 4.16.0 or newer for --fallback option to work

If using “Terminal & SSH” add-on make sure your add-on is on version 9.4.0

If using “Community Add-on: SSH & Web Terminal” make sure add-on is on version 10.1.2

On my home assistant, after update, Home Assistant Community Add-ons repository was removed and I was stuck on old version of SSH & Web Terminal

Disabling the fallback won’t change anything. The fallback isn’t used for single-name queries like that.

Is your device broadcasting its name via llmnr or were you just banking on Adguard to resolve that? Starting in 2022.4.1 of plugin DNS it uses systemd-resolved to answer all single-name queries and .local queries. Systemd-resolved assumes single name queries are llmnr and .local queries are mdns. If it can’t find an answer for those from those sources then it returns nxdomain. It won’t ask a recursive resolver for privacy reasons (leaking local names to external resolvers).

You might have to change to using a search domain like .lan or to get that to work if your device isn’t broadcasting its name via multicast dns.

@Arteusz thank you, that solved the fallback issue. I hade 9.3.0 of ssh add-on installed.

But as @CentralCommand said, that did not solve this.

Well so the issue is on the esphome nodes.
And what I recalled was that along time ago, I hade issues connecting to the nodes from the add-on as for some reason windows could not resolve the .local hosts, local was default domain, and a workaround was in the config of the esphome nodes where I set domain = '' this made it possibel for me to connect to the nodes for update etc. and also home assistant.

For me windows resolves pow but not pow.local.
Core does not resolve pow but will resolve pow.local which breakes connection between home assistant and the nodes as they don’t use .local as domain.
Some reason the online status within esphome add-on still works in this condition.
But unable to update nodes or view logs.

Adguard is something just for adblocking and I have only been using that for maybe 2 month now, I don’t have any host for any nodes there, if not the add-on does something in the background.

I was thinking that I maybe should make a reset of my home assistant, I think there has been a lot of workarounds and “quick-fixes” that has become “permanent-fixes” and maybe conflicting with current version. Maybe now all the issues in the past has been fixed in core.

And at least in Sweden we still have a bunch of rpi4 4GB and 8GB in stock at stores.
So I have a 8GB ready for a upgrade.