Closed cweiske closed 2 years ago
I think it would be a better idea to use _http._tcp
for simple home devices too so that no additional discovery has to be started.
Shelly v2 devices support discovery via _shelly._tcp
, only v1 devices don't.
Using an own service type means we're not restricted on what names we may use.
Also on the network level, a single mDNS discovery request may contain multiple service type requests at once. Unfortunately the Android API doesn't support this yet :)
In short: I'd like to do the right thing, and not optimize for "least number of discovery processes".
Is it possible to use only one instance of DnsDiscoveryListener
?
Unfortunately not. I'll get an exception that the listener is already in use.
(Continuation of #39 which was closed in error)
With that in place, devices can use avahi-daemon to get their SimpleHome API services automatically discovered by HomeApp.
Example avahi daemon service file:
The TXT record with "url" property is optional. If not specified, the IP address of the server will be used by HomeApp.
Specifying the url lets you announce multiple services on the same host.