Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[boschshc] Initial contribution - Bindings for Bosch Smart Home devices #8371

Closed
wants to merge 121 commits into from
Closed
Show file tree
Hide file tree
Changes from 111 commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
31102cc
Initial code from create_openhab_binding_skeleton.sh
stefan-kaestle Nov 16, 2019
bb22e17
Proof-of-concept: receive list of rooms and list of devices from cont…
stefan-kaestle Nov 18, 2019
f81c8a0
Added subscribe and longPoll API calls
stefan-kaestle Nov 19, 2019
59f41b0
Added classes representing data from the longPoll RPC call
stefan-kaestle Nov 19, 2019
60d529e
Made long poll API call asynchronous
stefan-kaestle Nov 20, 2019
f1eb73d
Added bridge + reorganized code
stefan-kaestle Nov 21, 2019
497ebee
Fixed compilation errors after refactoring
stefan-kaestle Nov 21, 2019
68a7a20
Updating the power switch state works for a single hard-coded device
stefan-kaestle Nov 23, 2019
462c3a4
Support multiple power switches: bridge ask handlers for their bosch IDs
stefan-kaestle Nov 23, 2019
f0bae5e
Can now switch lights + refresh light state on REFRESH
stefan-kaestle Nov 24, 2019
f99ce7c
Reduce debug output
stefan-kaestle Nov 27, 2019
b03fdb6
Added meta information for Bosch binding
stefan-kaestle Nov 27, 2019
e672824
Set binding online only if fetching rooms and devices worked
stefan-kaestle Dec 23, 2019
1f7bef4
Replaced hard-coded IP address with configuration from things file
stefan-kaestle Dec 23, 2019
7c142bd
Fixes after rebasing on 2.5.x branch
stefan-kaestle Dec 23, 2019
a6a0616
Put keystore where openhab user can access it
stefan-kaestle Dec 23, 2019
7ae51ee
Attempt to get a new subscription ID when the old one is invalidated
stefan-kaestle Feb 15, 2020
3ee7c8c
Better install script
stefan-kaestle Feb 27, 2020
263730e
Asynchronously get subscription ID
stefan-kaestle Feb 27, 2020
98c1636
Initial steps towards pairing
stefan-kaestle Mar 15, 2020
7996f0b
Doesn't compile because of bouncycastle - compiles if commented out
stefan-kaestle Mar 15, 2020
5f29e07
Bumped version
stefan-kaestle Mar 15, 2020
8afb3f6
Added basic support for multiple devices to support Twinguard
stefan-kaestle Mar 29, 2020
d281fff
Support for power meter in power switches + all values from Twinguard
stefan-kaestle Mar 29, 2020
926aae4
Add window contact to the list of supported things
stefan-kaestle Mar 29, 2020
80d3970
Updated README to indicate new supported devices
stefan-kaestle Mar 29, 2020
526f2d2
Added missing file
stefan-kaestle Apr 4, 2020
64a0cd4
Added motion detector thing
stefan-kaestle Apr 4, 2020
3384722
All devices support RefreshType now
stefan-kaestle Apr 4, 2020
24409ec
Cleanup - removed pairing related stuff that doesn't work
stefan-kaestle Apr 5, 2020
ad997d9
Fixed a weird bug where InWallSwitchHandler was not an instance of SH…
stefan-kaestle Apr 5, 2020
3b39ea3
Update BoschSHCBridgeHandler.java
GerdZanker Jun 7, 2020
fd42c5a
Add handler for Bosch Shutter Control to get and set its open level
Jun 9, 2020
9c5d78b
Auto update of .classpath by IDE
Jun 9, 2020
752feee
Handle PercentType command to set a specific shutter level
Jun 11, 2020
5b7234a
Put service name in constant instead of using it hard coded twice
Jun 11, 2020
1f4ec04
Refactor putState method of BoschSHCBridgeHandler
Jun 11, 2020
46dbe35
Send operation state STOPPED to stop shutter from moving
Jun 11, 2020
edbdf60
Add shutter control to supported devices in README.md
Jun 15, 2020
396ece1
Add null reference check to avoid a NullReferenceException in Shutter…
Jun 15, 2020
d518407
Add TemperatureLevelService
Jun 15, 2020
50993db
Add ThermostatHandler
Jun 15, 2020
3d54b79
Add valve tappet position channel to thermostat via ValveTappet service
Jun 16, 2020
b36558a
Add service registration for BoschSHCHandler, so the state updates ar…
Jun 22, 2020
125510a
Add affectedChannels to service registration and handle RefreshType d…
Jun 22, 2020
0aa9faf
Cleaned up DeviceStatusUpdate class
Jun 24, 2020
4578cc6
added Bosch SHC certs
GerdZanker Jun 22, 2020
7c717af
added pairing support
GerdZanker Jul 15, 2020
357393d
Add RoomClimateControlService and ClimateControlHandler
Jul 7, 2020
375b2d1
Handle command to set setpoint temperature and move conversion from s…
Jul 7, 2020
7871074
Remove unnecessary imports from ThermostatHandler.java
Jul 7, 2020
ffd8e44
Make new service and handler @NonNullByDefault
coeing Jul 9, 2020
c423a18
Added comments for climate control service, handler and base service …
coeing Jul 11, 2020
bb2dc6a
Add missing comments on new classes and their methods
coeing Jul 17, 2020
43ca090
Make registerService method of BoschSHCHandler private and adjust usages
coeing Jul 17, 2020
a0fb240
Throw an error instead of returning null for method getBridgeHandler …
coeing Jul 17, 2020
70bc046
Add @author tags in JavaDoc of new classes
coeing Jul 17, 2020
c967418
Ran mvn spotless:apply to apply correct code formatting
coeing Jul 11, 2020
65c9afa
Fixed missing imports in BoschSHCService.java
coeing Jul 21, 2020
846bf5c
Fixed warnings about null annotations
coeing Jul 11, 2020
a8d5744
Add @NonNullByDefault to all handlers
coeing Jul 11, 2020
241b958
added license header by executing mvn license:format
GerdZanker Jul 19, 2020
35579ac
#16 Adjust logger usages to not be too verbose
coeing Aug 11, 2020
57456aa
#10 Remove obsolete parse-things.py script
coeing Aug 11, 2020
d80920d
#29 Remove dev scripts install.sh and run.sh scripts
coeing Aug 11, 2020
d5d8203
added author name to each class comment
GerdZanker Jul 19, 2020
dd6d904
added license header for new files
GerdZanker Aug 1, 2020
836b085
run mvn spotless check/apply
GerdZanker Aug 1, 2020
709a598
#24 Catch error response when trying to get state of a service of a d…
coeing Aug 11, 2020
07dd05d
#24 Run mvn spotless:apply and mvn license:format to respect coding g…
coeing Aug 13, 2020
e6e159e
#5 Update README.md with up-to-date information about the setup of th…
coeing Aug 11, 2020
0d1757f
#31 Typo in README.md
coeing Aug 11, 2020
339a7c3
Add detailed description of the system password to provide in README.md
coeing Aug 14, 2020
0489759
Fix non-initialized member of @NonNullByDefault class ValveTappetServ…
coeing Aug 15, 2020
c121d21
#7 Moved each device to a separate subfolder inside devices folder
coeing Aug 16, 2020
3d5625f
#44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNA…
coeing Aug 31, 2020
72be345
#45 Increase year in copyright headers
coeing Aug 31, 2020
21d8c6c
#45 Remove several obsolete loggers and fix logging of exceptions
coeing Aug 31, 2020
1504f5c
#45 Fixed some code analysis warnings
coeing Aug 31, 2020
3c8021f
#45 Ran mvn spotless:apply
coeing Aug 31, 2020
2efa2ce
#45 Revert adding @NonNullByDefault to BoschSHCConfiguration
coeing Aug 31, 2020
ec5f294
#47 Fixed code analysis warnings
coeing Aug 31, 2020
399c262
updated text files based on pull request feedback
GerdZanker Sep 2, 2020
6c47fc6
Apply suggestions from code review
GerdZanker Sep 2, 2020
a4893fd
Improved comments and changed visibility
GerdZanker Sep 2, 2020
f02b007
added @NonNullByDefault annotation where necessary and easy possible
GerdZanker Sep 5, 2020
a3a6784
use SIUnits
GerdZanker Sep 6, 2020
87a52a9
change logging and GSON related code
GerdZanker Sep 6, 2020
41cc874
Add @NonNullByDefault to BoschSHCConfiguration class and remove obsol…
coeing Sep 6, 2020
0e293ad
Throw BoschSHCExceptions instead of generic Errors and handle them du…
coeing Sep 6, 2020
8791e0b
Use Class::new supplier function instead of deprecated Class.newInsta…
coeing Sep 6, 2020
a288d1a
Remove @NonNullByDefault from inner classes and unused logger member …
coeing Sep 7, 2020
fcdf57a
Use Base64.getEncoder().encodeToString instead of Base64.getEncoder()…
coeing Sep 7, 2020
433ac00
Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and c…
coeing Sep 7, 2020
383a8e7
Use try-with-resources to auto-close streams for key store creation
coeing Sep 7, 2020
a086229
Move data transfer objects of bridge into dto folder
coeing Sep 7, 2020
75e8ffa
Add thing type ids and channel type ids to README.md
coeing Sep 8, 2020
4aa3fc7
Move thing configurations out of thing-types.xml and into configs.xml…
coeing Sep 8, 2020
b2b7ad8
Adjust some elements, units, descriptions and labels in configs.xml a…
coeing Sep 8, 2020
ec6d1fe
Move url and request creation from BoschSHCBridgeHandler to BoschHttp…
coeing Sep 11, 2020
037addc
Add default timeout to request to smart home controller
coeing Sep 11, 2020
2ab5c11
Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpC…
coeing Sep 11, 2020
13a9105
Make gson field in BoschSHCBridgeHandler final
coeing Sep 11, 2020
046c804
Simplify getDevices method of BoschSHCBridgeHandler
coeing Sep 11, 2020
75b5cdb
Use getContentAsString() instead of getContent() plus manual conversi…
coeing Sep 11, 2020
339ff2d
Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
coeing Sep 11, 2020
8976d2a
Add registerService method to BoschSHCHandler to register already cre…
coeing Sep 11, 2020
f020916
Using simpler String.format instead of MessageFormatter in BoschSHCBr…
coeing Sep 11, 2020
fdcdb9b
Move ShutterControlState into dto subfolder and remove @NonNullByDefa…
coeing Sep 11, 2020
890ab0d
Make bridgeHandler and deviceId in BoschSHCService @Nullable
coeing Sep 11, 2020
df93d9b
Move DTOs in dto subfolders and remove @NonNullByDefault annotations …
coeing Sep 11, 2020
5091727
Add texts for errors during initialization of bridge
coeing Sep 15, 2020
d7d9d2e
Migrate PowerSwitch to new service architecture to get rid of BoschSH…
coeing Sep 15, 2020
6178537
Remove obsolete null parameter from subscription request
coeing Sep 15, 2020
7953fb5
Removed obsolete TODO about hard-coded data which does not exist anymore
coeing Sep 15, 2020
89ddf38
Use lambda for response handling of long poll
coeing Sep 15, 2020
f401c5f
Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
coeing Sep 15, 2020
e45ab13
Throw http exceptions when trying to request state from a device to s…
coeing Sep 15, 2020
fc375bf
Add state options for combined-rating, temperature-rating and humidit…
coeing Sep 20, 2020
49c9bb8
Fix several minor static code analysis warnings
coeing Sep 20, 2020
49303a6
fix HTTP client issue, improve connection logging, add Developers mar…
GerdZanker Sep 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/bundles/org.openhab.binding.bluetooth.daikinmadoka/ @blafois
/bundles/org.openhab.binding.bluetooth.ruuvitag/ @ssalonen
/bundles/org.openhab.binding.boschindego/ @jofleck
/bundles/org.openhab.binding.boschshc/ @stefan-kaestle @coeing @GerdZanker
/bundles/org.openhab.binding.bosesoundtouch/ @marvkis @tratho
/bundles/org.openhab.binding.bsblan/ @hypetsch
/bundles/org.openhab.binding.bticinosmarther/ @MrRonfo
Expand Down
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@
<artifactId>org.openhab.binding.boschindego</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.boschshc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.bosesoundtouch</artifactId>
Expand Down
32 changes: 32 additions & 0 deletions bundles/org.openhab.binding.boschshc/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
23 changes: 23 additions & 0 deletions bundles/org.openhab.binding.boschshc/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.binding.boschshc</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
13 changes: 13 additions & 0 deletions bundles/org.openhab.binding.boschshc/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This content is produced and maintained by the openHAB project.

