2021-02-13 21:09:30 +01:00
# Bosch Smart Home Binding
2021-01-17 22:20:20 +01:00
2021-02-13 21:09:30 +01:00
Binding for the Bosch Smart Home.
2021-01-17 22:20:20 +01:00
2021-02-13 21:09:30 +01:00
- [Bosch Smart Home Binding ](#bosch-smart-home-binding )
2021-01-17 22:20:20 +01:00
- [Supported Things ](#supported-things )
2023-11-11 14:22:52 +01:00
- [Smart Home Controller ](#smart-home-controller )
2022-10-31 17:21:25 +01:00
- [In-Wall Switch ](#in-wall-switch )
- [Compact Smart Plug ](#compact-smart-plug )
- [Twinguard Smoke Detector ](#twinguard-smoke-detector )
2023-04-11 22:09:56 +02:00
- [Door/Window Contact ](#door-window-contact )
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
- [Motion Detector ](#motion-detector )
- [Shutter Control ](#shutter-control )
- [Thermostat ](#thermostat )
- [Climate Control ](#climate-control )
- [Wall Thermostat ](#wall-thermostat )
2022-05-06 23:13:04 +02:00
- [Security Camera 360 ](#security-camera-360 )
- [Security Camera Eyes ](#security-camera-eyes )
2022-05-22 21:45:55 +02:00
- [Intrusion Detection System ](#intrusion-detection-system )
2022-11-20 22:12:49 +01:00
- [Smart Bulb ](#smart-bulb )
2022-12-10 11:18:13 +01:00
- [Smoke Detector ](#smoke-detector )
2021-01-17 22:20:20 +01:00
- [Limitations ](#limitations )
- [Discovery ](#discovery )
2021-02-13 21:09:30 +01:00
- [Bridge Configuration ](#bridge-configuration )
2021-01-17 22:20:20 +01:00
- [Getting the device IDs ](#getting-the-device-ids )
- [Thing Configuration ](#thing-configuration )
- [Item Configuration ](#item-configuration )
## Supported Things
2023-11-11 14:22:52 +01:00
### Smart Home Controller
The Smart Home Controller is the central hub that allows you to monitor and control your smart home devices from one place.
**Bridge Type ID**: ``shc``
| Channel Type ID | Item Type | Writable | Description |
|--------------------|-----------|:--------:|-------------------------------------------------------------------------|
| scenario-triggered | String | ☐ | Name of the triggered scenario (e.g. by the Universal Switch Flex) |
| trigger-scenario | String | ☑ | Name of a scenario to be triggered on the Bosch Smart Home Controller. |
2022-10-31 17:21:25 +01:00
### In-Wall Switch
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
A simple light control.
2021-01-17 22:20:20 +01:00
**Thing Type ID**: `in-wall-switch`
2022-10-31 17:21:25 +01:00
| Channel Type ID | Item Type | Writable | Description |
| ------------------ | ------------- | :------: | ------------------------------------------------ |
| power-switch | Switch | ☑ | Current state of the switch. |
| power-consumption | Number:Power | ☐ | Current power consumption (W) of the device. |
| energy-consumption | Number:Energy | ☐ | Cumulated energy consumption (Wh) of the device. |
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
2022-10-31 17:21:25 +01:00
### Compact Smart Plug
A compact smart plug with energy monitoring capabilities.
**Thing Type ID**: `smart-plug-compact`
| Channel Type ID | Item Type | Writable | Description |
| ------------------ | ------------- | :------: | ------------------------------------------------ |
| power-switch | Switch | ☑ | Current state of the switch. |
| power-consumption | Number:Power | ☐ | Current power consumption (W) of the device. |
| energy-consumption | Number:Energy | ☐ | Cumulated energy consumption (Wh) of the device. |
2022-11-11 08:23:48 +01:00
### Twinguard Smoke Detector
2021-01-17 22:20:20 +01:00
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
The Twinguard smoke detector warns you in case of fire and constantly monitors the air.
2021-01-17 22:20:20 +01:00
**Thing Type ID**: `twinguard`
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
| Channel Type ID | Item Type | Writable | Description |
| ------------------ | -------------------- | :------: | ------------------------------------------------------------------------------------------------- |
| temperature | Number:Temperature | ☐ | Current measured temperature. |
| temperature-rating | String | ☐ | Rating of the currently measured temperature. |
| humidity | Number:Dimensionless | ☐ | Current measured humidity (0 to 100). |
| humidity-rating | String | ☐ | Rating of current measured humidity. |
| purity | Number:Dimensionless | ☐ | Purity of the air (ppm). Range from 500 to 5500 ppm. A higher value indicates a higher pollution. |
| 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. |
2022-11-11 08:23:48 +01:00
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK` : 100, `LOW_BATTERY` : 10, `CRITICAL_LOW` : 1, `CRITICALLY_LOW_BATTERY` : 1, `NOT_AVAILABLE` : `UNDEF` . |
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
2022-12-10 11:18:13 +01:00
| smoke-check | String | ☑ | State of the smoke check. Also used to request a new smoke check. |
2021-01-17 22:20:20 +01:00
2022-10-31 17:21:25 +01:00
### Door/Window Contact
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
Detects open windows and doors.
2021-01-17 22:20:20 +01:00
**Thing Type ID**: `window-contact`
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
| Channel Type ID | Item Type | Writable | Description |
| --------------- | --------- | :------: | ---------------------------- |
| contact | Contact | ☐ | Contact state of the device. |
2022-11-11 08:23:48 +01:00
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK` : 100, `LOW_BATTERY` : 10, `CRITICAL_LOW` : 1, `CRITICALLY_LOW_BATTERY` : 1, `NOT_AVAILABLE` : `UNDEF` . |
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
### Motion Detector
2021-01-17 22:20:20 +01:00
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
Detects every movement through an intelligent combination of passive infra-red technology and an additional temperature sensor.
2021-01-17 22:20:20 +01:00
**Thing Type ID**: `motion-detector`
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
| Channel Type ID | Item Type | Writable | Description |
| --------------- | --------- | :------: | ------------------------------ |
| latest-motion | DateTime | ☐ | The date of the latest motion. |
2022-11-11 08:23:48 +01:00
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK` : 100, `LOW_BATTERY` : 10, `CRITICAL_LOW` : 1, `CRITICALLY_LOW_BATTERY` : 1, `NOT_AVAILABLE` : `UNDEF` . |
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
2021-01-17 22:20:20 +01:00
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
### Shutter Control
Control of your shutter to take any position you desire.
2021-01-17 22:20:20 +01:00
**Thing Type ID**: `shutter-control`
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
| Channel Type ID | Item Type | Writable | Description |
| --------------- | ------------- | :------: | ---------------------------------------- |
| level | Rollershutter | ☑ | Current open ratio (0 to 100, Step 0.5). |
### Thermostat
2021-01-17 22:20:20 +01:00
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
Radiator thermostat
2021-01-17 22:20:20 +01:00
**Thing Type ID**: `thermostat`
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
| Channel Type ID | Item Type | Writable | Description |
| --------------------- | -------------------- | :------: | ---------------------------------------------- |
| temperature | Number:Temperature | ☐ | Current measured temperature. |
| valve-tappet-position | Number:Dimensionless | ☐ | Current open ratio of valve tappet (0 to 100). |
| child-lock | Switch | ☑ | Indicates if child lock is active. |
2023-04-11 22:09:56 +02:00
| silent-mode | Switch | ☑ | Enables or disables silent mode on thermostats. When enabled, the battery usage is higher. |
2022-11-11 08:23:48 +01:00
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK` : 100, `LOW_BATTERY` : 10, `CRITICAL_LOW` : 1, `CRITICALLY_LOW_BATTERY` : 1, `NOT_AVAILABLE` : `UNDEF` . |
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
### Climate Control
2021-01-17 22:20:20 +01:00
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
A virtual device which controls up to six Bosch Smart Home radiator thermostats in a room.
2021-01-17 22:20:20 +01:00
**Thing Type ID**: `climate-control`
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
| Channel Type ID | Item Type | Writable | Description |
| -------------------- | ------------------ | :------: | ----------------------------- |
| temperature | Number:Temperature | ☐ | Current measured temperature. |
| setpoint-temperature | Number:Temperature | ☑ | Desired temperature. |
### Wall Thermostat
Display of the current room temperature as well as the relative humidity in the room.
**Thing Type ID**: `wall-thermostat`
| Channel Type ID | Item Type | Writable | Description |
| --------------- | -------------------- | :------: | ------------------------------------- |
| temperature | Number:Temperature | ☐ | Current measured temperature. |
| humidity | Number:Dimensionless | ☐ | Current measured humidity (0 to 100). |
2022-11-11 08:23:48 +01:00
| battery-level | Number | ☐ | Current battery level percentage as integer number. Bosch-specific battery levels are mapped to numbers as follows: `OK` : 100, `LOW_BATTERY` : 10, `CRITICAL_LOW` : 1, `CRITICALLY_LOW_BATTERY` : 1, `NOT_AVAILABLE` : `UNDEF` . |
| low-battery | Switch | ☐ | Indicates whether the battery is low (`ON`) or OK (`OFF`). |
2021-01-17 22:20:20 +01:00
2022-05-06 23:13:04 +02:00
### Security Camera 360
Indoor security camera with 360° view and motion detection.
**Thing Type ID**: `security-camera-360`
| Channel Type ID | Item Type | Writable | Description |
| --------------------- | -------------------- | :------: | ------------------------------------------------------------------ |
| privacy-mode | Switch | ☑ | If privacy mode is enabled, the camera is disabled and vice versa. |
| camera-notification | Switch | ☑ | Enables or disables notifications for the camera. |
### Security Camera Eyes
Outdoor security camera with motion detection and light.
**Thing Type ID**: `security-camera-eyes`
| Channel Type ID | Item Type | Writable | Description |
| --------------------- | -------------------- | :------: | ------------------------------------------------------------------ |
| privacy-mode | Switch | ☑ | If privacy mode is enabled, the camera is disabled and vice versa. |
| camera-notification | Switch | ☑ | Enables or disables notifications for the camera. |
2022-05-22 21:45:55 +02:00
### Intrusion Detection System
Allows to retrieve notifications in case of intrusions. The system can be armed and disarmed and alarms can be muted.
**Thing Type ID**: `intrusion-detection-system`
| Channel Type ID | Item Type | Writable | Description |
| ---------------------------- | -------------------- | :------: | -------------------------------------------------------------- |
| system-availability | Switch | ☐ | Indicates whether the intrusion detection system is available. |
| arming-state | String | ☐ | Read-only channel to retrieve the current arming state. Possible values are `SYSTEM_ARMING` , `SYSTEM_ARMED` and `SYSTEM_DISARMED` . |
| alarm-state | String | ☐ | Read-only channel to retrieve the current alarm state. Possible values are `ALARM_OFF` , `PRE_ALARM` , `ALARM_ON` , `ALARM_MUTED` and `UNKNOWN` . |
| active-configuration-profile | String | ☐ | The name of the active configuration profile used for the intrusion detection system. |
| arm-action | String | ☑ | Arms the intrusion detection system using the given profile ID (default is "0"). |
| disarm-action | Switch | ☑ | Disarms the intrusion detection system when an ON command is received. |
| mute-action | Switch | ☑ | Mutes the alarm when an ON command is received. |
2022-11-20 22:12:49 +01:00
### Smart Bulb
A smart bulb connected to the bridge via Zigbee such as a Ledvance Smart+ bulb.
**Thing Type ID**: `smart-bulb`
| Channel Type ID | Item Type | Writable | Description |
| ----------------| --------- | :------: | -------------------------------------------------------------- |
| power-switch | Switch | ☑ | Switches the light on or off. |
| brightness | Dimmer | ☑ | Regulates the brightness on a percentage scale from 0 to 100%. |
| color | Color | ☑ | The color of the emitted light. |
2023-04-11 22:09:56 +02:00
### Smoke Detector
2022-12-10 11:18:13 +01:00
The smoke detector warns you in case of fire.
**Thing Type ID**: `smoke-detector`
| Channel Type ID | Item Type | Writable | Description |
| ------------------ | -------------------- | :------: | ------------------------------------------------------------------------------------------------- |
| smoke-check | String | ☑ | State of the smoke check. Also used to request a new smoke check. |
2021-01-17 22:20:20 +01:00
## Limitations
2023-03-25 00:26:24 +01:00
No major limitation known.
Check list of [openhab issues with "boshshc" ](https://github.com/openhab/openhab-addons/issues?q=is%3Aissue+boschshc+ )
2021-01-17 22:20:20 +01:00
## Discovery
2023-03-25 00:26:24 +01:00
Bridge discovery is supported via mDNS.
Things discovery is started after successful pairing.
Configuration via configuration files or UI supported too (see below).
2021-01-17 22:20:20 +01:00
## Bridge 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_ .
2021-02-13 21:09:30 +01:00
A keystore file with a self-signed certificate is created automatically.
This certificate is used for pairing between the Bridge and the Bosch Smart Home Controller.
2021-01-17 22:20:20 +01:00
2022-12-07 21:09:32 +01:00
_Press and hold the Bosch Smart Home Controller Bridge button until the LED starts blinking after you save your settings for pairing_.
2021-01-17 22:20:20 +01:00
## Getting the device IDs
Bosch IDs for found devices are displayed in the openHAB log on bootup (`OPENHAB_FOLDER/userdata/logs/openhab.log`)
2021-07-17 23:20:21 +02:00
The log can also be called using the following command.
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
2022-12-07 21:09:32 +01:00
```bash
2021-07-17 23:20:21 +02:00
tail -f /var/log/openhab/openhab.log /var/log/openhab/events.log
```
[boschshc] Parental Controls for Thermostats; Wall Thermostats; Internal refactoring (#11134)
* Reduce debug output
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added meta information for Bosch binding
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Set binding online only if fetching rooms and devices worked
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Replaced hard-coded IP address with configuration from things file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixes after rebasing on 2.5.x branch
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put keystore where openhab user can access it
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Attempt to get a new subscription ID when the old one is invalidated
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Better install script
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Asynchronously get subscription ID
Otherwise, code would get stuck on requesting second subscription ID
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Initial steps towards pairing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Doesn't compile because of bouncycastle - compiles if commented out
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Bumped version
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added basic support for multiple devices to support Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Support for power meter in power switches + all values from Twinguard
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add window contact to the list of supported things
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Updated README to indicate new supported devices
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added missing file
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added motion detector thing
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* All devices support RefreshType now
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleanup - removed pairing related stuff that doesn't work
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed a weird bug where InWallSwitchHandler was not an instance of SHCHandler
Signed-off-by: Stefan Kaestle <stefan@mad-kow.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Update BoschSHCBridgeHandler.java
fixed HTTP request URL to get rooms from SHC
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add handler for Bosch Shutter Control to get and set its open level
Signed-off-by: Christian Oeing <christian.oeing@scalamat.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Auto update of .classpath by IDE
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle PercentType command to set a specific shutter level
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Put service name in constant instead of using it hard coded twice
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Refactor putState method of BoschSHCBridgeHandler
Remove unnecessary parts of the request like Gateway ID and put some general logic into separate methods to reuse them in other functions later
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Send operation state STOPPED to stop shutter from moving
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add shutter control to supported devices in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add null reference check to avoid a NullReferenceException in ShutterControlHandler if device state couldn't be fetched
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add TemperatureLevelService
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add ThermostatHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add valve tappet position channel to thermostat via ValveTappet service
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add service registration for BoschSHCHandler, so the state updates are automatically calling the registered state update callback of the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add affectedChannels to service registration and handle RefreshType directly in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Cleaned up DeviceStatusUpdate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bosch SHC certs
added public certificates from https://github.com/BoschSmartHome/bosch-shc-api-docs/tree/master/best_practice
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added pairing support
added support for keystore creation and pairing
documented the process in readme
refactoring of httpClient to take care of SSL context
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add RoomClimateControlService and ClimateControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Handle command to set setpoint temperature and move conversion from service state data to thing states into service state classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove unnecessary imports from ThermostatHandler.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make new service and handler @NonNullByDefault
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added comments for climate control service, handler and base service and handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add missing comments on new classes and their methods
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make registerService method of BoschSHCHandler private and adjust usages
Derived handlers should use createService instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw an error instead of returning null for method getBridgeHandler of BoschSHCHandler
This allows for fewer null checks after the initialization of a handler.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @author tags in JavaDoc of new classes
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Ran mvn spotless:apply to apply correct code formatting
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed missing imports in BoschSHCService.java
This was caused by a too quick merge of me.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed warnings about null annotations
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to all handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #16 Adjust logger usages to not be too verbose
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #10 Remove obsolete parse-things.py script
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #29 Remove dev scripts install.sh and run.sh scripts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added author name to each class comment
Added the author(s) and small comment to each class based on the git
history and if necessary created the basis class comment body.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added license header for new files
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* run mvn spotless check/apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Catch error response when trying to get state of a service of a device and throw specific error instead of returning invalid state object
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #24 Run mvn spotless:apply and mvn license:format to respect coding guidelines
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #5 Update README.md with up-to-date information about the setup of the binding
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #31 Typo in README.md
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add detailed description of the system password to provide in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix non-initialized member of @NonNullByDefault class ValveTappetServiceState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #7 Moved each device to a separate subfolder inside devices folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #44 Adjust version of org.openhab.addons.reactor.bundles to 2.5.9-SNAPSHOT in pom.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Increase year in copyright headers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Remove several obsolete loggers and fix logging of exceptions
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Fixed some code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Ran mvn spotless:apply
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #45 Revert adding @NonNullByDefault to BoschSHCConfiguration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fixed code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated text files based on pull request feedback
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Apply suggestions from code review
Applied only suggested string text changes and few trivial code changes
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Improved comments and changed visibility
code review findings improved related to code comments
and public/private visibility of variables
removed example properties file and class path entries
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added @NonNullByDefault annotation where necessary and easy possible
in addition minor improvements like
removed TODO for code refactoring
used BoschSHCException instead of Error in one place
Renamed internal Error class to ErroInfo
ran spotless:apply
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* use SIUnits
replaced all Celcius units with eclipse SIUnits
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* change logging and GSON related code
increased many log levels
avoid creating new GSON instances in derived handler subclasses
changed catch code to avoid stack trace dumps
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault to BoschSHCConfiguration class and remove obsolete usages of configuration in handlers
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw BoschSHCExceptions instead of generic Errors and handle them during creation of services
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Class::new supplier function instead of deprecated Class.newInstance() method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove @NonNullByDefault from inner classes and unused logger member to remove compile warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use Base64.getEncoder().encodeToString instead of Base64.getEncoder().encode and a manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add @NonNullByDefault annotation to BoschSHCBridgeConfiguration and check for empty password and ip address in configuration
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use try-with-resources to auto-close streams for key store creation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move data transfer objects of bridge into dto folder
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add thing type ids and channel type ids to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move thing configurations out of thing-types.xml and into configs.xml. Remove deprecated required element and use attribute instead.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Adjust some elements, units, descriptions and labels in configs.xml and thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move url and request creation from BoschSHCBridgeHandler to BoschHttpClient to reuse it inside BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add default timeout to request to smart home controller
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make httpClient of BoschSHCBridgeHandler @Nullable and use BoschHttpClient createUrl and createRequest methods where possible
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make gson field in BoschSHCBridgeHandler final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Simplify getDevices method of BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use getContentAsString() instead of getContent() plus manual conversion to String
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use instanceof instead of isInstance(...) in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add registerService method to BoschSHCHandler to register already created services, so they can be created in the constructor of a handler and do not have to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using simpler String.format instead of MessageFormatter in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move ShutterControlState into dto subfolder and remove @NonNullByDefault annotation
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make bridgeHandler and deviceId in BoschSHCService @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move DTOs in dto subfolders and remove @NonNullByDefault annotations from them
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add texts for errors during initialization of bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Migrate PowerSwitch to new service architecture to get rid of BoschSHCBridgeHandler.updateSwitchState
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete null parameter from subscription request
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Removed obsolete TODO about hard-coded data which does not exist anymore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use lambda for response handling of long poll
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Remove obsolete @NonNull annotations in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Throw http exceptions when trying to request state from a device to set the thing to offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Add state options for combined-rating, temperature-rating and humidity-rating channels
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix several minor static code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Added migration artifacts
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fix formatting and increase version number
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fix HTTP client issue, improve connection logging, add Developers markdown
the HTTPClient requests were broken
updated exception handling and logging for connection and pairing
describing source of certificates
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use service for shutter control handling instead of having the logic inside the ShutterControlHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Fix code formatting to remove code analysis warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed pairing
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Fixed long poll
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move common error handling for parsing responses from BoschHttpClient into sendRequest method to make subscribe request logic clearer
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use scheduler.schedule instead of Thread.sleep during long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Using synchronous request for subscribe request
The initialization is not finished without a successful subscription.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use synchronous long poll request to get it to work
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling asynchronous to not block scheduler threads
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Only scheduling new long polls while bridge is not disposed and aborting long polling on disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Move long polling logic into separate class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Make long polling requests synchronous again, the asynchronous way still does not receive any state updates
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* replaced while loop for pairing with scheduler calls
Pattern from LongPolling reused.
Scheduling new initial access checks including pairing every 15 seconds until it was successful and long polling can be started
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Throw BoschSHCException instead of raw error to avoid code analysis warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Remove TODO from code and add issue #55 instead
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Pass non-null httpClient to bridge initialization instead of having to check for null reference
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use one supportsThingTypes mapping to list the supported things with their handler in BoschSHCHandlerFactory
Previously an array plus a big switch was required.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #47 Starting http client before scheduling initial access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Use logger.debug instead of logger.info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* Include cause exception in the PairingFailedException
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields above constructor in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete configuration field from BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move fields and constructor in JsonRpcRequest to top of the class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Log the failure of a long poll as warning instead of error
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use %s instead of {} as placeholder for String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move @Nullable annotation in front of field name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Specify UTF_8 as charset to convert string to byte array
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove spaces from pem files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change ArrayList to List in Device.java
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use QuantityType for power and energy consumption of the in-wall switch handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Check if StopMoveType is STOP in ShutterControlHandler before setting the device state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make fields of DeviceService final
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Stop http client and cancel scheduled pairing on bridge disposal
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove channel check in BoschTwinguardHandler for Refresh command
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to warning when update in BoschTwinguardHandler and WindowContactHandler returns incorrect state
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add additional information about channels to thing-types.xml and README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove confusing comment from LongPolling.subscribe method
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Removed obsolete error log in LongPolling.subscribe
A warning is already logged in BoschBridgeHandler when an exception occurs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add detailed description for purity channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fix typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change scheduledPairing field in BoschSHCBridgeHandler to be @Nullable
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Change type of channel values from DecimalType to QuantityType in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .classpath and .project files
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed typo in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Only log error message instead of whole stack trace in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove exception which is not thrown and typo in BoschSslUtil
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use SmartHomeUnits instead of AbstractUnit in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Added supported-bridge-type-refs to thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove invalid whitespace from thing-types.xml
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Fixed warnings and errors caused by updated Gson library
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update info about auto reload of bundle jar in DEVELOPERS.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Update information about adding items and things via UI, added missing password configuration value and changed headline in README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Execute long polling requests asynchronous to not block a thread
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Refactored WindowContactHandler to use ShutterContactService instead of implementing service logic itself
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove obsolete .gitignore. The ignored files are already ignored by the root .gitignore
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename constant supportsThingTypes to SUPPORTED_THING_TYPES in BoschSHCHandlerFactory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Use List.of instead of Arrays.asList
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Call super.dispose last in BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add exception message to status when http connection to controller fails
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Handle JsonSyntaxException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Forward InterruptedExceptions to callers, so they have to be handled correctly
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Logging long poll error message and code instead of hash
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Throwing InterruptedException during pairing instead of only logging it
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Move nested class AbortLongPolling to end of LongPolling class
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Make gson instance static final in BoschHttpClient
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Rename gson to GSON and make it static final in BoschSHCHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Remove @Nullable annotations from GSON-created objects
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add causing exception to ExecutionException in BoschHttpClient.sendRequest
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #14 Add JsonSyntaxException to definition of processUpdate in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed keyStore creation
Moved PEM files into expected folder according to package
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* moved final fields above non-final fields
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* updated copyright year in header by executing mvn license:format
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* fixed last two pending warnings
added back the removed @Nullable annotation in sendRequest()
replaced deprecated SslContextFactory constructor call
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added Bouncy Castle third-party license info into NOTICE
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* changed Bouncy Castle version to same version as currently used in org.openhab.core.io.jetty.certificate to later reduce download size
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Correctly check if long poll response is valid
GSON will not return null if there is no "result" field, but will just set the "result" member to null.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add @NonNullByDefault annotation to LongPollResultTest class and fix method name
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* added first unittests for BoschSslUtil class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added next unittests for BoschHttpClient class
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #55 replaced the password with a fixed one
The changeable SHC system password for the keystore is replaced by a static string in the code.
The keyStore name is now based on SHC ipAddress to support multiple SmartHomeControllers.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #72 changed use units of measure for the twinguard humidity and purity values
all other QuantityTypes in bindingcode are fine
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #77 changed title of binding to Bosch Smart Home
Replaced the SHC occurrences with Smart Home,
to avoid technical names.
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #62 Try to restart long polling when it fails before taking the thing offline
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #62 Run subscribe request on a new thread instead of using the thread of the previous long polling http request
This might be the reason why the subscribe request does never finish or finishes with a timeout
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Run the whole long polling response handling in a new thread to not get timeout from HTTP client
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #74 Schedule initial access when long polling fails unexpected
We need to try to reconnect again and again (with 15 seconds between the requests) as the controller may have been restarted (update, manual restart,...). This is already done by the initial access, so I reuse that mechanism.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Use direct formatting of logger.trace instead of String.format
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
* #76 Use i18n texts instead of raw translations for status messages about failed long polling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #76 Use logger.debug instead of logger.warn for long poll error as it is handled now
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #78 defined api-version
each HTTP request will use now the defined "avp-version=2.1" for request to the smart home controller
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* logging bundle version
removed the old static version string
access OSGi bundle version information instead
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #75 improved initial access
- added isOnline check and isAccessPossible now failed in case HTTPStatus is an error
- same HTTPStatus check done to all blocking send() request calls
- using i18n strings for all bridge updateStatus calls
- skipped the 'controller' and use only 'Bosch Smart Home' in descriptions
- added more @Nullable annotations
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* added newline
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
* #46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #46 Adjust descriptions of things
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use LatestMotionService in MotionDetectorHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Use service instead of custom logic in BoschTwinguardHandler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Add PowerMeterService to use in InWallSwitchHandler instead of having the logic directly in the handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #40 Rename InWallSwitchHandler to LightControlHandler
This is the official name in the Bosch API documentation, so we should use it as well (https://apidocs.bosch-smarthome.com/local)
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Get device info on thing initialization to check if device exists
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Use generic sendRequest method of http client to have consistent error handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #34 Fix formatting error when logging device info
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #83 Add info if a channel is writable to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #84 Adjust/Add descriptions of supported devices
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add humidity level service and wall thermostat handler
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #25 Add wall thermostat handler to handler factory
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #66 Check type of service state when received by bridge to make sure that it has the expected type
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Add child lock service to Thermostat handler and link its state to a "child-lock" channel
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Add null check in BoschSHCServiceState.isValid
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #41 Use custom channel type for child-lock. Handle setting child lock state.
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #101 Store expected state type inside a member instead of a static variable
The static variable was stored in the base class, so it was only initialized once even for different state types
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #63 Use better identifier for thing that is missing a (valid) bridge
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #108 Add changelog to README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #109 Catch possible null pointer exception in long poll response handling
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix potential null pointer access
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* Fix static code analysis error and 2 warnings
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #111 Remove changelog from README.md
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
* #112 Remove JSON from logs
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Co-authored-by: Stefan Kaestle <stefan@mad-kow.de>
Co-authored-by: Gerd Zanker <gerd.zanker@web.de>
Co-authored-by: Christian Oeing <christian.oeing@scalamat.de>
Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2021-10-30 17:57:41 +02:00
2022-12-07 21:09:32 +01:00
Alternatively, the log can be viewed using the OpenHab Log Viewer (frontail) via < http: / / openhab:9001 > .
2021-07-17 23:20:21 +02:00
2021-01-17 22:20:20 +01:00
Example:
2022-12-07 21:09:32 +01:00
```bash
2023-03-25 00:26:24 +01:00
2023-03-20 20:30:48.026 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'boschshc:security-camera-eyes:yourBridgeName:hdm_Cameras_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' to inbox.
2023-03-20 20:30:48.026 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'boschshc:smoke-detector:yourBridgeName:hdm_HomeMaticIP_XXXXXXXXXXXXXXXXXXXXXXXX' to inbox.
2023-03-20 20:30:48.027 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'boschshc:twinguard:yourBridgeName:hdm_ZigBee_XXXXXXXXXXXXXXXX' to inbox.
2023-03-20 20:30:48.028 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'boschshc:smart-bulb:yourBridgeName:hdm_PhilipsHueBridge_HueLight_XXXXXXXXXXXXXXXX-XX_XXXXXXXXXXXX' to inbox.
2021-01-17 22:20:20 +01:00
```
## Thing Configuration
You define your Bosch devices by adding them either to a `.things` file in your `$OPENHAB_CONF/things` folder like this:
2022-12-07 21:09:32 +01:00
```java
2021-01-17 22:20:20 +01:00
Bridge boschshc:shc:1 [ ipAddress="192.168.x.y", password="XXXXXXXXXX" ] {
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 UI: Settings -> 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:
2022-12-07 21:09:32 +01:00
```java
2021-01-17 22:20:20 +01:00
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 UI: Settings -> Items -> "+".