Commit Graph
33 Commits
Author SHA1 Message Date
David PaceandGitHub bf2d534bcd [boschshc] Update pairing documentation for Smart Home Controller II (#18640)
This is a follow-up PR for #18326.

The documentation update was kindly provided by github user
hofingerandi.

Signed-off-by: David Pace <dev@davidpace.de>
2025-05-04 13:31:32 +02:00
David PaceandGitHub 379b244b1f [boschshc] Use MAC address as default bridge thing ID (#18391)
Signed-off-by: David Pace <dev@davidpace.de>
2025-03-17 20:52:07 +01:00
David PaceandGitHub 5871ead6aa [boschshc] Update location properties when initializing things (#17893)
When a device is initialized, an attempt is made to look up the room
name for the room id specified for the device and to store the room name
in a thing property. This property is also updated if a room change is
detected.

The legacy property `Location` is removed if present. From now on the
property `location` (with proper lower case spelling) is used.

Signed-off-by: David Pace <dev@davidpace.de>
2025-02-20 22:01:18 +01:00
David PaceandGitHub 778f9f61fc [boschshc] Add support for Door/Window Contact II Plus (#18201)
Signed-off-by: David Pace <dev@davidpace.de>
2025-02-19 16:35:12 +01:00
David PaceandGitHub ea978fe953 [boschshc] Provide alarm channel for smoke detectors (#18194)
Signed-off-by: David Pace <dev@davidpace.de>
2025-02-06 22:46:53 +01:00
David PaceandGitHub c2613c7759 [boschshc] Fix NPE during deserialization, make long polling more robust (#17190)
* Fix NPE while deserializing service data JSON objects
* Catch exceptions while handling long poll results
* Correct @type name for user-defined states
* Add unit tests and enhance existing unit tests

Signed-off-by: David Pace <dev@davidpace.de>
2024-08-13 20:20:51 +02:00
David PaceandGitHub a7f52deaba [boschshc] Handle relay mode changes during initialization (#17160)
* [boschshc] Handle relay mode changes during initialization

Signed-off-by: David Pace <dev@davidpace.de>
2024-08-01 09:44:11 +02:00
David PaceandGitHub 64fc6bcd1f [boschshc] Support for Smart Relay (#17026)
* [boschshc] Support for Smart Relay

Signed-off-by: David Pace <dev@davidpace.de>
2024-07-22 21:10:29 +02:00
David PaceandGitHub 33a9894bde [bosesoundtouch] Fix parsing of metadata fields (#16898)
XML text content was not processed correctly in case the value contained XML entities. 
Signed-off-by: David Pace <dev@davidpace.de>
2024-06-27 19:22:29 +02:00
David PaceandGitHub 23a68c502a [boschshc] Bump Bouncy Castle Dependencies to 1.78.1 (#16855)
This relates to the following issue and security alerts:
* https://github.com/openhab/openhab-addons/issues/16459
* https://github.com/openhab/openhab-addons/security/dependabot/81
* https://github.com/openhab/openhab-addons/security/dependabot/82
* https://github.com/openhab/openhab-addons/security/dependabot/83

Signed-off-by: David Pace <dev@davidpace.de>
2024-06-10 22:19:49 +02:00
David PaceandGitHub 170d81b4b1 [boschshc] Support for Smart Water Alarm (#16770)
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>
2024-05-29 16:10:48 +02:00
David PaceandGitHub b4f973608f [boschshc] Add support for Dimmer (#16501)
Adds support for Bosch Smart Home Dimmer devices.

Signed-off-by: David Pace <dev@davidpace.de>
2024-04-01 12:26:03 +02:00
David PaceandGitHub 12660f1c26 [boschshc] Boost unit test coverage (#16500)
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%.

Signed-off-by: David Pace <dev@davidpace.de>
2024-03-31 21:19:25 +02:00
David PaceandGitHub b77172c6bb [boschshc] Add support for Light/Shutter Control II (#16400)
* [boschshc] Add support for Shutter Control II (#14562)
* add new channel type for child protection

Signed-off-by: David Pace <dev@davidpace.de>
2024-03-31 10:36:43 +02:00
David PaceandGitHub d592f66c49 [boschshc] fix wrong config description references (#16342)
wrong references were introduced during copy & paste from the previous
thing type definition

Signed-off-by: David Pace <dev@davidpace.de>
2024-01-31 23:25:30 +01:00
David PaceandGitHub 15642af6b0 [boschshc] Support for Universal Switch I + II (#16274)
* [boschshc] Support for Universal Switch I + II

- add thing type and channel type definitions
- re-generate i18n file
- add constants
- add model classes and enums
- implement service and handlers
- register handlers in factory
- register devices in discovery

closes #16244

Signed-off-by: David Pace <dev@davidpace.de>
2024-01-18 22:43:44 +01:00
David PaceandGitHub 777def6ed2 [boschshc] Cache mDNS-based bridge discovery results (#16211)
* [boschshc] Cache mDNS-based bridge discovery results

The bridge discovery participant receives lots of mDNS events.
Previously, all events that contained IP addresses of potential bridges
were actively contacted using HTTP requests. On some systems eventually
the long polling stops due to too many requests.

With this change, we
* only consider mDNS events where the name property starts with "Bosch
SHC"
* cache already discovered bridges so we don't have to contact them over
and over again
* make sure that this happens in a thread-safe manner because the mDNS
events are handled in individual concurrently running threads

Signed-off-by: David Pace <dev@davidpace.de>
2024-01-15 21:09:45 +01:00
David PaceandGitHub 6968522c11 [boschshc] Handle invalid long poll responses gracefully (#16002)
If the long poll response from the Smart Home Controller does not
contain valid JSON, the subscription is gracefully terminated a new one
is initiated after 15 seconds.

closes #15912

Signed-off-by: David Pace <dev@davidpace.de>
2024-01-04 08:19:33 +01:00
David PaceandGitHub 288e8ff494 [boschshc] Fix options for channels with Switch items (#16161)
* [boschshc] Fix options for channels with Switch items

Previously, the option values partially contained Bosch-specific states
instead of the openHAB-specific states ON and OFF.

The option values were fixed and the descriptions were
enhanced/shortened since the UI only provides little space for the state
descriptions.

Signed-off-by: David Pace <dev@davidpace.de>
2023-12-31 12:56:04 +01:00
David PaceandGitHub 4585422c4a [boschshc] Support for Door/Window Contact II (#16093)
* [boschshc] Support for Door/Window Sensor II

* add new thing type for Door/Window Sensor II
* add channel types for bypass state and communication quality
* add handler extending the basic Door/Window Sensor handler
* add service implementations
* register handler in discovery service
* add unit tests
* re-generate i18n properties file
* add documentation

closes #15954

Signed-off-by: David Pace <dev@davidpace.de>
2023-12-31 11:40:43 +01:00
David PaceandGitHub 2b9b3dfa0f [boschshc] Add support for motion detector illuminance sensor (#16021)
* [boschshc] Add support for motion detector illuminance sensor

- add channel and corresponding channel type
- add update description
- add state model
- implement service and handler
- add documentation
- add unit test

---------

Signed-off-by: David Pace <dev@davidpace.de>
2023-12-11 00:57:59 +01:00
David PaceandGitHub ff873fff14 [boschshc] Update active profile of intrusion detection system (#15899)
* [boschshc] Update active profile of intrusion detection system

Fixes an issue that caused the active configuration profile of the
intrusion detection system not to be updated.

closes #15848

* [boschshc] add channel to control state service registration

Signed-off-by: David Pace <dev@davidpace.de>
2023-11-20 20:59:52 +01:00
David PaceandGitHub 123982dcc6 [boschshc] Code enhancements and Sonar issue fixes (#15160)
* replace call to deprecated HSBType::getRGB() with
ColorUtil::hsbTosRgb()
* make constructors of abstract classes protected
* use instanceof with pattern matching (JEP 305)
* enhance switches with combined cases using comma-separated case
expressions
* remove unnecessary public modifiers in unit tests

Signed-off-by: David Pace <dev@davidpace.de>
2023-07-04 23:25:13 +02:00
David PaceandGitHub 13a036e30d [boschshc] Upgrade to REST API version 3.2 (#15053) (#15067)
closes #15053

Signed-off-by: David Pace <dev@davidpace.de>
2023-06-11 17:52:26 +02:00
David PaceandGitHub cc626de89a Support for Thermostat SilentMode (#14779) (#14781)
- Add new channel definition for silent mode
- Implement silent mode service
- Add unit tests
- Add documentation
- Fix some minor documentation issues

Closes #14779

Signed-off-by: David Pace <dev@davidpace.de>
2023-04-11 22:09:56 +02:00
David PaceandGitHub 1a7a1251d4 [boschshc] Enhance device associations in discovery (#14672) (#14752)
- fix door/window contact device model (SWD instead of WRC2)
- fix in-wall light switch device model (BSM instead of PSM)
- fix thing type of BWTH (should be a wall thermostat, not a thermostat)
- add association for PSM (smart plug)
- add association for LEDVANCE_LIGHT (smart light bulb)
- add association for TRV (thermostat)

Closes #14672

Signed-off-by: David Pace <dev@davidpace.de>
2023-04-11 20:54:12 +02:00
David PaceandGitHub ed20ebb41b [boschshc] Code Enhancements (#14667)
* [boschshc] Code Enhancements

This commit fixes several compiler warnings as well as several
Checkstyle, FindBugs, PMD and Sonar issues.

* instantiate loggers consistently
* add missing logger calls
* add chained exceptions to logger calls
* provide central Gson instance that does not serialize or deserialize
loggers
* avoid catching NullPointerExceptions
* extract methods where cyclomatic complexity was too high
* remove unnecessary null check in combination with instanceof
* rename local variables that shadow fields
* add missing @NonNull and @Nullable annotations

Signed-off-by: David Pace <dev@davidpace.de>
2023-03-30 18:31:54 +02:00
David PaceandGitHub 8306210a13 [boschshc] Add unit tests (#14426)
Signed-off-by: David Pace <dev@davidpace.de>
2023-02-20 08:56:29 +01:00
David PaceandGitHub 1251873843 [boschshc] Support smart light bulbs (#13725)
* [boschshc] Support smart light bulbs (#13707)

* add thing type definition for smart bulbs using system channels
* add constants for thing type and channels
* implement and register handler
* implement binary switch service (to switch on/off)
* implement multi-level switch service (allows to get/set brightness
from 0-100%)
* implement service to get and set colors
* add unit tests for handler and state classes
- update documentation

Signed-off-by: David Pace <dev@davidpace.de>
2022-11-20 22:12:49 +01:00
David PaceandGitHub 49fa349590 [boschshc] Support obtaining battery states (#13461) (#13631)
This change adds support for obtaining the battery state for the
following devices:

* Motion Detector
* Thermostat
* Twinguard
* Wall Thermostat
* Window/Door Contact

The following changes were made:

* Add system.battery-level and system.low-battery channels to Motion
Detector, Thermostat, Twinguard, Wall Thermostat and Window/Door Contact
* Add constant for battery-level and low-battery channels in
BoschSHCBindingConstants
* Implement abstract handler and service for battery-powered devices
* Let appropriate devices inherit the abstract implementation
* Add missing super calls in initializeServices() methods
* Rename existing getServiceURL() to getServiceStateURL() in HTTP client
* Add methods to retrieve service states without the suffix "/state" in
the URL
* Rename DeviceStatusUpdate to DeviceServiceData
* Let DeviceServiceData extend BoschSHCServiceState
* Extend DeviceServiceData DTO with model for faults
* Enhance bridge handler: handle updates without state sub-objects,
extract methods to enhance readability
* Add unit tests for all affected devices
* Minor code enhancements
* Update documentation

Signed-off-by: David Pace <dev@davidpace.de>
2022-11-11 08:23:48 +01:00
David PaceandGitHub 71da06dac7 [boschshc] Support for Compact Smart Plugs (#13528) (#13533)
* add thing definition with ID "smart-plug-compact"
* add constant for thing type UID
* extract abstract implementation for devices with power switch and
energy monitoring
* let in-wall switch handler and smart plug handler extend the abstract
implementation
* register new handler
* add method with boolean parameter to fetch initial state actively
* make BoschSHCDeviceHandler abstract
* add documentation
* add unit tests

closes #13528

Signed-off-by: David Pace <dev@davidpace.de>
2022-10-31 17:21:25 +01:00
David PaceandGitHub c16e9df7a0 [boschshc] Support for Bosch Intrusion Detection System (#12700) (#12758)
* [boschshc] Support for Bosch Intrusion Detection System (#12700)

* Add thing and channel definitions for intrusion detection system
* Extract handler abstraction for devices with non-configurable device
IDs
* Extract service abstractions for write-only services (i.e. services
that can not receive states from the bridge)
* Add handler, services and DTO implementations for the intrusion
detection system
* Add detailed Javadocs
* Generalize mechanism to actively fetch initial states for certain
services
* Add unit tests
* Add documentation

closes #12700

* [boschshc] Documentation and formatting enhancements

Signed-off-by: David Pace <dev@davidpace.de>
2022-05-22 21:45:55 +02:00
DaveandGitHub 8460054c9d [boschshc] Support Bosch Smart Home Cameras (#12666) (#12680)
* [boschshc] Support Bosch Smart Home Cameras (#12666)

- add thing definitions for indoor security camera 360 and outdoor
security camera Eyes
- implement services for privacy mode and camera notifications
- implement camera handler
- add unit tests
- update documentation

* [boschshc] Enhance logging and comments (#12666)

* only log on debug level when initial state can not be retrieved
* do not log stack traces
* minor Javadoc fixes

closes #12666

Signed-off-by: David Pace <dev@davidpace.de>
2022-05-06 23:13:04 +02:00