* Project home: https://www.openhab.org

== Declared Project Licenses

This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

== Source Code

https://github.com/openhab/openhab-addons
170 changes: 170 additions & 0 deletions bundles/org.openhab.binding.boschshc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# BoschSHC Binding

Binding for the Bosch Smart Home Controller.

- [BoschSHC Binding](#boschshc-binding)
- [Supported Things](#supported-things)
- [Bosch In-Wall switches & Bosch Smart Plugs](#bosch-in-wall-switches--bosch-smart-plugs)
- [Bosch TwinGuard smoke detector](#bosch-twinguard-smoke-detector)
- [Bosch Window/Door contacts](#bosch-windowdoor-contacts)
- [Bosch Motion Detector](#bosch-motion-detector)
- [Bosch Shutter Control in-wall](#bosch-shutter-control-in-wall)
- [Bosch Thermostat](#bosch-thermostat)
- [Bosch Climate Control](#bosch-climate-control)
- [Limitations](#limitations)
- [Discovery](#discovery)
- [Binding Configuration](#binding-configuration)
- [Getting the device IDs](#getting-the-device-ids)
- [Thing Configuration](#thing-configuration)
- [Item Configuration](#item-configuration)

## Supported Things

### Bosch In-Wall switches & Bosch Smart Plugs

**Thing Type ID**: `in-wall-switch`

| Channel Type ID | Item Type | Description |
| ------------------ | --------- | -------------------------------------------- |
| power-switch | Switch | Current state of the switch. |
| power-consumption | Number | Current power consumption (W) of the device. |
| energy-consumption | Number | Energy consumption of the device. |

### Bosch TwinGuard smoke detector

**Thing Type ID**: `twinguard`

| Channel Type ID | Item Type | Description |
| ------------------ | ------------------ | --------------------------------------------- |
| temperature | Number:Temperature | Current measured temperature. |
| temperature-rating | String | Rating of the currently measured temperature. |
| humidity | Number | Current measured humidity. |
| humidity-rating | String | Rating of current measured humidity. |
| purity | String | Purity of the air. |
| purity-rating | String | Rating of current measured purity. |
| air-description | String | Overall description of the air quality. |
| combined-rating | String | Combined rating of the air quality. |

### Bosch Window/Door contacts

**Thing Type ID**: `window-contact`

| Channel Type ID | Item Type | Description |
| --------------- | --------- | ---------------------------- |
| contact | Contact | Contact state of the device. |

### Bosch Motion Detector

**Thing Type ID**: `motion-detector`

| Channel Type ID | Item Type | Description |
| --------------- | --------- | ------------------------------ |
| latest-motion | DateTime | The date of the latest motion. |

### Bosch Shutter Control in-wall

**Thing Type ID**: `shutter-control`

| Channel Type ID | Item Type | Description |
| --------------- | ------------- | ---------------------------------------- |
| level | Rollershutter | Current open ratio (0 to 100, Step 0.5). |

### Bosch Thermostat

**Thing Type ID**: `thermostat`

| Channel Type ID | Item Type | Description |
| --------------------- | ------------------ | ---------------------------------------------- |
| temperature | Number:Temperature | Current measured temperature. |
| valve-tappet-position | Number | Current open ratio of valve tappet (0 to 100). |

### Bosch Climate Control

**Thing Type ID**: `climate-control`

| Channel Type ID | Item Type | Description |
| -------------------- | ------------------ | ----------------------------- |
| temperature | Number:Temperature | Current measured temperature. |
| setpoint-temperature | Number:Temperature | Desired temperature. |

coeing marked this conversation as resolved.
Show resolved Hide resolved
## Limitations

- Discovery of Things
- Discovery of Bridge

## Discovery

Configuration via configuration files or UI (see below).

## Binding Configuration

You need to provide the IP address and the system password of your Bosch Smart Home Controller.
The IP address of the controller is visible in the Bosch Smart Home Mobile App (More -> System -> Smart Home Controller) or in your network router UI.
The system password is set by you during your initial registration steps in the _Bosch Smart Home App_.

A keystore file with a self signed certificate is created automatically.
This certificate is used for pairing between the Bridge and the Bosch SHC.

*Press and hold the Bosch Smart Home Controller Bridge button until the LED starts blinking after you save your settings for pairing*.

## Getting the device IDs

Bosch IDs for found devices are displayed in the openHAB log on bootup (`OPENHAB_FOLDER/userdata/logs/openhab.log`)
coeing marked this conversation as resolved.
Show resolved Hide resolved

Example:

```
2020-08-11 12:42:49.490 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=Heizung id=hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX
2020-08-11 12:42:49.495 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=-RoomClimateControl- id=roomClimateControl_hz_1
2020-08-11 12:42:49.497 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=-VentilationService- id=ventilationService
2020-08-11 12:42:49.498 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=Großes Fenster id=hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX
2020-08-11 12:42:49.501 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=-IntrusionDetectionSystem- id=intrusionDetectionSystem
2020-08-11 12:42:49.502 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=Rollladen id=hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX
2020-08-11 12:42:49.502 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=Heizung id=hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX
2020-08-11 12:42:49.503 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=Heizung Haus id=hdm:ICom:819410185:HC1
2020-08-11 12:42:49.503 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=-RoomClimateControl- id=roomClimateControl_hz_6
2020-08-11 12:42:49.504 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=PhilipsHueBridgeManager id=hdm:PhilipsHueBridge:PhilipsHueBridgeManager
2020-08-11 12:42:49.505 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=Rollladen id=hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX
2020-08-11 12:42:49.506 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=Rollladen id=hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX
2020-08-11 12:42:49.507 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Found device: name=Central Heating id=hdm:ICom:819410185
```

## Thing Configuration

You define your Bosch devices by adding them either to a `.things` file in your `$OPENHAB_CONF/things` folder like this:

```
Bridge boschshc:shc:1 [ ipAddress="192.168.x.y" ] {
Thing in-wall-switch bathroom "Bathroom" [ id="hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX" ]
Thing in-wall-switch bedroom "Bedroom" [ id="hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX" ]
Thing in-wall-switch kitchen "Kitchen" [ id="hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX" ]
Thing in-wall-switch corridor "Corridor" [ id="hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX" ]
Thing in-wall-switch livingroom "Living Room" [ id="hdm:HomeMaticIP:3014F711A000XXXXXXXXXXXX" ]

Thing in-wall-switch coffeemachine "Coffee Machine" [ id="hdm:HomeMaticIP:3014F711A0000XXXXXXXXXXXX" ]

Thing twinguard tg-corridor "Twinguard Smoke Detector" [ id="hdm:ZigBee:000d6f000XXXXXXX" ]
Thing window-contact window-kitchen "Window Kitchen" [ id="hdm:HomeMaticIP:3014F711A00000XXXXXXXXXX" ]
Thing window-contact entrance "Entrance door" [ id="hdm:HomeMaticIP:3014F711A00000XXXXXXXXXX" ]

Thing motion-detector motion-corridor "Bewegungsmelder" [ id="hdm:ZigBee:000d6f000XXXXXXX" ]
}
```

Or by adding them via PaperUI -> Configuration -> Things -> "+" -> Bosch Smart Home Binding.

## Item Configuration

You define the items which should be linked to your Bosch devices via a `.items` file in your `$OPENHAB_CONF/items` folder like this:

```
Switch Bosch_Bathroom "Bath Room" { channel="boschshc:in-wall-switch:1:bathroom:power-switch" }
Switch Bosch_Bedroom "Bed Room" { channel="boschshc:in-wall-switch:1:bedroom:power-switch" }
Switch Bosch_Kitchen "Kitchen" { channel="boschshc:in-wall-switch:1:kitchen:power-switch" }
Switch Bosch_Corridor "Corridor" { channel="boschshc:in-wall-switch:1:corridor:power-switch" }
Switch Bosch_Living_Room "Living Room" { channel="boschshc:in-wall-switch:1:livingroom:power-switch" }

Switch Bosch_Lelit "Lelit" { channel="boschshc:in-wall-switch:1:coffeemachine:power-switch" }
```

Or by adding them via PaperUI -> Configuration -> Items -> "+".
32 changes: 32 additions & 0 deletions bundles/org.openhab.binding.boschshc/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>2.5.9-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.boschshc</artifactId>

<name>openHAB Add-ons :: Bundles :: BoschSHC Binding</name>

<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.54</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.54</version>
<scope>compile</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.boschshc-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>

<feature name="openhab-binding-boschshc" description="BoschSHC Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.boschshc/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.boschshc.internal.devices;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.smarthome.core.thing.ThingTypeUID;

/**
* The {@link BoschSHCBindingConstants} class defines common constants, which
* are used across the whole binding.
*
* @author Stefan Kästle - Initial contribution
* @author Christian Oeing - added Shutter Control, ThermostatHandler
*/
@NonNullByDefault
public class BoschSHCBindingConstants {

private static final String BINDING_ID = "boschshc";

// List of all Thing Type UIDs
public static final ThingTypeUID THING_TYPE_SHC = new ThingTypeUID(BINDING_ID, "shc");

public static final ThingTypeUID THING_TYPE_INWALL_SWITCH = new ThingTypeUID(BINDING_ID, "in-wall-switch");
public static final ThingTypeUID THING_TYPE_TWINGUARD = new ThingTypeUID(BINDING_ID, "twinguard");
public static final ThingTypeUID THING_TYPE_WINDOW_CONTACT = new ThingTypeUID(BINDING_ID, "window-contact");
public static final ThingTypeUID THING_TYPE_MOTION_DETECTOR = new ThingTypeUID(BINDING_ID, "motion-detector");
public static final ThingTypeUID THING_TYPE_SHUTTER_CONTROL = new ThingTypeUID(BINDING_ID, "shutter-control");
public static final ThingTypeUID THING_TYPE_THERMOSTAT = new ThingTypeUID(BINDING_ID, "thermostat");
public static final ThingTypeUID THING_TYPE_CLIMATE_CONTROL = new ThingTypeUID(BINDING_ID, "climate-control");

// List of all Channel IDs
// Auto-generated from thing-types.xml via script, don't modify
public static final String CHANNEL_POWER_SWITCH = "power-switch";
public static final String CHANNEL_TEMPERATURE = "temperature";
public static final String CHANNEL_TEMPERATURE_RATING = "temperature-rating";
public static final String CHANNEL_HUMIDITY = "humidity";
public static final String CHANNEL_HUMIDITY_RATING = "humidity-rating";
public static final String CHANNEL_ENERGY_CONSUMPTION = "energy-consumption";
public static final String CHANNEL_POWER_CONSUMPTION = "power-consumption";
public static final String CHANNEL_PURITY = "purity";
public static final String CHANNEL_AIR_DESCRIPTION = "air-description";
public static final String CHANNEL_PURITY_RATING = "purity-rating";
public static final String CHANNEL_COMBINED_RATING = "combined-rating";
public static final String CHANNEL_CONTACT = "contact";
public static final String CHANNEL_LATEST_MOTION = "latest-motion";
public static final String CHANNEL_LEVEL = "level";
public static final String CHANNEL_VALVE_TAPPET_POSITION = "valve-tappet-position";
public static final String CHANNEL_SETPOINT_TEMPERATURE = "setpoint-temperature";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.boschshc.internal.devices;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;

/**
* The {@link BoschSHCConfiguration} class contains fields mapping thing configuration parameters.
*
* @author Stefan Kästle - Initial contribution
*/
@NonNullByDefault
public class BoschSHCConfiguration {
coeing marked this conversation as resolved.
Show resolved Hide resolved
/**
* ID of the device as returned by the controller.
*/
@Nullable
public String id;
coeing marked this conversation as resolved.
Show resolved Hide resolved
}