-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[boschshc] Support for Smart Water Alarm
Adds support for Bosch Smart Water Alarm devices. * add new thing type and new channel types * add new services for water detector * refactor CameraNotificationState and PrivacyModeState to a common enum EnabledDisabledState that can be re-used in the water detector tilt service states * implement handler for new device * register new device in handler factory and discovery * add unit tests * add documentation Signed-off-by: David Pace <dev@davidpace.de>
- Loading branch information
1 parent
3e3558f
commit 10541f7
Showing
30 changed files
with
956 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
...chshc/src/main/java/org/openhab/binding/boschshc/internal/devices/bridge/dto/Message.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* Copyright (c) 2010-2024 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.bridge.dto; | ||
|
||
import org.openhab.binding.boschshc.internal.services.dto.BoschSHCServiceState; | ||
|
||
/** | ||
* DTO for messages sent by the Smart Home Controller. | ||
* <p> | ||
* JSON Example: | ||
* | ||
* <pre> | ||
* { | ||
* "result": [{ | ||
* "sourceId": "hdm:ZigBee:5cc7c1f6fe11fc23", | ||
* "sourceType": "DEVICE", | ||
* "@type": "message", | ||
* "flags": [], | ||
* "messageCode": { | ||
* "name": "TILT_DETECTED", | ||
* "category": "WARNING" | ||
* }, | ||
* "location": "Kitchen", | ||
* "arguments": { | ||
* "deviceModel": "WLS" | ||
* }, | ||
* "id": "3499a60e-45b5-4c29-ae1a-202c2182970c", | ||
* "sourceName": "Bosch_water_detector_1", | ||
* "timestamp": 1714375556426 | ||
* }], | ||
* "jsonrpc": "2.0" | ||
* } | ||
* </pre> | ||
* | ||
* @author David Pace - Initial contribution | ||
*/ | ||
public class Message extends BoschSHCServiceState { | ||
|
||
/** | ||
* Source type indicating that a message is device-specific | ||
*/ | ||
public static final String SOURCE_TYPE_DEVICE = "DEVICE"; | ||
|
||
public Message() { | ||
super("message"); | ||
} | ||
|
||
public String id; | ||
public String sourceId; | ||
public String sourceName; | ||
public String sourceType; | ||
public String location; | ||
public long timestamp; | ||
|
||
public MessageCode messageCode; | ||
} |
32 changes: 32 additions & 0 deletions
32
...c/src/main/java/org/openhab/binding/boschshc/internal/devices/bridge/dto/MessageCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Copyright (c) 2010-2024 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.bridge.dto; | ||
|
||
/** | ||
* DTO for message codes sent by the Smart Home Controller. | ||
* <p> | ||
* JSON Example: | ||
* | ||
* <pre> | ||
* { | ||
* "name": "TILT_DETECTED", | ||
* "category": "WARNING" | ||
* } | ||
* </pre> | ||
* | ||
* @author David Pace - Initial contribution | ||
*/ | ||
public class MessageCode { | ||
public String name; | ||
public String category; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.