name
(as specified by the manufacturer) and a protocol
(tcp
or udp
). For example, Homey broadcasts its presence with the name homey
using the tcp
protocol.DiscoveryResultMDNSSD
has a txt
property that contains the (lowercased) TXT values of the broadcast.conditions
are optional but highly recommended, you can use these to pre-filter the discovery results. This way your app only receives the discovery results of devices that can actually be paired using your app.DiscoveryResultSSDP
has a headers
property that contains the (lowercased) headers of the response.DiscoveryResultMAC
only has an address
property, which contains the IP address of the device.00:24:6d
or 00:24:6e
, convert them from hexadecimal to decimal.txt
object and the SSDP discovery type has an headers
object. The discovery result provides the address that you can use to connect to the device.mdns-sd
and ssdp
discovery types, the app must define how a discovery result can be identified when it has been found multiple times, regardless if the IP address has changed.mac
discovery type, the mac address is used as the ID.id
in the App Manifest. Homey will then be able to match the result to previous results, and notify your app the device has been found again, instead of seeing the device as a new discovery result.{{
and }}
).conditions
property is an Array
with one or more Arrays
in it. This array contains Objects
rules. When all rules within an array are true, the result is considered a match. Using multiple arrays behaves as rulesArray1 OR rulesArray2 OR ...
.string
and regex
.onDiscovery*
methods in your Device class to get updated whenever the status of the device changes.discovery
property to your driver's entry in the App Manifest.device.js
, overload the methods starting with onDiscovery
.ManagerDiscovery#getStrategy()
with the discovery strategy ID as defined in your App Manifest. You can then call DiscoveryStrategy#getDiscoveryResults()
to get the devices that already have been discovered and listen to the result
event on the DiscoveryStrategy
to react to newly discovered devices while the app is running.