MDNSDiscoveryService get a instance to run a startScan

Hi all,

In a binding I’m developing, I need to get a reference to the instance of MDNSDiscoveryService, so that I can invoke a call to startStcan().

Maybe I got the wrong search criteria on the forums, or when searching the addon’s code base, but I cant seem to find a way to get a reference to that service, in order to invoke it. Any hints / guidance appreciated.

The reason is I need to trigger the mdns query so that the discovery process run, and it finds all the devices details. If I run it manually using the Scan button on the UI, it does the query and I see the desired results come in. I only want to do this if a mdns host name is detected, and nothing is currently found (will coalesce the calls to a sensible window).I just cant see how you get a reference to that service from the system, in order to force a scan?

Thanks in advance - any help appreciated as I must be missing some fundamental / basic trick here with the models openHAB uses.

David

Hi all, i’m closing this topic.

This was either a bug in my binding which as I have been cleaning up the code-base, around mdns discovery, or in the build I had of OH.

The system does run a scan at startup which is what is needed for the initial resolution of the names. After that when the device the binding is for restart’s, it does a push of mdns which effectively means it’s data is updated, as this is picked up by OH.

So all is good, thank you for anyone who read.

David

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.