-
Notifications
You must be signed in to change notification settings - Fork 190
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
Intermittent discovery issues #147
Comments
Yes, this library uses dnssd to make the accessory discoverable on the local network. |
I see. What would be the cleanest way to solve this issue? Drop avahi and change the dnssd listen method to take a dnssd object, which would be initialized with my other services? |
I think that the best way would be to just use Avahi where possible (ex. on Linux). |
A random thought just came to my mind, which may resolve this issue. What about setting the hostname of the announced Bonjour service NOT to the local hostname? dnsCfg := dnssd.Config{
....
Host: "Testing",
....
} Does this help? |
Could you please test it with the |
Sure! |
Instead of getting a red "Unreachable" message I now get this gray "Unavailable", otherwise it's the same deal as before (reachable from iPhone but not from mac). I will try disabling avahi so we can isolate that. |
|
Re: Unavailable What type of accessories are you creating? Looks like they are incompatible with Apple Home. |
Pretty sure they're compatible, since that message comes and goes. I could take some snippets from my code if that helps though, but I guess it is just standard stuff. |
We have this issue too, with any configuration, including hklight. The Bridge/Accessory shows up in Discovery under the We previously ran homebridge on the same box, but don't anymore, just a single hc instance. Nothing else binding to udp/5353. Debug logs show nothing about discovery, only the hub and other clients eventually disconnecting. |
@schittler Are you using the latest version 1.2.2 of hc? |
yes, our go.mod looks like this:
|
On what hardware are you running it? |
I can report back that after more than a year of not seriously using homekit due to issues like this, we have found the problem. Check if somewhere in your home, you have a managed switch with IGMP turned on. IGMP is useful in enterprise networks but will lead to all sorts of multicast failures (including multicast DNS) if not carefully configured in your entire subnet, especially if some of your switches do talk IGMP and some do not (linux and hyper-v bridges included). If you have an IoT subnet with mDNS reflection things might get even worse. In our case, it was a TP-Link managed switch that even logged to its web interface how it had stopped delivering multicast to ports with unmanaged switches behind it, because at that point it becomes a race condition for which device behind it will respond first - and on a linux bridge that's very often the host. |
I've been experiencing very similar behaviour, with hc v1.2.3, though I do not have any managed switches on my network. @brutella are the changes mentioned in #179 (comment) aimed at fixing this behaviour? I'll test it out at some point soon to see if it helps... |
Check your AP. UniFI has it turned on by default as well. A good way to test this is to check with any mDNS client if the accessory shows up, from multiple points in your network. This is how we originally diagnosed this issue. |
I have Google WiFi mesh devices, I wonder if these do... I'm not sure how to figure that out as the management app is pretty limited.
That's a good idea - from WiFi I'm seeing it appear for a few minutes, then a new one appears with a |
FYI I've refactored hc and made a new library out of it. The new library is available as hap. Please check if your issue is resolved by the new implementation. |
It appears that I'm having some intermittent discovery issues. I have avahi running on the same machine and this pops up on the avahi log:
I wonder if that is somehow related?
The text was updated successfully, but these errors were encountered: