Automatic Discovery of IP devices (e.g. mDNS/Bonjour)

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
Artemgy
Posts: 11
Joined: Friday 17 March 2017 17:17
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.7017b
Contact:

Automatic Discovery of IP devices (e.g. mDNS/Bonjour)

Post by Artemgy »

Hi,

I'm still quite new to the Domoticz ecosystem, but I am looking to work on a plugin for devices for a particular service (in this case the synchronised audio distribution service Snapcast). Like many modern networked audio devices, these servers and clients make themselves known across a local TCPIP network using the mDNS protocol, also known as Bonjour zeroconfor Avahi.

Most of the device plugins I have seen so far either have hard-coded IP addresses in the script, or IP addresses manually entered in the Domoticz web interface by the user. However in an IoT (Internet of Things) Controller architecture (which Domoticz essentially IS), one might expect to see some kind of Service Discovery hooks that developers can make use of, to improve the user experience.

I checked the wiki and trawled a number of forum posts but could not turn anything up. Does anyone have any information or examples of Service Discovery protocols like mDNS being used in Domoticz code to identify the IP addresses of devices operating particular kinds of service?

Any pointers very much appreciated
Thanks
Artemgy
Posts: 11
Joined: Friday 17 March 2017 17:17
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.7017b
Contact:

Re: Automatic Discovery of IP devices (e.g. mDNS/Bonjour)

Post by Artemgy »

So I found a candidate for python service discovery, python-zeroconf at https://github.com/jstasiak/python-zeroconf/ which still appears actively maintained, is packaged in python and has a debian package in unstable

However, as well as wanting to use Autodiscovery for clients whilst the plugin is running, I realise that it would be useful also to autodiscover any servers on the network when adding the Device that will use the plugin. And I have no idea how to go about this :(

Any pointers or examples welcome
Thanks
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest