mDNS not working properly

When I register two mDNS listeners, only one of them ever gets results.

I have this:

registerMDNSListener('_shelly._tcp')
registerMDNSListener('_http._tcp')

... stuff here...

List<Map<String,Object>> shellyEntries = getMDNSEntries('_shelly._tcp') ?: []
List<Map<String,Object>> httpEntries = getMDNSEntries('_http._tcp') ?: []

"shellyEntries" gets some responses. "httpEntries" does not.

I've got 2 different third-party mDNS scanner apps, both show TONS of stuff on _http._tcp but they never show up in Hubitat. This runs in a callback from this line in my code: subscribe(location, 'systemStart', 'systemStartHandler') and I've tried rebooting the hub.

The fact that one of them works and the other doesn't pretty much eliminates it being something I've done wrong, since if that was the case then neither would be working. I've also tried using ONLY the _http._tcp one by itself, in case it was an issue of only being able to use one at a time, and that didn't make any difference.

Is there something else that needs done here? Or some other way to register/unregister the listeners that isn't "documented" in the post @gopher.ny posted a while back about this?

1 Like

Let me know if there's any logs or other diagnostic data I can provide on this, @gopher.ny

I'd really like to wrap up a few things on my new Shelly Device Manager app, but it relies on mDNS to discover new Shelly devices quickly. I have a work-around where it just fires off a sequential subnet scan for everything on /24 looking for devices that respond to the /shelly endpoint, but that's slow since anything more than 1 address per second causes Hubitat to complain about too many inflight async HTTP request.

I'm wondering if maybe some sort of internal app or the built-in Shelly integration is somehow interfering with getting mDNS for _http._tcp properly.

1 Like

FYI in beta channel @gopher.ny mentioned he’s on vacation this week

4 Likes

Cool, everyone should have vacation time. When he's back hopefully I can help get this sorted out. I know it's a new feature he's been working on, or at least he's the one who announced it a while back, so he's at least familiar with it.

4 Likes