Commit Graph

82 Commits

Author SHA1 Message Date
Holger Friedrich
edaf17b345
Java 17 features (H-M) (#15520)
- 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
- remove null check before instanceof

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-08 14:36:59 +02:00
Kai Kreuzer
72607d3bee Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:20:31 +02:00
openhab-bot
809fceaff3 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 19:19:01 +00:00
mlobstein
6e2dddfe73
Declare connection for bindings G thru M (#14902)
* Declare connection for bindings G-M

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
2023-04-29 20:24:54 +02:00
Wouter Born
83cbe746d0
Remove redundant modifiers from interfaces (#14843)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-18 13:07:04 +02:00
openhab-bot
ed717c2c95
New Crowdin updates (#14531)
* New translations systeminfo.properties (German)
* New translations tado.properties (German)
* New translations bluetooth.properties (German)
* New translations bluetooth.properties (German)
* New translations mybmw.properties (German)
* New translations gardena.properties (German)
* New translations astro.properties (German)
* New translations avmfritz.properties (German)
* New translations chromecast.properties (German)
* New translations hue.properties (German)
* New translations logreader.properties (German)
* New translations icalendar.properties (German)
* New translations max.properties (German)
* New translations comfoair.properties (German)
* New translations denonmarantz.properties (German)
* New translations deutschebahn.properties (German)
* New translations dwdpollenflug.properties (German)
* New translations ecotouch.properties (German)
* New translations epsonprojector.properties (German)
* New translations exec.properties (German)
* New translations homematic.properties (German)
* New translations hpprinter.properties (German)
* New translations http.properties (German)
* New translations magentatv.properties (German)
* New translations awattar.properties (German)
2023-03-04 17:20:03 +01:00
dirkbe
01c38df9a5
[homematic] HUMIDITY and CONTROL_MODE as PaperUI standard channels (#14274)
HomematicIP added humidity and HVAC control mode under new channel
HEATING_CLIMATECONTROL_TRANSCEIVER|HUMIDITY. Those channels won't
show in PaperUI unless "Advanced" is selected. This pull request
adds those channels as standard.

Impacted HomematicIP devices: HmIP-BWTH, HmIP-BWTH24,
HmIPW-STHD, HmIPW-STH, HmIPW-WTH, HmIP-STHD, HmIP-STH, HMIP-WTH,
HmIP-WTH-2, HmIP-WTH-B
The devices HmIP-eTRV* and HmIP-WT only support CONTROL_MODE not
Humidity.

resolves: #11829

Signed-off-by: Dirk Benecke <dirkbe@web.de>
Signed-off-by: Dirk Benecke <dirkbenecke@Dirks-MBP.fritz.box>
2023-01-29 10:25:53 +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
maniac103
4dd60bb442
[homematic] Fix updating enum config values (#14213)
When changing an enum value in the configuration, we used the wrong data
type: while the value in the OH config is a string (the 'option value' -
see HomematicThingHandler::getValueForConfiguration), internally we use
an integer (the 'option index'), so we have to do the option value ->
option index conversion when applying the new value.
This especially was a problem for HM-MOD-EM-8 devices, which check the
CHANNEL_FUNCTION enum value as part of their initialization routine.
When disabling/enabling them after changing the CHANNEL_FUNCTION enum
value, they went offline, because their initialization failed due to a
NumberFormatException (via
HomematicThingHandler::doInitializeInBackground ->
HmChannel::checkForChannelFunctionChange ->
HmChannel::getCurrentFunction)

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2023-01-13 16:25:26 +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
Holger Friedrich
0304d74f87
Fix Markdown warnings in README.md (#14187)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-01-09 17:51:12 +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
Moritz 'Morty' Strübe
8fcfa0438b
[homematic] Add hints about using docker (#14121)
Signed-off-by: Moritz 'Morty' Strübe <morty@gmx.net>
2023-01-02 20:51:22 +01:00
J-N-K
4d6d6443ef
fix spotless after release (#14014)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 15:22:17 +01:00
openhab-bot
7993786dc9 [unleash-maven-plugin] Preparation for next development cycle. 2022-12-19 00:55:11 +00:00
Jerome Luckenbach
0e68936663
[Documentation] Markdown improvements f to m (#13866)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
2022-12-08 21:36:05 +01:00
Дилян Палаузов
0ffc5257d5
Typos a/an (#13876) 2022-12-08 21:12:49 +01:00
Дилян Палаузов
2a5d6beb64
Typos a/an (#13846) 2022-12-05 18:47:43 +01:00
maniac103
86e3b65816
[homematic] Fix min/max values for rollershutters (#13821)
* [homematic] Fix min/max values for rollershutters

For dimmers, the 1.0 max value sent by CCU was already converted to
percent values in the item state description. Do the same thing also for
roller shutters.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2022-12-03 13:29:52 +01:00
Дилян Палаузов
6c1373f7c2
Typos a/an (#13819) 2022-12-02 13:07:31 +01:00
Martin Herbst
54ccf847da
Some HM devices are using relative humidity (% rH/rF) as units (#13626)
Fix #13553

Signed-off-by: Martin Herbst <develop@mherbst.de>
2022-11-03 19:21:13 +01:00
Martin Herbst
dcc9190d2e
Allow default values that are lower than allowed minimum value (#13168)
Resolves #13097

Signed-off-by: Martin Herbst <develop@mherbst.de>
2022-07-25 12:16:30 +02:00
Tim
c729b82d59
[homematic] Update README.md (#13159)
* Update README.md
2022-07-22 14:12:29 +02:00
MeisterPiffer
c6c65c607b
[homematic] Update README.md (#13101)
add example for DSL rule with tabbed view
2022-07-21 15:09:07 +02:00
Kai Kreuzer
440f603e88
Apply spotless and resolver (#13027)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 16:00:37 +02:00
openhab-bot
ed4858ebbb [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 18:18:40 +00:00
maniac103
28ce7ebaed
[homematic] Validate datapoint values before writing to config (#12557)
* [homematic] Validate datapoint values before writing to config

HM config datapoint values on some devices can be out of their valid
range in some cases, particularly if they are unused by the device
currently [1]. Since openhab-core now validates attempts to update
configuration by the thing handlers, make sure we always send a valid
configuration even for those affected datapoints.

[1] One example for such behaviour is HmIPW-DRBL4, which has multiple
    datapoints which depend on each other
    - POWERUP_JUMPTARGET can have values OFF, ON, OFF_DELAY, ON_DELAY
    - POWERUP_ONDELAY_VALUE, POWERUP_ONDELAY_UNIT are only used if
      POWERUP_JUMPTARGET has value ON_DELAY
    - likewise, POWERUP_OFFDELAY_VALUE and POWERUP_OFFDELAY_UNIT are
      only used if POWERUP_JUMPTARGET has value OFF_DELAY
    - if e.g. the POWERUP_JUMPTARGET is OFF, e.g. POWERUP_ONDELAY_VALUE
      might stay uninitialized by CCU and/or device itself, in which
      case it may be reported with an invalid value

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2022-04-03 11:39:59 +02:00
Martin Herbst
a533b19130
[homematic] Prevent the use of exponential notation (#12436)
* Prevent the use of exponential notation

The CCU does not accept exponential notation in TCL scripts.

Fix #12301

Signed-off-by: Martin Herbst <develop@mherbst.de>
2022-03-07 22:04:33 +01:00
Flole998
0e0b9afe08
[homematic] Fix invalid default values ending up in the thing type (#12437)
Sometimes invalid default values ended up in the default value for a channel of a thing type. Initializing the thing would fail completely complaining that it is not an allowed option. This patch makes sure those values are actually valid and attempts to correct them if they are invalid.

Signed-off-by: Flole <flole@flole.de>
2022-03-07 21:51:17 +01:00
maniac103
f29d86cf4f
[homematic] Remove state description step size handling (#12192)
The RPC protocol doesn't provide this value, so it always was made up
more or less arbitrarily. Since the UI now uses this value for
validation purposes, there are cases where valid values can not be
entered due to this step size (particularly for datapoints with more
than 1 decimal digit).

Fixes #12183

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2022-02-06 20:21:59 +01:00
maniac103
a4c579b753
[homematic] Fix long button press handling for HM-IP devices (#11982)
* [homematic] Fix long button press handling for HM-IP devices

HM devices have the following long press cycle:
PRESS_CONT
PRESS_LONG
PRESS_CONT (N times for repetion)
PRESS_LONG_RELEASE

while (at least some) HM-IP devices use this one:
PRESS_LONG
PRESS_LONG_START
PRESS_LONG (N times for repetition)
PRESS_LONG_RELEASE

Add support for the latter case while keeping support for the former
case.

Signed-off-by: Danny Baumann <dannybaumann@web.de>

* [homematic] Track 'uses LONG_START datapoint' flag per-device
2022-01-13 09:09:19 +01:00
raykleibelt
65002647df
Update HomematicDeviceDiscoveryService.java (#11971)
fix for bug #11969

After a restart of openHAB the function 'getScanTimeout()' is called before the member 'installModeDuration' has been initialized with the correct value from the configuration. With a large number of Homematic devices, the default value of 'installModeDuration' is too small to read in all Homematic devices from the CCU.
Therefore, when calling the function 'getScanTimeout()', the value is read directly from the configuration. The member 'installModeDuration' has been removed.

Signed-off-by: raykleibelt <54982000+raykleibelt@users.noreply.github.com>
2022-01-07 21:43:24 +01: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
Christoph Weitkamp
167f8ebc49
Avoid UnsupportedEncodingException & use const from StandardCharsets (#11948)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-03 16:05:08 +01:00
openhab-bot
c23f6adf13
New Crowdin updates (#11832)
* New translations astro.properties (Finnish)
* New translations astro.properties (German)
* New translations bluetooth.properties (German)
* New translations boschshc.properties (Italian)
* New translations comfoair.properties (German)
* New translations dwdunwetter.properties (German)
* New translations epsonprojector.properties (German)
* New translations gpio.properties (German)
* New translations heliosventilation.properties (German)
* New translations homeconnect.properties (German)
* New translations homematic.properties (German)
* New translations ipp.properties (German)
* New translations jruby.properties (Hungarian)
* New translations jsscripting.properties (German)
* New translations jsscripting.properties (Hungarian)
* New translations map.properties (German)
* New translations map.properties (Hungarian)
* New translations mqttbroker.properties (Italian)
* New translations nanoleaf.properties (German)
* New translations ocean.properties (German)
* New translations openhabcloud.properties (Finnish)
* New translations samsungtv.properties (Hungarian)
* New translations shelly.properties (German)
* New translations snmp.properties (German)
* New translations sonos.properties (German)
* New translations spotify.properties (German)
* New translations tr064.properties (German)
* New translations tradfri.properties (German)
* New translations unifi.properties (German)
* New translations unifi.properties (Hungarian)
* New translations valloxmv.properties (Finnish)
* New translations volvooncall.properties (German)
* New translations xslt.properties (German)
2021-12-29 13:16:52 +01:00
Marcel
cc47ef7f3e
pom update from http to https reference (#11833)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2021-12-23 19:40:44 +01:00
Kai Kreuzer
48746f5e3f Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 09:07:55 +01:00
openhab-bot
6dc031e6cf [unleash-maven-plugin] Preparation for next development cycle. 2021-12-20 00:30:46 +00:00
Wouter Born
07a1976c81
Add default translations for binding add-ons (#11760)
* Add default translations for binding add-ons

This makes the texts used by these add-ons translatable with Crowdin.

To keep the PR simple, it only adds default translations for add-ons which do not yet have any default translations properties file.
We can do follow up PRs for adding missing key/values to add-ons that already have these files or to remove duplications.

There are several add-ons in this PR that do have non-English translation files, so I'll upload those to Crowdin when the PR is merged.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-15 18:40:21 +01:00
Martin Herbst
adecb53042
[homematic] Improve (re)connect handling to Homematic gateways (#11429)
* Use globally unique id for registration of callback to allow ...

the connection of multiple OH installations with one CCU.

The bridge id is not sufficient for this purpose because it is same in
all OH installations.


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Retry callback re-registration after connection is resumed

Some services on the CCU need longer to start and are not available
immediately after the connection to the CCU has been resumed.

Improves the solution for #8808

Fixes #10439

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Description was missing.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Changed setting name and description to avoid confusion


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Added a troubleshooting tip to solve a communication problem


Signed-off-by: Martin Herbst <develop@mherbst.de>

* Shortened the label name to follow the guide lines

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Print more information about the reason for the failure

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Using scheduler thread pool and simplified configuration

Instead of configuring separate values for retry delays and number of
retries only the maximum time for retries can be configured.
The init method uses fixed delays.

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Don't retry to send if gateway does not answer at all

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Improved reconnect handling

- unregister callback not necessary if connection is lost
- wait 30s until clients and servers are restarted to give the gateway
some time to recover

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Spotless

Signed-off-by: Martin Herbst <develop@mherbst.de>

* Cancel an active future if the binding is stopped

Signed-off-by: Martin Herbst <develop@mherbst.de>
2021-12-11 18:34:22 +01:00
Flole998
145bd0ec97
[Homematic] Fix "Channel not found for Datapoint"-Errors (#11493)
Signed-off-by: Flole <flole@flole.de>
2021-12-11 17:02:27 +01:00
Wouter Born
589400e223
Fix/suppress PMD CompareObjectsWithEquals findings (#11476)
Newer PMD versions discover more CompareObjectsWithEquals findings.

Related to https://github.com/openhab/static-code-analysis/pull/423

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-02 10:43:53 +01:00
Wouter Born
d4e15bfbd6
Remove deprecated XStream.setupDefaultSecurity calls (#11365)
The XStream.setupDefaultSecurity method is deprecated since XStream 1.4.18.
It no longer does anything, because this is the default in newer XStream versions.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-10 20:30:07 +02:00
maniac103
88975dcd13
[homematic] Remove double press events and improve long press events for button trigger (#11186)
HM devices provide not only 'long press' events, but also 'long
press continued' (sent in configured long press interval) and 'long
press released' events. So far, those events were swallowed in the
button datapoint handler.
Improve the situation by forwarding those events to the button trigger
channel, making them usable in e.g. rules that react on button long
presses.

A double press timeout of 2 seconds is too long and disturbs single
press processing. Additionally, for double press processing to be
useful, the first press would need to be swallowed until double press
timeout elapses, which is not what happened here: the first PRESS was
sent out as SINGLE_PRESS event, making it impossible to meaningfully
distinguish the 'single press' and 'double press' events within rules.

If needed, double press handling can be implemented equally well within
a rule.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2021-09-18 14:32:40 +02:00
Kai Kreuzer
195d532aa7
Correctly disable unstable test (#11232)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-09-09 09:35:14 +02:00
Michael B
9f35e7ba31
Added inverted info for rollershutters (#11094)
Currently openHAB and the CCU are using different values for the same state of a rollershutter.
Added information about this under Troubleshooting and listed some examples.

Signed-off-by: Michael Bredehorn <michael@bredehorn.nrw>
2021-08-11 12:00:30 +02:00
maniac103
d8aacd86a0
[homematic] Fix UI enumeration of HM-MOD-EM-8 channels (#10907)
The set of available HM-MOD-EM-8 channels varies depending on the
function a given channel is configured to use, which is why for those
devices we can't determine a static ThingType, but instead must populate
the thing channels on initialization. The existing code already handled
that case, but missed registering channel types for the dynamically
generated channels, which is why those channels were not shown in main
UI.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2021-07-17 23:33:08 +02:00
Martin Herbst
b043d8f4bc
[homematic] Provide additional null pointer checks (#10965)
* Fixed a rare NPE introduced while replacing commons-lang
* Provide additional null pointer checks

It is possible that the meta data returned for some device does not
contain a default or maximum value.

Fixes #10945
Fixes #10961

Signed-off-by: Martin Herbst <develop@mherbst.de>
2021-07-15 19:46:29 +02:00
Fabian Wolter
a06be4785f
Disable unstable tests (#10956)
* Disable unstable tests

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2021-07-07 20:06:06 +02:00