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>
* [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>
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>
* 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>
* New translations boschshc.properties (German)
* New translations jinja.properties (German)
* New translations regex.properties (German)
* New translations jsonpath.properties (German)
* New translations xpath.properties (German)
* New translations dynamodb.properties (German)
* New translations jdbc.properties (German)
* New translations neeo.properties (German)
* New translations fsinternetradio.properties (German)
* New translations sonyaudio.properties (German)
* New translations systeminfo.properties (German)
* New translations wemo.properties (German)
* New translations googlestt.properties (German)
* New translations voicerss.properties (German)
* New translations porcupineks.properties (German)
* New translations watsonstt.properties (German)
* New translations voskstt.properties (German)
* New translations deutschebahn.properties (German)
* New translations dwdunwetter.properties (German)
* New translations shelly.properties (German)
* New translations googletts.properties (German)
* New translations http.properties (Italian)
* New translations evcc.properties (German)
* New translations imperihome.properties (Italian)
* New translations voicerss.properties (German)
* New translations dwdunwetter.properties (German)
* [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>
Bump all org.bouncycastle bundles to version 1.70 and added new bcutil-jdk15on jar which was added with v1.69
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* [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>