Commit Graph

65 Commits

Author SHA1 Message Date
Jacob Laursen
c02a7345e1 Simplify DateTimeType handling for Bosch Smart Home
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-12-19 11:56:36 +01:00
David Pace
c2613c7759
[boschshc] Fix NPE during deserialization, make long polling more robust (#17190)
* Fix NPE while deserializing service data JSON objects
* Catch exceptions while handling long poll results
* Correct @type name for user-defined states
* Add unit tests and enhance existing unit tests

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

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

Signed-off-by: David Pace <dev@davidpace.de>
2024-07-22 21:10:29 +02:00
lsiepel
5e0e9ce51e
Update lastnpe EEA to 2.4.0 (#16875)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
2024-07-11 13:51:10 +02:00
David Pace
170d81b4b1
[boschshc] Support for Smart Water Alarm (#16770)
Adds support for Bosch Smart Water Alarm devices.

* add new thing type and new channel types
* add new services for water detector
* refactor CameraNotificationState and PrivacyModeState to a common enum
EnabledDisabledState that can be re-used in the water detector tilt
service states
* implement handler for new device
* register new device in handler factory and discovery
* add unit tests
* add documentation

Signed-off-by: David Pace <dev@davidpace.de>
2024-05-29 16:10:48 +02:00
Jacob Laursen
2f7ad5f62e
Provide unit hints for humidity/noise/volume channels (#16614)
* Provide unit hints for humidity channel types

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Provide unit hints for noise/volume channel types

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

---------

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-04-07 14:08:53 +02:00
David Pace
b4f973608f
[boschshc] Add support for Dimmer (#16501)
Adds support for Bosch Smart Home Dimmer devices.

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

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

Signed-off-by: David Pace <dev@davidpace.de>
2024-03-31 10:36:43 +02:00
Gerd Zanker
1cfaf20fdd
[boschshc] Add command to list SHC device mappings (#15060)
* [boschshc] add command to list Bosch Smart Home Controller devices and mapping to openhab devices and related services

Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
2024-02-26 21:04:04 +01:00
Patrick
f45cff82d1
[boschshc] Add support for Smoke Detector II (#16357)
Signed-off-by: Patrick Gell <patgit023@gmail.com>
2024-02-04 22:31:01 +01:00
David Pace
d592f66c49
[boschshc] fix wrong config description references (#16342)
wrong references were introduced during copy & paste from the previous
thing type definition

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

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

closes #16244

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

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

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

Signed-off-by: David Pace <dev@davidpace.de>
2024-01-15 21:09:45 +01:00
Jacob Laursen
daea030c11
Refactor java.util.Date usages to java.time.Instant (#16239)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-13 17:12:49 +01:00
Wouter Born
a2868bb0dc
Use diamond operator and remove redundant type arguments (#16249)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-09 23:46:15 +01:00
David Pace
6968522c11
[boschshc] Handle invalid long poll responses gracefully (#16002)
If the long poll response from the Smart Home Controller does not
contain valid JSON, the subscription is gracefully terminated a new one
is initiated after 15 seconds.

closes #15912

Signed-off-by: David Pace <dev@davidpace.de>
2024-01-04 08:19:33 +01:00
J-N-K
3136425b39
Adapt to core changes (ThingHandlerService) (#16107)
Related to: https://github.com/openhab/openhab-core/pull/3957

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-03 11:50:55 +01:00
Jacob Laursen
f4596f581e
Update license headers to 2024 (#16168)
* Update copyright year in configuration
* Update license headers
* Manually update nibeheatpump headers (.cpp/.h/.ino)
* Manually update smsmodem header
* Manually update hueemulation header
* Manually update addon-header.xml header

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-01 18:14:57 +01:00
openhab-bot
d53bf5dda1
New translations boschshc.properties (Italian) (#16166) 2024-01-01 13:58:31 +01:00
David Pace
288e8ff494
[boschshc] Fix options for channels with Switch items (#16161)
* [boschshc] Fix options for channels with Switch items

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

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

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

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

closes #15954

Signed-off-by: David Pace <dev@davidpace.de>
2023-12-31 11:40:43 +01:00
Patrick
d620d261b7
[boschshc] Add user defined states (#16028)
Signed-off-by: Patrick Gell <patgit023@gmail.com>
2023-12-31 00:56:51 +01:00
Wouter Born
c58d894bf0
Use OnOffType.from to reduce code (#16101)
You can create an `OnOffType` using a boolean nowadays which reduces the amount of code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-23 19:06:21 +01:00
David Pace
2b9b3dfa0f
[boschshc] Add support for motion detector illuminance sensor (#16021)
* [boschshc] Add support for motion detector illuminance sensor

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

---------

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

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

closes #15848

* [boschshc] add channel to control state service registration

Signed-off-by: David Pace <dev@davidpace.de>
2023-11-20 20:59:52 +01:00
openhab-bot
1e1632b78f
New Crowdin updates (#15881)
* New translations boschshc.properties (Italian)

* New translations tasmotaplug.properties (Italian)
2023-11-11 23:56:49 +01:00
Patrick
1b466fb319
[boschshc] Add scenario channel (#15752)
Signed-off-by: Patrick Gell <patgit023@gmail.com>
2023-11-11 14:22:52 +01:00
Holger Friedrich
f24a4305b8
Improve javadoc for some addons (#15701)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-10-08 00:25:04 +02:00
Holger Friedrich
cbf4411034
Improve javadoc for all addons (#15667)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-30 21:49:12 +02:00
openhab-bot
14cfeb0996
New Crowdin updates (#15627)
* New translations boschshc.properties (Italian)

* New translations boschindego.properties (Italian)
2023-09-19 18:31:02 +02:00
Holger Friedrich
cf10b3e9c7
Java 17 features (A-G) (#15516)
- add missing @override
- Java style array syntax
- remove redundant modifiers
- always move String constants to left side in comparisons
- simplify lambda expressions and return statements
- use replace instead of replaceAll w/o regex
- instanceof matching and multiline strings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-05 22:30:16 +02:00
David Pace
123982dcc6
[boschshc] Code enhancements and Sonar issue fixes (#15160)
* replace call to deprecated HSBType::getRGB() with
ColorUtil::hsbTosRgb()
* make constructors of abstract classes protected
* use instanceof with pattern matching (JEP 305)
* enhance switches with combined cases using comma-separated case
expressions
* remove unnecessary public modifiers in unit tests

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

Signed-off-by: David Pace <dev@davidpace.de>
2023-06-11 17:52:26 +02:00
mlobstein
36b2dbfbc9
Declare connection for bindings A thru F (#14901)
* Declare connection for bindings A-F

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
2023-04-29 10:10:19 +02:00
David Pace
cc626de89a
Support for Thermostat SilentMode (#14779) (#14781)
- Add new channel definition for silent mode
- Implement silent mode service
- Add unit tests
- Add documentation
- Fix some minor documentation issues

Closes #14779

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

Closes #14672

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

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

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

Signed-off-by: David Pace <dev@davidpace.de>
2023-03-30 18:31:54 +02:00
Gerd Zanker
3b08217ff7
[boschshc] Bridge and Device Discovery (#14197)
* #14195 Bridge and Device Discovery

Bridge discovery is implemented via mDNS, local IP addresses are checked.
If a GET returns the public SHC information,
then this shcIpAddress is reported as a discovered bridge.

Devices are always discovered after successful pairing, but a manual scan is also possible.

Added unit tests for Bridge and Device Discovery.

Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
2023-03-25 00:26:24 +01:00
David Pace
8306210a13
[boschshc] Add unit tests (#14426)
Signed-off-by: David Pace <dev@davidpace.de>
2023-02-20 08:56:29 +01:00
Viktor Koop
afaccd1cd1
[boschshc] allow setting the temperature by disabling read-only state of setpoint-temperature (#14081) (#14352)
Signed-off-by: Viktor Koop <viktor.koop@googlemail.com>
2023-02-11 19:04:47 +01:00
Jacob Laursen
6eb6bf7d43
Remove obsoleted author tags (#14333)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-02-04 10:07:07 +01:00
J-N-K
89d0689e36
fix i18n for bindings (#14235)
Also-By: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-21 12:14:51 +01:00
J-N-K
5f8214f08a
Adapt to core changes (addon.xml) (#13289)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-15 20:31:42 +01:00
Holger Friedrich
4e44de3894
Fix SAT warnings (#14202)
* Fix SAT warnings

- checkstyle.ModifierOrderCheck
- checkstyle.OneStatementPerLineCheck
- checkstyle.NeedBracesCheck
- PMD.UseStandardCharsets
- PMD.UseCollectionIsEmpty
- PMD.UnusedLocalVariable
- PMD.SimplifyBooleanReturns where reasonable, suppress where
readability is better without change
- PMD.SimplifyBooleanExpressions

* Include StandardCharsets

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-01-13 08:11:06 +01:00
Jacob Laursen
4dd6d3a8a2
Update license headers to 2023 (#14154)
* Update copyright year in configuration
* Update license headers

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-01-06 09:49:54 +01:00
openhab-bot
ad5facc2e5
New translations boschshc.properties (Italian) (#13899) 2022-12-10 14:51:09 +01:00
Gerd Zanker
584f637126
[boschshc] Support smoke detector (#13760)
* Add smoke detector service and add it to twinguard handler
* Add handler for smoke detector
* Support for smoke detector

added smoke detector device with SmokeDetectorCheckService
added SmokeDetectorCheckService to TwinguardHandler

added tests for smoke detector code
updated smoke detector code to latest boschshc version after cherry-picks of initial code from Christian Oeing

* re-generate i18n file, refactoring of smoke detector code to use abstract base classes
* Fix typos
* Add unit test for PlayPauseType commands
* Add unit test for SmokeDetectorCheckState
* Re-add null annotation
* Fix warning

Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: David Pace <dev@davidpace.de>
2022-12-10 11:18:13 +01:00
Дилян Палаузов
2a5d6beb64
Typos a/an (#13846) 2022-12-05 18:47:43 +01:00