* [boschshc] add command to list Bosch Smart Home Controller devices and mapping to openhab devices and related services
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* [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>
* [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>
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>
* [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>
* [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>
* [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>
* [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>
* 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>
- 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>
- 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>
* [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>
* #14195 Bridge and Device Discovery
Bridge discovery is implemented via mDNS, local IP addresses are checked.
If a GET returns the public SHC information,
then this shcIpAddress is reported as a discovered bridge.
Devices are always discovered after successful pairing, but a manual scan is also possible.
Added unit tests for Bridge and Device Discovery.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add smoke detector service and add it to twinguard handler
* Add handler for smoke detector
* Support for smoke detector
added smoke detector device with SmokeDetectorCheckService
added SmokeDetectorCheckService to TwinguardHandler
added tests for smoke detector code
updated smoke detector code to latest boschshc version after cherry-picks of initial code from Christian Oeing
* re-generate i18n file, refactoring of smoke detector code to use abstract base classes
* Fix typos
* Add unit test for PlayPauseType commands
* Add unit test for SmokeDetectorCheckState
* Re-add null annotation
* Fix warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: David Pace <dev@davidpace.de>