Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support using systemd-resolved as mDNS responder

See original GitHub issue

Current Situation

Homebridge currently supports three different mDNS advertisers, two that run in-process and one that uses Avahi over D-Bus. For a while now, systemd-resolved has supported acting as an mDNS advertiser and resolver. If Homebridge is run on a system that uses systemd-resolved for mDNS, this can cause conflicts similar to #3077.

Proposed Change

systemd-resolved, like Avahi, exposes a D-Bus interface for managing mDNS services. Ideally, Homebridge would have a systemd-resolved mDNS advertiser added that makes use of this interface.

Additional Context

A couple of RegisterService method’s arguments have slightly misleading names. From the documentation:

RegisterService(in  s name,
                in  s name_template,
                in  s type,
                in  q service_port,
                in  q service_priority,
                in  q service_weight,
                in  aa{say} txt_datas,
                out o service_path);

name here refers to the name the service should appear as in systemd. name_template is the actual server instance name, so called because it supports template expansion. Probably you’d want to set both name and name_template to the same value.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

elyscapecommented, Nov 11, 2022

Got it to work by adding "resolved" /* RESOLVED */, to lib/server.js.

Good catch. I’ll open a PR fixing this momentarily.

I also needed to convert homebridge.pkla as this format is deprecated in newer polkit versions.

Interesting. Can you point me at some documentation for this?

Update: found some. I’ll open another PR adding a .rules file.

Superegcommented, Nov 12, 2022

Thanks a lot for providing the updated Wiki descriptions 👍 . I updated the page accordingly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

systemd-resolved as mDNS responder - Unix Stack Exchange
systemd-resolved is a system service that provides network name resolution to local applications. It implements [...] MulticastDNS resolver and ...
Read more >
Switching to systemd-resolved for mDNS -
The first is simple: I need to enable mDNS in systemd-resolved's ... to add mDNS support through Bonjour print services for Windows.
Read more >
can't connect using mDNS addressing when systemd ...
Description of problem: When systemd-resolved is running, I'm unable to resolve mDNS computer names for ssh (and gvfs-smb mounts). Version- ...
Read more >
systemd-resolved - ArchWiki
systemd-resolved is capable of working as a multicast DNS resolver and responder. The resolver provides hostname resolution using a "hostname.local" naming ...
Read more >
systemd-resolved.service -
It implements a caching and validating DNS/DNSSEC stub resolver, as well as an LLMNR and MulticastDNS resolver and responder. Local applications may submit ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found