Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing IDE #7

Closed
kgoderis opened this issue Aug 29, 2014 · 1 comment
Closed

Installing IDE #7

kgoderis opened this issue Aug 29, 2014 · 1 comment

Comments

@kgoderis
Copy link
Contributor

Kai,
Please correct me if I am wrong, but to better understand how things will work in an ESH+OH2 environment: the ESH core will be distributed as set of .jar plug-in's that will sit in the ./runtime/server/plugins folder, right? And so, OH2's dev environment will basically be quite empty and focus only on the binding/userland stuff. Forking and cloning the OH2 repository, it feels as if all the ESH jars are missing in the Target Platform definition. Should these be manually be added to the dev environment, or should ESH be "installed" in some way before the env. can be set up? I am a bit confused here

@kaikreuzer
Copy link
Member

Hi Karel,
Yes, you are right, the openHAB2 repo is pretty empty and all ESH bundles are part of the target platform (references right in here: https://github.com/openhab/openhab2/blob/master/targetplatform/openhab.target).
So yes, when developing bindings or other addons, you can compile against the ESH bundles without the need to have them in your workspace.

shawncrosby added a commit to shawncrosby/openhab2-addons that referenced this issue Aug 9, 2017
fixed duplicate statuses during lock state transition
Wire82 added a commit to Wire82/openhab-addons that referenced this issue Oct 21, 2017
dimalo pushed a commit to dimalo/openhab2-addons that referenced this issue Mar 15, 2018
…enhab#7)

* Added item "Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)"

- added new device yeelink.light.ceiling4 ("Yeelight LED Ceiling Lamp v4
(JIAOYUE 650 RGB)")
- fixed checkstyle errors (mainly 2017 > 2018 in copyright message) and
some warnings about string placeholders in debug messages

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>

* Added support for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)

- Added compatibility for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)
- Added new channels ambientColor and ambientColorTemperature

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>
aduffeck pushed a commit to aduffeck/openhab2-addons that referenced this issue Jul 30, 2018
…enhab#7)

* Added item "Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)"

- added new device yeelink.light.ceiling4 ("Yeelight LED Ceiling Lamp v4
(JIAOYUE 650 RGB)")
- fixed checkstyle errors (mainly 2017 > 2018 in copyright message) and
some warnings about string placeholders in debug messages

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>

* Added support for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)

- Added compatibility for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)
- Added new channels ambientColor and ambientColorTemperature

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>
dimalo pushed a commit to dimalo/openhab2-addons that referenced this issue Nov 10, 2018
This is a combination of 84 commits.
Initial commit for Mi IO binding

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] add basic functionality to control other miio devices

* Generate channels based on database
* Update properties based on database
* Execute commands based on database

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
[miio] fix author tags

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
[miio] remove version constraint on gson

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
refine pom & Java 1.8

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>
add yeelight ceiling for tests

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>
add channels when defining thing type

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>
Revert "add channels when defining thing type"

This reverts commit 8067f57.

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>

[miio] improve starting sequence & device identification

* Fix sending empty string commands
* Adding device identification string to config

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com

[miio] remove mock data & check model in database

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix initiation for vacuum

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Fix incorrect format for vacuum

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] restructure database

* restructured database format
* added Xiaomi Philips ceeling light

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] fixed findbug error

* mibasic: error handling when updating channels

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
intrim add philips lightr

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

intrim adjust manifest

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
intrim update to latest version
attempt to fix communication problems

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

intrim resolve travis errors

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

Update CommandParameterType.java

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] rework binding to async (WIP)

*added 2nd discovery method

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] reworked async communication

* Improve discovery speed
* Added Philips light bulb support
* reworked async communication incl implementation of queue

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix copyright header

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add support encrypted tokens (IOS)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix dependency issue

