Skip to content

Add avahi-utils to the image for mDNS to work properly for bindings #484

@zolakk

Description

@zolakk

Summary

The ESPHome (and I'm sure other) bindings require the presence of avahi-utils as well as mounting
/var/run/avahi-daemon/socket to work properly for mDNS. It would be nice to have the avahi-utils added to the image so that only the bind needs to be done for its mDNS to work properly.

Expected Behavior

mount /var/run/avahi-daemon/socket and start the image, ping devicename.local should work ok as should the binding Things connect properly

Current Behavior

ESPhome Things report cannot connect via the discovered mDNS address, ping from container console reports "Temporary failure in name resolution". Mounting the avahi-daemon socket and manually installing avahi-utils in the console or adding it to a startup script resolves this issue

Possible Solution

add "apt-get install -y avahi-utils" to the build, mention the required bind mount in the documentation

Context

ESPHome devices fail to connect via mDNS, need to reconfigure for IP in the Thing configuration but that doesn't seem to always survive a restart for some reason.

Your Environment

Using ESPHome binding to connect to those devices via their mDNS address

Image

  • openHAB version: 5.1.1
  • Image tag used: openhab/openhab:5.1.1

Docker Host

  • Operating System: Ubuntu 24.04.3 LTS
  • Docker Version: 29.1.4
  • Kernel Version: 6.8.0-90-generic
  • Architecture: x86_64

Configuration

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions