HAP-NodeJS icon indicating copy to clipboard operation
HAP-NodeJS copied to clipboard

add avahi file advertiser

Open jneubrand opened this issue 1 year ago • 3 comments

:recycle: Current situation

  • the docker container requires host networking because homebridge wants to advertise its own service

:bulb: Proposed solution

  • make it possible to publish zeroconf information via an avahi xml file, so that it can be mounted, example:
    volumes:
    - /etc/avahi/services/myhub-0000.service:/homebridge/myhub-0000.service
    
    (of course, this also requires changes in config.json as well as jneubrand/homebridge#94b2f53) once this is done, it's no longer necessary to expose host networking when using the docker homebridge image. (other relevant ports need to be exposed explicitly nonetheless)

:gear: Release Notes

  • add avahi-file advertiser

:heavy_plus_sign: Additional Information

  • i've been using this patch for a few years and it works
  • should probably allow users to configure the path the .service file is written to

Testing

  • none implemented, just want to submit a proof-of-concept pr to check if anyone else wants this :)

Reviewer Nudging

this isn't ready to merge yet

jneubrand avatar Feb 11 '24 13:02 jneubrand

Dear maintainers: do you have opinions on how the path for .service files should be configured/passed in? I saw createWithOptions for BonjourHAPAdvertiser as well as the responderOptions parameter for CiaoAdvertiser, but those never seem to be called from homebridge/homebridge itself.

jneubrand avatar Feb 12 '24 14:02 jneubrand

Hey, Thank you for this contribution. This looks great and very promising for more isolated docker-based installations of Homebridge. It will probably take some more time until we can have a more closer look at this. We hope to be back around end of March 👍

Supereg avatar Feb 26 '24 18:02 Supereg

@jneubrand the GitHub repo docker-homebridge is where the docker image is built from, including the scripts etc. Would it make sense to open this there?

PS - I’m out of the country till mid March so can’t look at this till then.

NorthernMan54 avatar Feb 27 '24 01:02 NorthernMan54