-
-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add systemd-resolved mDNS advertiser support #965
Conversation
Pull Request Test Coverage Report for Build 3358831774
💛 - Coveralls |
a2caa25
to
c61dce1
Compare
Dealt with conflicts from master and ESLint warning. This should be ready whenever. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution 🚀
Had only a few comments on certain places
You mentioned, that there is some initial setup required to set permissions for homebridge/hap-nodejs. Can we please add this to the in-code documentation so users can easily find that.
Further, can programatically detect, if we are missing the permission for systemd-resolved such that we can issue an according warning (maybe with a link to a Wiki documentation page illustration how to configure permissions)?
Sure. Where should I put it?
If we're missing the appropriate permissions, there are a number of different errors that can occur as a result. Rather than try to figure out what they all are, how do you feel about making the error handler always issue that warning in response to failures? |
dbus-native doesn't support JavaScript objects, so we have to to destructure them into key-value pairs.
c61dce1
to
dc8a221
Compare
@Supereg Any thoughts on what else I should do to get this in a mergable state? |
Tests should work now, btw. |
@Supereg, I have opened this Pull Request on the UI to add resolved: homebridge/homebridge-config-ui-x#1427 |
Co-authored-by: Andi <mail@anderl-bauer.de>
### Added - Support for new advertiser [AVAHI](homebridge/HAP-NodeJS#918) - Support for new advertiser [RESOLVED](homebridge/HAP-NodeJS#965) - Added `msg.hap.reachable` parameter to get device reachable state (related to NO_RESPONSE) ### Fixed - Accessory could not be recovered from NO_RESPONSE using single Characteristic - Make unsupported Characteristic error more descriptive [#456](#456) - FFmpeg No such file or directory [#495](#495) - allChars: properties have spaces in names [#496](#496) - Wait for host to return from unpublish/destroy before exiting, set published flag on destroy - Security system with characteristics, bad behaviour [#388](#388) ### Changed - Updated hap-nodejs to [0.9.7](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.9.7) (bug fixes) - Updated hap-nodejs to [0.9.8](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.9.8) (bug fixes) - Updated hap-nodejs to [0.10.0](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.0) (features) - Updated hap-nodejs to [0.10.1](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.1) (changes) - Updated hap-nodejs to [0.10.2](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.2) (bug fixes) - Updated hap-nodejs to [0.10.3](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.3) (bug fixes) - Updated hap-nodejs to [0.10.4](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.4) (bug fixes) - Updated hap-nodejs to [0.11.0](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.11.0) (features and bug fixes)
♻️ 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 homebridge/homebridge#3077.
💡 Proposed solution
systemd-resolved, like Avahi, exposes a D-Bus interface for managing mDNS services. This pull request adds a systemd-resolved mDNS advertiser that makes use of this interface. The code was heavily based on that of the Avahi advertiser.
⚙️ Release Notes
resolved
that uses systemd-resolved via D-Bus.➕ Additional Information
In order for homebridge to have the permission to use this interface, a
.pkla
file with the following contents will need to be installed to/etc/polkit-1/localauthority/10-vendor.d/
:Testing
Seems to work for me!
See: homebridge/homebridge#3224