ESPHome Devices "Offline" but only for dashboard status

Not sure if this thread is still active, but I struggled also with the devices showing as offline is ESPHome.
My solution was to allow “unregistered forward” in the multicast filter-rule of my switch.

Regards,
Uli

1 Like

Only fix for me is to go and “reconnect” then in Unifi controller. Then they’re back to being online.

The marked solution works only for the HA appliance environment.
For those who run esphome dashboard in a separate docker environment (e.g. local PC), on the same network, using mDNS resolver:

  • use host networking
  • attach dbus and avahi daemon sockets
  • install avahi-utils in container

In details:

An example docker configuration:

    $ docker run -it --name esphome-db --network=host \
        -v "$PWD":/config \
        -e ESPHOME_DASHBOARD_USE_PING=true \
        -v /var/run/dbus:/var/run/dbus \
        -v /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket \
        esphome/esphome

    esphome-db$ apt -qq update && apt -y install avahi-utils # in container

Yes, installing avahi-utils manually in every container is inconvenient. You can use your own ‘forked’ images or whatever, but at least it works.

1 Like

This isn’t really necessary with modern OS (eg Windows/Ubuntu 22.04…) as mDNS is already propagated to the container. I spent a good while trying to fix my container setup (including the steps described above) before realizing that the docker host resolver is looking for .home rather than .local (the ESPHome default). All I needed to do was add a domain: .home entry to the wifi section of the device config and all is well
Alternatively one could modify the host resolver to handle .local searches (I didn’t want to do that)