simplified encrypted pwd handling
cleanup

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] transitioned vacuum to async

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improved commands handling

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] limit the properties requested in 1 go

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] updated airpurifier temp channel

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] avoid polling job crashing

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix command without parameter sending

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update airpurifier. improve json null handling

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] missing properties

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add zimi powerstrip

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add 2 properties for Xiaomi powerstrip

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add chuangmi.plug.m1 & fix status issue

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix minor discovery issue

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix IOS token decoding

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add channels for AIR PURIFIER 2

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix formatting

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] updated purifier properties

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] find database in case multiple models id's in database

add model purifier pro (v6) databse
add chumi plug v1 database entry

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] add transformation option to db

* updated airpurifier v6 & m1 to use transformation
* Fix typo in channel name filtermaxLife

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix database entries switch iso onoftype

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] avoid cancelled refresh for basic devices

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] variable timeout

*on-off for vacuum
*improve basic refesh in case of timing issues

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] avoid npe & add cleaning record

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] several small improvements

vacuum - new switch channel for on/off to allow alexa integration
vacuum - reset consumables channel
airpurifiers - fix temperature reading (/10)
all - small improvements in abstract handler

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update powerstrip database

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improve ping to avoid connection issues

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Updated device list

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improve initiation & update plug.

* removes NPE is specific cases during change of type
* Removing unavailable properties from plug m1

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Several improvements

* Fix toggle
* improve documentation
* Improve handling of different command types

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

Delete .README.md.html

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] experimentally add yeelights

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] added support for new vacuum v2

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix database issue

Experimental support color

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fixing several code warnings

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] various fixes

* fix discovery
* Fixes lamp definitions and missing channels
* Fix several code warnings

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] minor changes

* Update pom to 2.3 snapshot
* Change log level

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix build

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] revert back change to new MDNSDiscovery participant

revert back change to new MDNSDiscovery participant as users report
issue in runtime

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] replace depreciated bundle reference

* Removed depreciated bundle ref
* Fixed typo for vacuum v2
* Add conversion for scene

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
 Added support for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB) (openhab#7)

* Added item "Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)"

- added new device yeelink.light.ceiling4 ("Yeelight LED Ceiling Lamp v4
(JIAOYUE 650 RGB)")
- fixed checkstyle errors (mainly 2017 > 2018 in copyright message) and
some warnings about string placeholders in debug messages

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>

* Added support for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)

- Added compatibility for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)
- Added new channels ambientColor and ambientColorTemperature

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>

[miio] add humidifier and other fixes

* Add humidifier
* Fix database issues yeelight color
* Add new commands robot v2

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix issue humidifier db

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] minor fixes in database

* fixed set humification in for humidifier
* fixed powerstrip v1 id

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add devices

* philips ceiling lamp
* waterpurifier

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix yeelight issues

* Handling of brightness in the color control
* Adding additional parameters to allow ct adjustment

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] minor bug fix

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] powerplug & db fixes

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
add Philips Eyecare 2 & improve Yeelight 650 (openhab#8)

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>
[miio] add AirPurifier 2S

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix open port issue

* Fix port not being closed issue
* Align discovery labels

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fixing typo and update devices

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Add to pom

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Several commits to fix wrongly added files

[miio] fixing some checkstyle errors

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] change pom to 2.4 snapshot

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Experimental support for Mi Smart Fan

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improve mi smartfan

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add Philips downlight to db

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] minor fixes and add yeelink.light.color2 to db

* Fix double comma issue in some json
* Fix sending empty property
* Add yeelink.light.color2
* Update fan

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] documentation update

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] cleanups

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] minor fix readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add zhimi.fan.sa1

add Xiaomi Mi Smart Pedestal Fan
minor fixes for network response

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update readme with example item files

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improve documentation & remove spaces

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] database updates

new device (experimental) Philips light moon
updated led strip

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add philips candle

added some additional device strings

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix typo & mising database entries

Fix some database missing & wrong items

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix usbpower for chuangmi plug

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio]

