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: bundles/org.openhab.binding.boschshc/DEVELOPERS.md
+17
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,22 @@
1
1
# For Developers
2
2
3
+
## Typical Workflow for Supporting new Devices / Services / Channels
4
+
5
+
1. Define new thing types and channel types in `src/main/resources/OH-INF/thing/thing-types.xml`
6
+
1. If `thing-types.xml` was modified, re-generate the i18n properties file by running Maven with the goal `i18n:generate-default-translations`
7
+
1. Define constants for new thing/channel types in `BoschSHCBindingConstants`
8
+
1. Create new packages for services that are not implemented yet and create service classes
9
+
1. Create new DTO packages for new services and implement data transfer model classes / enums according to the JSON structure of the service requests
10
+
1. Create a new handler or extend existing handlers to update channel states according to what was received, and/or to send new states to the Bosch Smart Home Controller in case of writable channels
11
+
1. Register new handlers in `BoschSHCHandlerFactory`, if applicable
12
+
1. Register new thing types in `ThingDiscoveryService`, if applicable
13
+
1. Implement unit tests for new handlers / services / model classes
14
+
15
+
1. If channels were added to existing devices/things, add a migration instruction set to `src/main/resources/update/binding.xml`
16
+
1. Add documentation for new things/channels to `README.md`
17
+
1. Apply automatic code formatting by running a Maven build with goal `spotless:apply`
18
+
1. Build the binding by running a Maven build with goals `clean install`
19
+
3
20
## Build
4
21
5
22
To only build the Bosch Smart Home binding code execute
@@ -131,6 +131,23 @@ Detects open windows and doors and features an additional button.
131
131
| bypass | Switch |☐| Indicates whether the device is currently bypassed. Possible values are `ON`,`OFF` and `UNDEF` if the bypass state cannot be determined. |
132
132
| signal-strength | Number |☐| Communication quality between the device and the Smart Home Controller. Possible values range between 0 (unknown) and 4 (best signal strength). |
133
133
134
+
### Door/Window Contact II Plus
135
+
136
+
Detects open windows and doors, provides a configurable button and a vibration sensor.
137
+
138
+
**Thing Type ID**: `window-contact-2-plus`
139
+
140
+
| Channel Type ID | Item Type | Writable | Description |
| contact | Contact |☐| Contact state of the device. |
143
+
| battery-level | Number |☐| Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK`: 100, `LOW_BATTERY`: 10, `CRITICAL_LOW`: 1, `CRITICALLY_LOW_BATTERY`: 1, `NOT_AVAILABLE`: `UNDEF`. |
144
+
| low-battery | Switch |☐| Indicates whether the battery is low (`ON`) or OK (`OFF`). |
145
+
| bypass | Switch |☐| Indicates whether the device is currently bypassed. Possible values are `ON`,`OFF` and `UNDEF` if the bypass state cannot be determined. |
146
+
| signal-strength | Number |☐| Communication quality between the device and the Smart Home Controller. Possible values range between 0 (unknown) and 4 (best signal strength). |
147
+
| vibration-sensor-enabled | Switch |☑| Channel to enable or disable the vibration sensor. |
148
+
| vibration-sensor-sensitivity | String |☑| The sensitivity of the vibration sensor. Possible values are `VERY_HIGH`, `HIGH`, `MEDIUM`, `LOW` and `VERY_LOW`. |
149
+
| vibration-sensor-state | String |☐| Indicates whether vibrations were detected by the sensor. Possible values are `NO_VIBRATION`, `VIBRATION_DETECTED` and `UNKNOWN`. |
150
+
134
151
### Light Control II
135
152
136
153
This thing type is used if Light/Shutter Control II devices are configured as light controls.
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.boschshc/src/main/java/org/openhab/binding/boschshc/internal/console/BoschShcCommandExtension.java
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.boschshc/src/main/java/org/openhab/binding/boschshc/internal/devices/BoschSHCBindingConstants.java
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.boschshc/src/main/java/org/openhab/binding/boschshc/internal/devices/BoschSHCHandlerFactory.java
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.boschshc/src/main/java/org/openhab/binding/boschshc/internal/discovery/ThingDiscoveryService.java
+1
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,7 @@ public class ThingDiscoveryService extends AbstractThingHandlerDiscoveryService<
0 commit comments