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
Copy file name to clipboardExpand all lines: docs/src/main/resources/markdown/developers/bindings/index.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Bindings
4
4
5
5
# Overview
6
6
7
-
A binding is an extension to openHAB that integrates an external system like a software service or a hardware device.
7
+
A binding is an extension to OpenSmartHouse that integrates an external system like a software service or a hardware device.
8
8
The external system is represented as a set of *Things* and sometimes *Bridges* with *Channels*.
9
9
10
10
This chapter covers everything to know about binding development.
@@ -17,19 +17,19 @@ During development you might come back with specific questions.
17
17
# Structure of a Binding
18
18
19
19
Every binding needs to define a `binding.xml` file.
20
-
Find more information in the respective [binding XML reference](binding-xml.html).
20
+
Find more information in the respective [binding XML reference](binding-xml.md).
21
21
22
22
# Describing Things
23
23
24
-
External systems are represented as *Things* in openHAB.
24
+
External systems are represented as *Things* in OpenSmartHouse.
25
25
When starting the implementation of a binding, you should think about the abstraction of your external system.
26
26
Different services or devices should be represented as individual *Things*.
27
27
Each functionality of the *Thing* should be modelled as a `Channel`.
28
28
29
-
*Thing* and *Channel* structures need to be explained to the openHAB runtime.
29
+
*Thing* and *Channel* structures need to be explained to the OpenSmartHouse runtime.
30
30
This is done in a declarative way via XML files, so called *ThingTypes* and *ChannelTypes*.
31
31
32
-
Find more information in the respective [Thing & Channel XML reference](thing-xml.html).
32
+
Find more information in the respective [Thing & Channel XML reference](thing-xml.md).
33
33
34
34
# The ThingHandlerFactory
35
35
@@ -39,7 +39,7 @@ The `ThingHandlerFactory` is responsible for creating `ThingHandler` instances.
39
39
40
40
Every binding must implement a `ThingHandlerFactory` and register it as OSGi service so that the runtime knows which class needs to be called for creating and handling things.
41
41
42
-
When a new *Thing* is added, the openHAB runtime queries every `ThingHandlerFactory` for support of the *ThingType* by calling the `supportsThingType` method.
42
+
When a new *Thing* is added, the OpenSmartHouse runtime queries every `ThingHandlerFactory` for support of the *ThingType* by calling the `supportsThingType` method.
43
43
When the method returns `true`, the runtime calls `createHandler`, which should then return a proper `ThingHandler` implementation.
44
44
45
45
A weather bindings `WeatherHandlerFactory` for example supports only one *ThingType* and instantiates a new `WeatherHandler` for a given thing:
@@ -124,10 +124,10 @@ The `ThingManager` creates for each Thing a `ThingHandler` instance using a `Thi
124
124
Therefore, it tracks all `ThingHandlerFactory`s from the binding.
125
125
126
126
The `ThingManager` determines if the `Thing` is initializable or not.
127
-
A `Thing` is considered as *initializable* if all *required* configuration parameters (cf. property *parameter.required* in [Configuration Description](config-xml.html)) are available.
127
+
A `Thing` is considered as *initializable* if all *required* configuration parameters (cf. property *parameter.required* in [Configuration Description](config-xml.md)) are available.
128
128
If so, the method `ThingHandler.initialize()` is called.
129
129
130
-
Only Things with status (cf. [Thing Status](../../concepts/things.html#thing-status)) *UNKNOWN*, *ONLINE* or *OFFLINE* are considered as *initialized* by the framework and therefore it is the handler's duty to assign one of these states sooner or later.
130
+
Only Things with status (cf. [Thing Status](../../concepts/things.md#thing-status)) *UNKNOWN*, *ONLINE* or *OFFLINE* are considered as *initialized* by the framework and therefore it is the handler's duty to assign one of these states sooner or later.
131
131
To achieve that, the status must be reported to the framework via the callback or `BaseThingHandler.updateStatus(...)` for convenience.
132
132
Furthermore, the framework expects `initialize()` to be non-blocking and to return quickly.
133
133
For longer running initializations, the implementation has to take care of scheduling a separate job which must guarantee to set the status eventually.
If you would like to add meta data to your thing, e.g. the vendor of the thing, then you can define your own thing properties by simply adding them to the thing type definition.
198
-
The properties section [here](thing-definition.html#Properties) explains how to specify such properties.
198
+
The properties section [here](thing-definition.md#Properties) explains how to specify such properties.
199
199
200
200
To retrieve the properties one can call the operation `getProperties` of the corresponding `org.eclipse.smarthome.core.thing.type.ThingType` instance.
201
201
If a thing will be created for this thing type then its properties will be automatically copied into the new thing instance.
@@ -331,7 +331,7 @@ It is binding specific when the channel should be triggered.
331
331
332
332
## Updating the Thing Status
333
333
334
-
The *ThingHandler* must also manage the thing status (see also: [Thing Status Concept](../../concepts/things.html#thing-status)).
334
+
The *ThingHandler* must also manage the thing status (see also: [Thing Status Concept](../../concepts/things.md#thing-status)).
335
335
If the device or service is not working correctly, the binding should change the status to *OFFLINE* and back to *ONLINE*, if it is working again.
336
336
The status can be updated via an inherited method from the BaseThingHandler class by calling:
The second argument of the method takes a `ThingStatusDetail` enumeration value, which further specifies the current status situation.
343
-
A complete list of all thing statuses and thing status details is listed in the [Thing Status](../../concepts/things.html#thing-status) chapter.
343
+
A complete list of all thing statuses and thing status details is listed in the [Thing Status](../../concepts/things.md#thing-status) chapter.
344
344
345
345
The binding should also provide additional status description, if available.
346
346
This description might contain technical information (e.g. an HTTP status code, or any other protocol specific information, which helps to identify the current problem):
@@ -468,7 +468,7 @@ The Hue gateway is an IP device with an HTTP API, which communicates over the Zi
468
468
In the openHAB model the Hue gateway is represented as a *Bridge* with connected *Things*, that represent the Hue bulbs.
469
469
*Bridge* inherits from *Thing*, so that it also has *Channels* and all other features of a thing, with the addition that it also holds a list of things.
470
470
471
-
We have a FAQ, dicussing [Thing, Bridge and Channel modelling](faq.html#structuring-things-and-thing-types).
471
+
We have a FAQ, dicussing [Thing, Bridge and Channel modelling](faq.md#structuring-things-and-thing-types).
472
472
473
473
When implementing a binding with *Bridges*, the logic to communicate with the external system is often shared between the different `ThingHandler` implementations.
474
474
In that case it makes sense to implement a handler for the *Bridge* and delegate the actual command execution from the *ThingHandler* to the *BridgeHandler*.
@@ -549,7 +549,7 @@ Sub-classes of these handlers must only override the operation `getConfigStatus`
549
549
550
550
The framework will take care of internationalizing messages.
551
551
552
-
For this purpose there must be an [i18n](../utils/i18n.html) properties file inside the bundle of the configuration status provider that has a message declared for the message key of the `ConfigStatusMessage`.
552
+
For this purpose there must be an [i18n](../utils/i18n.md) properties file inside the bundle of the configuration status provider that has a message declared for the message key of the `ConfigStatusMessage`.
553
553
The actual message key is built by the operation `withMessageKeySuffix(String)` of the message´s builder in the manner that the given message key suffix is appended to *config-status."config-status-message-type."*.
554
554
555
555
As a result depending on the type of the message the final constructed message keys are:
@@ -652,7 +652,7 @@ TODO
652
652
653
653
# Implementing a Discovery Service
654
654
655
-
Bindings can implement the `DiscoveryService` interface and register it as an OSGi service to inform the framework about devices and services, that can be added as things to the system (see also [Inbox & Discovery Concept](../../concepts/discovery.html)).
655
+
Bindings can implement the `DiscoveryService` interface and register it as an OSGi service to inform the framework about devices and services, that can be added as things to the system (see also [Inbox & Discovery Concept]../discovery/index.md)).
656
656
657
657
A discovery service provides discovery results.
658
658
The following table gives an overview about the main parts of a `DiscoveryResult`:
@@ -792,7 +792,7 @@ If this behavior is not appropriate for the implemented discovery service, one c
792
792
## Internationalization
793
793
794
794
The framework will take care of internationalizing labels of discovery results if you extend the `AbstractDiscoveryService`.
795
-
See [i18n](../utils/i18n.html#discovery) for more information.
795
+
See [i18n](../utils/i18n.md#discovery) for more information.
796
796
797
797
::: tip Hint!
798
798
To make it work you have to inject references to the `LocaleProvider` and the `TranslationProvider` services into your implementation.
@@ -886,4 +886,4 @@ TODO
886
886
887
887
# Frequently asked questions / FAQ
888
888
889
-
Various binding related questions are answered in our [Binding development FAQ](faq.html).
889
+
Various binding related questions are answered in our [Binding development FAQ](faq.md).
Copy file name to clipboardExpand all lines: docs/src/main/resources/markdown/developers/bindings/thing-xml.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Bindings may optionally set the version of a thing type. This may be used within
59
59
60
60
### Thing Categories
61
61
62
-
A description about thing categories as well as an overview about which categories exist can be found in our [categories overview](../../concepts/categories.html).
62
+
A description about thing categories as well as an overview about which categories exist can be found in our [categories overview](../fundamentals/categories.md).
Copy file name to clipboardExpand all lines: docs/src/main/resources/markdown/developers/discovery/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,11 +64,11 @@ If an entry is ignored, it will be hidden in the inbox without creating a Thing
64
64
65
65
OpenSmartHouse offers a service to automatically ignore discovery results in the inbox, whenever a Thing is created manually, that represents the same Thing, as the respective discovery result would create.
66
66
This Thing would either have the same Thing UID or the value of its representation property is equal to the representation property's value in the discovery result.
67
-
This service is enabled by default but can be disabled by setting `org.eclipse.smarthome.inbox:autoIgnore=false`.
67
+
This service is enabled by default but can be disabled by setting `org.openhab.inbox:autoIgnore=false`.
68
68
69
69
## Auto Approve
70
70
71
71
If the manual acceptance of discovery results by the user is not desired, it is possible to turn on the auto-approval feature of the inbox.
72
72
In this case, every new entry gets automatically approved immediately (unless it has been marked as ignored as a duplicate).
73
73
74
-
The auto approval can be enabled by the setting `org.eclipse.smarthome.inbox:autoApprove=true`; the default is false.
74
+
The auto approval can be enabled by the setting `org.openhab.inbox:autoApprove=true`; the default is false.
0 commit comments