merging changes of t1lt3rr0r
* Added channel for changing rgb color on yeelights
* Fixed the "delayoff" channel to use correct command
* Added a "preCommandParameter1" to MiIoDeviceAction.java to use a value
in front of the send value/command (for example necessary for the
yeelight method "cron_add" with value [0,VALUE]
* Added toString() method to MiIoDeviceAction.java

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update documentation

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
marcelrv pushed a commit that referenced this issue Jan 29, 2019
* Added item "Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)"

- added new device yeelink.light.ceiling4 ("Yeelight LED Ceiling Lamp v4
(JIAOYUE 650 RGB)")
- fixed checkstyle errors (mainly 2017 > 2018 in copyright message) and
some warnings about string placeholders in debug messages

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>

* Added support for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)

- Added compatibility for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)
- Added new channels ambientColor and ambientColorTemperature

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>
magx2 added a commit to SUPLA/openhab2-addons that referenced this issue Jun 16, 2019
magx2 added a commit to SUPLA/openhab2-addons that referenced this issue Jun 16, 2019
GerdZanker pushed a commit to GerdZanker/openhab-addons that referenced this issue Dec 25, 2020
…lder

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
GerdZanker pushed a commit to GerdZanker/openhab-addons that referenced this issue Jan 7, 2021
…lder

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
fwolter added a commit that referenced this issue Oct 30, 2021
…nal 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>
dschoepel pushed a commit to dschoepel/openhab-addons that referenced this issue Nov 9, 2021
…nal refactoring (openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#45 Increase year in copyright headers

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#45 Fixed some code analysis warnings

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Ran mvn spotless:apply

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Revert adding @NonNullByDefault to BoschSHCConfiguration

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#47 Remove TODO from code and add issue openhab#55 instead

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Remove spaces from pem files

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Make fields of DeviceService final

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fix typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fixed typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Handle JsonSyntaxException in BoschHttpClient.sendRequest

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#46 Adjust descriptions of things

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use LatestMotionService in MotionDetectorHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use service instead of custom logic in BoschTwinguardHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#34 Get device info on thing initialization to check if device exists

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Use generic sendRequest method of http client to have consistent error handling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Fix formatting error when logging device info

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#83 Add info if a channel is writable to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#84 Adjust/Add descriptions of supported devices

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add humidity level service and wall thermostat handler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add wall thermostat handler to handler factory

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#41 Use custom channel type for child-lock. Handle setting child lock state.

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#63 Use better identifier for thing that is missing a (valid) bridge

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#108 Add changelog to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#111 Remove changelog from README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>
Signed-off-by: Dave J Schoepel <dave@theschoepels.com>
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this issue Dec 30, 2021
…nal refactoring (openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#45 Increase year in copyright headers

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#45 Fixed some code analysis warnings

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Ran mvn spotless:apply

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Revert adding @NonNullByDefault to BoschSHCConfiguration

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#47 Remove TODO from code and add issue openhab#55 instead

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Remove spaces from pem files

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Make fields of DeviceService final

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fix typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fixed typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Handle JsonSyntaxException in BoschHttpClient.sendRequest

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#46 Adjust descriptions of things

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use LatestMotionService in MotionDetectorHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use service instead of custom logic in BoschTwinguardHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#34 Get device info on thing initialization to check if device exists

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Use generic sendRequest method of http client to have consistent error handling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Fix formatting error when logging device info

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#83 Add info if a channel is writable to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#84 Adjust/Add descriptions of supported devices

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add humidity level service and wall thermostat handler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add wall thermostat handler to handler factory

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#41 Use custom channel type for child-lock. Handle setting child lock state.

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#63 Use better identifier for thing that is missing a (valid) bridge

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#108 Add changelog to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#111 Remove changelog from README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this issue Jan 28, 2022
…nal refactoring (openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#45 Increase year in copyright headers

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#45 Fixed some code analysis warnings

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Ran mvn spotless:apply

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Revert adding @NonNullByDefault to BoschSHCConfiguration

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#47 Remove TODO from code and add issue openhab#55 instead

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Remove spaces from pem files

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Make fields of DeviceService final

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fix typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fixed typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Handle JsonSyntaxException in BoschHttpClient.sendRequest

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#46 Adjust descriptions of things

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use LatestMotionService in MotionDetectorHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use service instead of custom logic in BoschTwinguardHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#34 Get device info on thing initialization to check if device exists

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Use generic sendRequest method of http client to have consistent error handling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Fix formatting error when logging device info

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#83 Add info if a channel is writable to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#84 Adjust/Add descriptions of supported devices

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add humidity level service and wall thermostat handler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add wall thermostat handler to handler factory

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#41 Use custom channel type for child-lock. Handle setting child lock state.

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#63 Use better identifier for thing that is missing a (valid) bridge

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#108 Add changelog to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#111 Remove changelog from README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this issue May 5, 2022
…nal refactoring (openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#45 Increase year in copyright headers

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#45 Fixed some code analysis warnings

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Ran mvn spotless:apply

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Revert adding @NonNullByDefault to BoschSHCConfiguration

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#47 Remove TODO from code and add issue openhab#55 instead

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Remove spaces from pem files

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Make fields of DeviceService final

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fix typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fixed typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Handle JsonSyntaxException in BoschHttpClient.sendRequest

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#46 Adjust descriptions of things

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use LatestMotionService in MotionDetectorHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use service instead of custom logic in BoschTwinguardHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#34 Get device info on thing initialization to check if device exists

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Use generic sendRequest method of http client to have consistent error handling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Fix formatting error when logging device info

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#83 Add info if a channel is writable to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#84 Adjust/Add descriptions of supported devices

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add humidity level service and wall thermostat handler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add wall thermostat handler to handler factory

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#41 Use custom channel type for child-lock. Handle setting child lock state.

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#63 Use better identifier for thing that is missing a (valid) bridge

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#108 Add changelog to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#111 Remove changelog from README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>
andan67 pushed a commit to andan67/openhab-addons that referenced this issue Nov 6, 2022
…nal refactoring (openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#45 Increase year in copyright headers

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#45 Fixed some code analysis warnings

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Ran mvn spotless:apply

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#45 Revert adding @NonNullByDefault to BoschSHCConfiguration

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#47 Remove TODO from code and add issue openhab#55 instead

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Remove spaces from pem files

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Make fields of DeviceService final

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fix typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Fixed typo in DEVELOPERS.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#14 Handle JsonSyntaxException in BoschHttpClient.sendRequest

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#62 Try to restart long polling when it fails before taking the thing offline

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#76 Use i18n texts instead of raw translations for status messages about failed long polling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#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>

* openhab#46 Rename BoschInWallSwitchHandler, BoschTwinguardHandler, BoschSHCBridgeConfiguration and BoschSHCBridgeHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#46 Adjust descriptions of things

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use LatestMotionService in MotionDetectorHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#40 Use service instead of custom logic in BoschTwinguardHandler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#34 Get device info on thing initialization to check if device exists

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Use generic sendRequest method of http client to have consistent error handling

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#34 Fix formatting error when logging device info

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#83 Add info if a channel is writable to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#84 Adjust/Add descriptions of supported devices

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add humidity level service and wall thermostat handler

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#25 Add wall thermostat handler to handler factory

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#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>

* openhab#41 Use custom channel type for child-lock. Handle setting child lock state.

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#63 Use better identifier for thing that is missing a (valid) bridge

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#108 Add changelog to README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>

* openhab#111 Remove changelog from README.md

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>

* openhab#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>
mherwege pushed a commit to mherwege/openhab-addons that referenced this issue Feb 8, 2023
Fix jsonArray no such method exception
kaikreuzer pushed a commit that referenced this issue Jun 17, 2023
* [tradfri] Added Support for Air Purifier (#7)

Added Support for Tradfri Air Purifier:
* Added documentation disambiguation Tradfri vs Dirigera
* Added Tradfri Air Purifier - fanMode and fanSpeed
* Workable Tradfri Air Purifier basic implementation
* Tradfri: modified fanMode type and definition
* Tradfri Air Purifier: Added disableLed
* Tradfri Air Purifier: Added lockPhysicalButton
* Tradfri Air Purifier: Added airQuality data
* Tradfri Air Purifier: Added filterCheck data
* Tradfri Air Purifier: Added translations
* Tradfri Air Purifier: Added filter_uptime
* Tradfri Air Purifier: code optimization
* Documentation for supported Air Purifier channels
Fixes #14816

Signed-off-by: Vivien Boistuaud <github@boistuaud.net>
tb4jc pushed a commit to tb4jc/openhab-addons that referenced this issue Jun 19, 2023
* [tradfri] Added Support for Air Purifier (openhab#7)

Added Support for Tradfri Air Purifier:
* Added documentation disambiguation Tradfri vs Dirigera
* Added Tradfri Air Purifier - fanMode and fanSpeed
* Workable Tradfri Air Purifier basic implementation
* Tradfri: modified fanMode type and definition
* Tradfri Air Purifier: Added disableLed
* Tradfri Air Purifier: Added lockPhysicalButton
* Tradfri Air Purifier: Added airQuality data
* Tradfri Air Purifier: Added filterCheck data
* Tradfri Air Purifier: Added translations
* Tradfri Air Purifier: Added filter_uptime
* Tradfri Air Purifier: code optimization
* Documentation for supported Air Purifier channels
Fixes openhab#14816

Signed-off-by: Vivien Boistuaud <github@boistuaud.net>
Signed-off-by: Thomas Burri <thomas.burri@alstomgroup.com>
matchews pushed a commit to matchews/openhab-addons that referenced this issue Aug 9, 2023
* [tradfri] Added Support for Air Purifier (openhab#7)

Added Support for Tradfri Air Purifier:
* Added documentation disambiguation Tradfri vs Dirigera
* Added Tradfri Air Purifier - fanMode and fanSpeed
* Workable Tradfri Air Purifier basic implementation
* Tradfri: modified fanMode type and definition
* Tradfri Air Purifier: Added disableLed
* Tradfri Air Purifier: Added lockPhysicalButton
* Tradfri Air Purifier: Added airQuality data
* Tradfri Air Purifier: Added filterCheck data
* Tradfri Air Purifier: Added translations
* Tradfri Air Purifier: Added filter_uptime
* Tradfri Air Purifier: code optimization
* Documentation for supported Air Purifier channels
Fixes openhab#14816

Signed-off-by: Vivien Boistuaud <github@boistuaud.net>
Signed-off-by: Matt Myers <mmyers75@icloud.com>
austvik pushed a commit to austvik/openhab-addons that referenced this issue Mar 27, 2024
* [tradfri] Added Support for Air Purifier (openhab#7)

Added Support for Tradfri Air Purifier:
* Added documentation disambiguation Tradfri vs Dirigera
* Added Tradfri Air Purifier - fanMode and fanSpeed
* Workable Tradfri Air Purifier basic implementation
* Tradfri: modified fanMode type and definition
* Tradfri Air Purifier: Added disableLed
* Tradfri Air Purifier: Added lockPhysicalButton
* Tradfri Air Purifier: Added airQuality data
* Tradfri Air Purifier: Added filterCheck data
* Tradfri Air Purifier: Added translations
* Tradfri Air Purifier: Added filter_uptime
* Tradfri Air Purifier: code optimization
* Documentation for supported Air Purifier channels
Fixes openhab#14816

Signed-off-by: Vivien Boistuaud <github@boistuaud.net>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants