You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,6 +57,7 @@ If the add-on consists of more than one bundle, only one `addon.xml` is allowed
53
57
| config-description | The configuration description for the binding within the ConfigDescriptionRegistry (cf. [Configuration Description](config-xml.html)) | optional |
54
58
| config-description-ref | The reference to a configuration description for the binding within the ConfigDescriptionRegistry | optional |
55
59
| config-description-ref.uri | The URI of the configuration description for the binding within the ConfigDescriptionRegistry | mandatory |
60
+
| discovery-methods | A set of xml elements that describe how the system can scan the network to discover present devices | optional |
56
61
57
62
The full XML schema for add-on definitions is specified in the [Add-on XSD](https://openhab.org/schemas/addon-1.0.0.xsd) file.
58
63
@@ -63,6 +68,27 @@ The full XML schema for add-on definitions is specified in the [Add-on XSD](http
63
68
- Normally the service id must not be defined, because it is implicitly set to "type.<addonId>".
64
69
An add-on can register an OSGi service which implements the ManagedService interface and define the service.pid as e.g."binding.hue" to receive the configuration.
65
70
71
+
### Discovery Methods
72
+
73
+
The system can scan the network for present devices to determine if it should suggest to install specific addons during setup.
74
+
Optionally, if you want the system to scan the user's network for your addon then you need to include additional `discovery-method` fields.
|`discovery-methods`| Wrapper for `discovery-method` elements (see below). | Zero or one instances per file. |
79
+
|`discovery-method`| Complex XML element describing an addon discovery method. | Zero or more instances per file. |
80
+
|`service-type`| The type of discovery method. May be `upnp` or `mdns`. | Mandatory one per `discovery-method`. |
81
+
|`mdns-service-type`| If `service-type` is `mdns`, contains the MDNS discovery service type. | Optional one per `discovery-method`. |
82
+
|`match-properties`| Wrapper for `match-property` elements (see below). | Zero or one instances per `discovery-method`. |
83
+
|`match-property`| A property name and regular expression used for matching discovery findings. | Zero or more instances per `discovery-method`. |
84
+
|`name`| A property name to search for. | Mandatory one instance per `match-property`. |
85
+
|`regex`| A regular expression (or plain string) that needs to match the property name. | Mandatory one instance per `match-property`. |
86
+
87
+
Notes:
88
+
89
+
- A `discovery-method` may contain multiple `match-property` entries, and in such a case **all** entries must match i.e. it a logical `AND` function is applied.
90
+
- If you want to apply a logical `OR` function you can define a second separate `discovery-method` containing the respective `match-property` entry.
91
+
66
92
## Example
67
93
68
94
The following code gives an example for an add-on definition used in bindings.
@@ -81,5 +107,21 @@ The following code gives an example for an add-on definition used in bindings.
0 commit comments