Commit Graph

48 Commits

Author SHA1 Message Date
Wouter Born
8672ed0208
Start license headers with /* instead of /** (#18061)
Prevents JavaDoc tooling issues because these tools check comments starting with `/**`.

Signed-off-by: Wouter Born <github@maindrain.net>
2025-01-07 22:33:03 +01:00
Wouter Born
d6476042ec
Update license headers to 2025 (#18015)
* Update license headers to 2025

Signed-off-by: Wouter Born <github@maindrain.net>
2025-01-02 00:30:12 +01:00
Holger Friedrich
6978b9978b
[knx] Allow color temperatures specified in mired (#18004)
This allows other bindings or scripts to send commands
which specify the color temperature in mired.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-01-01 11:40:10 +01:00
Jacob Laursen
b4fb5a1f1b
Fix DateTimeType tests (#17764)
* Refactor test to verify UTC timestamp independently of time-zone

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-11-20 23:00:20 +01:00
Holger Friedrich
2d403dc158
[knx] Code rework (#17420)
* [knx] Code rework

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-09-15 22:48:34 +02:00
Holger Friedrich
dbc607abcf
[knx] Allow decoding of KNX Data Secure frames (#12434)
* [knx] Allow decoding of KNX Data Secure frames

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-09-15 21:55:30 +02:00
Holger Friedrich
1dd8fd10a6
[knx] Upgrade Calimero to 2.6-rc1 (#16588)
* [knx] Upgrade Calimero to 2.6-rc1
- Bugfixes and new subtypes for DPTs 20, 21, 22.
- Remove workarounds for issues in v2.5.1.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-31 10:44:16 +02:00
Holger Friedrich
99d1b423c9
[knx] Increase test coverage (#16511)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-16 11:51:53 +01:00
Holger Friedrich
2c1a08679a
[knx] Fix DPT 243.600 and 249.600 when time>=1000s (#16481)
* [knx] Fix DPT 243.600 and 249.600 when time>=1000s

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-04 18:56:34 +01:00
Holger Friedrich
51caca3008
[knx] Fix DPT 6.020 and 8.010 (#16453)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-25 11:59:19 +01:00
Holger Friedrich
dc1211b267
[knx] Fix warnings in test (#16434)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-21 19:24:28 +01:00
Holger Friedrich
f8e0bfd256
[knx] Add test for DPT 7.600 (#16433)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-20 18:42:29 +01:00
J-N-K
e1e6d715b4
Fix KNX dimmer channels (#16421)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-18 22:03:24 +01:00
Holger Friedrich
2e5a6c9d9f
[knx] Fix scale when sending DPT 7.002 or DPT 7.003 (#16395)
* [knx] Fix scale when sending DPT 7.002 or DPT 7.003

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-14 21:21:27 +01:00
Holger Friedrich
667461c6c5
[knx] Fix warnings and remove TODOs (#16394)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-14 21:17:59 +01:00
Holger Friedrich
500ccb6b25
[knx] Add tests for DPT 9 and DPT 14 (#16402)
* [knx] Add tests for DPT 9 and DPT 14

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

* remove import

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

---------

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-14 13:38:58 +01:00
Holger Friedrich
4c4f29283c
[knx] Add tests for DPT 5, DPT 6, DPT 8, DPT 13 (#16396)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-11 21:40:09 +01:00
J-N-K
8c0db0a4ee
[knx] Fix dimmer channels (#16364)
* [knx] Fix dimmer channels

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-05 23:15:54 +01:00
Kai Kreuzer
7671f4b9b1
[knx] Correctly support state sub-types for DPTs (#16337)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-02-02 20:13:11 +01:00
Holger Friedrich
e68897c0a1
[knx] Add support for RGBW represented by HSBType (#16078)
Allow lossy conversion from RGBW to HSBType and back instead
of using separate items for RGB and W.
Select via DPT 251.60600.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-01-26 21:57:17 +01:00
Holger Friedrich
e62bcf5db4
[knx] Allow receiving DPT 235.001 (#16094)
* [knx] Allow receiving DPT 235.001

Composed type not yet supported by Calimero, thus only receiving
data is implemented.
Configure DPT 235.001 to receive ActiveEnergy.
Configure DPT 235.61001 to receive Tariff information.

Fixes #15159

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-01-22 22:37:46 +01:00
Holger Friedrich
ba35e8d84a
[knx] DPT 1 to support Switch and Contact (#16238)
* Allow assigning Switch or Contact to most of the DPT 1 subtypes
(exceptions 1.008 UpDownType, 1.010 StopMoveType, 1.022 DecimalType).
* Tests for all published subtypes for DPT 1.
* Fix sending of DPT 1.022.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-01-21 21:43:21 +01:00
Holger Friedrich
ce1f366a39
[knx] Code cleanup (#16199)
- Enhance trace logging
- Remove unused file
- Null annotations

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-01-03 21:54:21 +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
Holger Friedrich
4ba325d0df
[knx] Add integration tests (#15727)
* [knx] Add integration tests
* [knx] Adapt handling of DPTs

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-16 12:51:14 +01:00
J-N-K
c44c9dc67e
[knx] Fix IOOB exception with missing DPT in number channels (#15730)
* Fix IOOB exception with missing DPT in number channels

Also improves test messages for DPT unit tests

Signed-off-by: Jan N. Klug <github@klug.nrw>
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-06 07:53:16 +01:00
Holger Friedrich
6196de7742
[knx] Fix all compiler warnings (#15840)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-05 19:46:18 -08:00
Holger Friedrich
1ca0f643a0
[knx] Fix typos in code comments (#15839)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-03 23:16:41 +01:00
Holger Friedrich
d0b161aca1
[knx] Adapt to core, temperature differences (#15573)
Special handling for temperature differences in °F and °F/%,
DPT 9.002 and 9.003, needs to be adapted due to change in core.

Refs openhab/openhab-core#3792.

Implementation is valid for 4.0 and 4.x snapshot.

Fixes #15567.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-13 20:23:59 +02:00
Holger Friedrich
c775792896
[knx] Disable tests failing due to QuantityType change in core (#15568)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-09 15:53:39 +02:00
Holger Friedrich
0437595678
[knx] Fix decoding of DPT 242.600 and add tests (#14875)
* [knx] Fix decoding of DPT 242.600 and add tests

Correct handling of parameter Y for DPT 242.600.

Add back to back tests of DPT 232.600 and 242.600,
testing color conversion from raw bytes to HSB and
back to Calimero color representation as String.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-30 14:03:54 +02:00
Holger Friedrich
ec30333314
[knx] Adapt to ColorUtil changes in core (#14808)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-15 10:25:51 +02:00
Holger Friedrich
b3dfba8cf5
[knx] Improve rounding when encoding DPT 232.60000 (#14772)
* [knx] Improve rounding when encoding DPT 232.60000
* [knx] SAT and warnings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-14 20:23:32 +02:00
Holger Friedrich
3cd9c6c86c
Adapt to ColorUtil changes in core (#14724)
* [deconz][dmx][mqtt.generic][mqtt.homeassistant][tado][tradfri][webthing] Adapt to core change (ColorUtil)

openhab/openhab-core#3479

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-08 11:42:18 +02:00
Holger Friedrich
bc03e8c5cf
[knx] Code cleanup (#14719)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-03-29 09:22:23 +02:00
Holger Friedrich
aae63e9488
[knx] Refactoring of KnxCoreTypeMapper and UOM Support (#14534)
* [knx] Refactoring, add basic support for UOM

Preparation for refactoring KnxCoreTypeMapper.
Carryover from smarthomej/addons#107.
Merge UOM implementations.

* [knx] Adapt tests

DPT strings for QuantityType now strip off a tailing .0 when decimals
are converted.

* [knx] Refactoring

Use pattern matching with instanceof operator (new Java17 feature).

* [knx] Refactoring, performance improvements

Introduce KNXChannel class.
Carryover from smarthomej/addons#114.

* [knx] Add warning for incompatible DPT type

Configuring incompatible DPT/channel combinations (e.g. DPT 1.005 (alarm) on Contact channels
or DPT 1.019 (windows/door) on Switch channels) is not allowed but was silently ignored.
This PR adds a warning in case incompatible configurations are detected.

Carryover from smarthomej/addons#203.

* [knx] Add full support for UoM

Replace UoM handling with the implementation from smarthome/j.
Carryover from smarthomej/addons#206.

* [knx] Refactor KNXCoreTypeMapper, add RGBW and xyY

Carryover from smarthomej/addons#208.

* [knx] Fix RGB conversion

Carryover from smarthomej/addons#219.

* [knx] Remove workarounds obsoleted by Calimero 2.5

Carryover from smarthomej/addons#226.

* [knx] Add parameter for disabling incoming UoM

Carryover from smarthomej/addons#230.

* [knx] Fix fallback to DecimalType in number conversion

Carryover from smarthomej/addons#279.

* [knx] Fix DPT 251.600 decoding

Carryover from smarthomej/addons#349.

* [knx] Fix UoM handling for special types
* [knx] Add test for KNXChannelFactory
* [knx] Update CODEOWNERS for knx
* [knx] Default conversion for DPT 5.001 and 6.001
* [knx] Fix write blocked forever after read from bus

Carryover from smarthomej/addons#299 and smarthomej/addons#330.

* [knx] Use new class ColorUtil from core for HSB conversion

Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-03-17 12:50:13 +01:00
Holger Friedrich
7ec7de55e3
[knx] Improve thread safety, null-analysis (#14509)
Carryover from smarthomej/addons#13 and smarthomej/addons#46, smarthomej/addons#60.

Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-03-06 22:34:16 +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
Holger Friedrich
3aefefbbb5
[knx] Upgrade Calimero library to release 2.5.1 (#14015)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2022-12-19 22:49:40 +01:00
Thomas Traude
66d7496d7b
[knx] Remove obsolete public modifier in tests (#13776)
Since JUnit Jupiter test classes and methods do not need to be `public`.

It is recommended to omit the `public` modifier.
See https://junit.org/junit5/docs/current/user-guide/#writing-tests-classes-and-methods

"Class and method visibility
Test classes, test methods, and lifecycle methods are not required to be
`public`, but they must not be `private`.

It is generally recommended to omit the `public` modifier for test
classes, test methods, and lifecycle methods unless there is a technical
reason for doing so (...)"

Signed-off-by: Thomas Traude <t-riggs@gmx.net>
2022-11-26 12:19:43 +01:00
Holger Friedrich
4e69e17f41
[knx] Improve localization (#13293)
* [knx] Improve localization

- introduce localization of error messages
- add new strings for common exceptions
- provide helper functions for translation
- add test cases

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2022-10-11 21:18:17 +02:00
Holger Friedrich
8a0b7a042c
[knx] Add support for KNX IP Secure (#12709)
* [knx] Add support for KNX IP Secure

* add support for KNX IP Secure, new options SECURETUNNEL and
  SECUREROUTER, refers to #8872
* add config options for credentials for secure connections
* update user documentation
* add test cases

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2022-08-08 16:55:41 +02:00
Holger Friedrich
8830ed527e
[knx] Allow sending items with units to KNX bus. (#12675)
Items with dimensions (QuantityType) are now translated and can be sent to the
KNX bus. This requires the correct DPT to be specified in the channel
definition. Fixes #10706.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2022-05-08 11:23:18 +02:00
Holger Friedrich
414d7a84e6
[knx] Reduce compiler warnings (#12518)
added NonNullByDefault annotations
rename functions and local variables not matching the naming scheme

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2022-03-27 11:27:39 +02:00
Hilbrand Bouwkamp
da59cdd255
Update license headers to 2022 (#11973)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2022-01-06 18:14:47 +01:00
Wouter Born
d6364aceb1
Update license headers to 2021 (#9620)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-02 22:03:14 +01:00
Wouter Born
bd82ca82df
Migrate tests to JUnit 5 (#8519)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-21 18:21:26 +02:00
Kai Kreuzer
6df6783b60 added migrated 2.x add-ons
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-21 03:37:19 +02:00