brutella / hc

hc is a lightweight framework to develop HomeKit accessories in Go.
Apache License 2.0
1.74k stars 189 forks source link

Replace oleksandr/bonjour with grandcat/zeroconf #86

Closed nickw444 closed 7 years ago

nickw444 commented 7 years ago

Replace oleksandr/bonjour with grandcat/zeroconf.

Fortunately for me, there was only a single API difference between the two versions, this being zeroconf.RegisterProxy now accepting a list of IP's. I have inlined the creation of this structure, however happy to change to whatever style is suited best to this project.

TODO:

nickw444 commented 7 years ago

After replacing the library, the consistency of the bridge being accessible appears to be much more reliable. There are occasionally dropouts, but I think i'm going to pass the blame for this onto poor wifi reception.

nickw444 commented 7 years ago

Regardless of whether this resolves the issue or not, I still think this library should be used in favour of the one from oleksandr, since it is actively maintained (and is a fork):

Great thanks to hashicorp and to oleksandr and all contributing authors for the code this projects bases upon. Large parts of the code are still the same.

However, there are several reasons why I decided to create a fork of the original project: The previous project seems to be unmaintained. There are several useful pull requests waiting. I merged most of them in this project. Still, the implementation has some bugs and lacks some other features that make it quite unreliable in real LAN environments when running continously. Last but not least, the aim for this project is to build a solution that targets standard conformance in the long term with the support of the community. Though, resiliency should remain a top goal.

tomtaylor commented 7 years ago

Highly suggest merging this, it worked well for me.

nickw444 commented 7 years ago

Likewise, haven't had a connection issue since I last posted

brutella commented 7 years ago

Thanks for your effort.

In the meantime, I've made a dnssd library which is used in HomeControl in the dnssd branch.