Commit Graph

123 Commits

Author SHA1 Message Date
J-N-K
ae146111c1
[mqtt] Dynamically change accepted item-type for Number channels (#15114)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-21 11:47:51 +02:00
Robert Szucs
254efb5372
Fix a typo (#14953)
Signed-off-by: Robert Szucs <robert.szucs@casrd.net>
2023-05-08 11:41:29 +02:00
Holger Friedrich
428ccbe075
[mqtt][tradfri][webthing] Adapt to ColorUtil changes in core (#14810)
* [mqtt][tradfri][webthing] Adapt to ColorUtil changes in core

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-21 23:55:36 +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
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
Cody Cutrer
96038c664a
[mqtt.generic] Don't log state description from provider when not found (#14650)
Fixes #9782

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-03-22 16:53:50 +01:00
Jacob Laursen
04374ef4af
Fix color tests after HSBType changes (#14631)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-03-19 07:45:16 +01:00
Cody Cutrer
22b28bf674
[mqtt.generic] separate command parsing from cached value updating (#12238)
* [mqtt.generic] separate command parsing from cached value updating

fixes #12150

Previously, Value.update would parse the command, _and_ update the cached
value with that command. Which means that when sending a command towards
MQTT (instead of processing an update from MQTT), the cached value was
unintentionally updated. This prevented the REFRESH command from returning
the most recent value received from the device.

Separating the two concerns also makes the test more obvious what they are
testing, and vastly simplified a kludgy workaround that RollershutterValue
was using to be able to process Commands that aren't States.

Signed-off-by: Cody Cutrer <cody@cutrer.us>

* [mqtt.generic] split Value::parseCommand into parseMessage

so that a particular value type subclass can have varying implementations
if it desires

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-03-07 19:33:17 +01:00
Cody Cutrer
e0adc8da02
[mqtt] fix thread concurrency issue with type provider (#14229)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-01-21 09:59:37 +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
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
Udo Hartmann
d73218d882
[mqtt.generic] Change color example (#13861)
Change color example to fit to the real parameters.
2022-12-14 08:21:34 +01: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
Sami Salonen
923c0f1db2
[mqtt] Avoid parallel streams with common thread pool to avoid deadlocks (#13621)
To mitigate issue https://github.com/openhab/openhab-core/issues/3125
(common thread pool exhaustion when combining parallel streams with
synchronization or locks)

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2022-12-06 13:02:45 +01:00
Дилян Палаузов
2a5d6beb64
Typos a/an (#13846) 2022-12-05 18:47:43 +01:00
Дилян Палаузов
6c1373f7c2
Typos a/an (#13819) 2022-12-02 13:07:31 +01:00
Дилян Палаузов
78534e8106
Typos a/an (#13812) 2022-12-01 14:30:50 +01:00
Andrea Cioni
d505c01a6f
Update README.md (#13642)
`color_mode` is not recognized as a channel parameter, instead, `colorMode` is
2022-11-02 08:20:58 +01:00
Cody Cutrer
26ad08cca9
[mqtt] set the proper unit in the state description (#13604)
So that other pieces of openhab can know what unit it's going to be,
without it having a value yet. Importantly, any necessary conversion
that need to be applied to the other portion of the state description -
min, max, and step.

See also https://github.com/openhab/openhab-core/pull/3132

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-27 08:34:50 +02:00
Cody Cutrer
5f6241cbc6
[mqtt] support mired<->Kelvin unit conversion (#13575)
Just have to use the newer toInvertibleUnit method that allows
the dimension to change.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-22 20:07:33 +02:00
Cody Cutrer
98677c18b3
[mqtt.homeassistant] ensure availability topics get subscribed (#13466)
HASS registers availability topics before calling start(), so
the AbstractMQTTThingHandler was never subscribing/starting the
availability channel(s). So do so in start() of the base class.

I checked other implementations, and either they already handle
re-registering availabilityTopics in their start()
(GenericMQTTThingHandler), or they don't use availabilityTopics
at all from the base class and manage it themselves (Homie).

Note that this shows up as newly-added HASS things not having
a problem (because the components aren't discovered until after
the ThingHandler is started), but if you restart OpenHAB or
disable/enable the thing, the channels (and components) are
cached, thus how availabilityTopics are known before starting.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-08 09:12:28 +02:00
Cody Cutrer
517fe44b36
[mqtt.generic] fix range of RGB values (#13426)
Range is 0..255, not 0..250.

rgb -> hsv -> rgb still isn't perfect, but it's better. In
particular, I found this when using HSBType.BLUE in a test,
and it was coming out as 0,0,250 in RGB. It now comes out as
a proper 0,0,255.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-09-26 19:03:37 +02:00
Cody Cutrer
8656ba501a
[mqtt.homeassistant] support availability_templates (#13397)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-09-19 23:00:01 +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
Wouter Born
707ecaf47b
Reduce Mockito stubbing warnings (#12576)
See also: openhab/openhab-core#2893

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-05 00:06:49 +02:00
Wouter Born
a6f5b48dd5
[mqtt] Fix most SAT findings (#12492)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-19 09:27:41 +01:00
openhab-bot
5005dc002f
New Crowdin updates (#12392)
* New translations bluetooth.properties (Finnish)
* New translations danfossairunit.properties (Danish)
* New translations hdpowerview.properties (Danish)
* New translations jruby.properties (Italian)
* New translations miele.properties (Danish)
* New translations mqtt.properties (Italian)
* New translations openwebnet.properties (Italian)
2022-03-07 21:25:05 +01:00
Cody Cutrer
923fb12b7d
[mqtt.homie] handle exceptions parsing attributes (#12254)
fixes #10711

technically this code is in mqtt.generic, but it's only used by Homie.

in particular, if an incoming string doesn't match an enum, this will now
just ignore the value instead of raising an exception to be caught somewhere inside
of Hive MQTT, and eventually timing out and logging that mandatory topics weren't
received, instead of logging a pointer to the actual problem. this makes it so that
if there's a homie $datatype openhab doesn't understand (like duration), it will be
able to get to the point of just choosing a string channel

also did some minor debug logging cleanup for mqtt:
 * fixed a typo
 * when logging homie device name from the thing handler, use the config deviceid,
   since we likely don't have the attributes from MQTT yet

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-02-23 13:38:00 +01:00
lolodomo
6ef311304f
Remove some of the empty XML tag "description" (#12332)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-02-20 23:16:16 +01:00
Wouter Born
8559651166
[mqtt] Add default translations (#12328)
This will allow for translating the MQTT Binding in Crowdin.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-20 20:12:31 +01:00
jimtng
d46367dfd0
[mqtt] Remove references to the System Broker (#12233)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2022-02-07 16:03:41 +01:00
jimtng
a3bd8caba9
[mqtt.generic] Support transformationPattern for thing's availabilityTopic (#12167)
* [mqtt.generic] Support transformationPattern for thing's availability payload
* [mqtt] Remove org.apache.commons.lang3.StringUtils dependency

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2022-02-06 10:30:06 +01:00
jimtng
5b1627c426
[mqtt] publishMQTT Action accepts a bytearray payload (#12170)
* [mqtt] MQTT Action publishMQTT accept byte array

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2022-02-01 00:51:46 +01:00
jimtng
927dbba107
[mqtt.generic] Include availabilityTopic in the binding docs (#12158)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2022-01-30 11:45:33 +01:00
jimtng
dc10897456
[mqtt.generic] Rename channel label from Percentage Value to Dimmer (#12162)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2022-01-30 09:26:46 +01:00
jimtng
3c32f9aa24
[mqtt.generic] Fix default configuration and docs for color_mode (#12163)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2022-01-30 09:13:39 +01:00
James Melville
0fcebcde3f
[mqtt.generic] Add UOM to inbound values for MQTT Channels (#10727)
* Add UOM for MQTT Channels

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Fix dependencies

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Simplify units parsing, remove channelUID from NumberValue constructor

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Simplify pattern

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Fix tests

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Correct Units reference

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Correct homeassistant binding changes

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Wrap precision in temperature unit definition

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Use BigDecimal for precision

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Use BigDecimal throughout

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Fix SAT

Signed-off-by: James Melville <jamesmelville@gmail.com>

* Inverty equals check

Signed-off-by: James Melville <jamesmelville@gmail.com>
2022-01-09 10:05:53 +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
LukasA83
9b70cf0be4
[MQTT] Add additional logging information (#11849)
* [MQTT] Add additional logging information

Add additional logging information when command is not supported by type.

Signed-off-by: Lukas Agethen <lukas83@gmx.de>
2021-12-27 19:59:47 +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
Florian Albrecht
13ca0d5500
[mqtt] Fix avail topics subscription after Brige Restart (#9851)
Fixes #9850

Signed-off-by: Florian Albrecht <cw.florian.albrecht@gmx.de>
2021-12-11 17:57:13 +01:00
Wouter Born
798abaa4ca
Switch properties files encoding from ISO-8859-1 to UTF-8 (#11349)
* Switch properties files encoding from ISO-8859-1 to UTF-8

Crowdin will generate translations in this encoding, so this prevents a lot of diffs which makes it easier to review future Crowdin PRs.

Related to openhab/openhab-core#2298

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-09 19:56:49 +02:00
Markus Storm
e01532b666
[mqtt] add .things example to bindings docs (#11007)
* Add .things example

based https://www.openhab.org/blog/2018-12-16-mqtt-arrives-in-the-modern-openhab-2-x-architecture.html

* removed bad copy'n'pasted sentence
2021-07-17 23:53:29 +02:00
Kai Kreuzer
bebab9ce29 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:25:35 +02:00
jenkins
8c5c81e256 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 17:35:01 +00:00
Rogier Hofboer
ea2cb217e0
[mqtt.generic] Percentage range fix #10586 (#10587)
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
2021-06-21 21:24:54 +02:00
Jerome Luckenbach
10f88c0934
Fix http -> https where applyable. (#10573)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
2021-04-24 20:39:51 +02:00
Wouter Born
f3503430b4
Rework more commons-lang usages (#10314)
* Reworks many commons-lang usages to use standard Java
* Updates all remaining commons.lang imports to commons.lang3

Related to openhab/openhab-addons#7722

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-16 12:38:16 +01:00
Jay Sprenkle
5af916afaa
[mqtt.generic] Update README.md (#9881)
Correct grammar in troubleshooting section
2021-01-24 15:51:42 +01:00
J-N-K
f461e5a3a9
Fix trigger channel definition (#9927)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-01-23 21:21:37 +01:00
Jochen Klein
f2ed9841df
[mqtt.generic] Fix default values in switch/contact channels (#9760)
Signed-off-by: Jochen Klein <git@jochen.susca.de>
2021-01-23 21:11:39 +01:00
Wouter Born
05c16b0395
Fix links and NOTICE files (#9860)
* Updates links to target the openhab-addons 'main' branch instead of the 'master' branch
* Updates some NOTICE files to indicate content is maintained by openHAB instead of Eclipse SmartHome

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-18 21:49:06 +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
ecac667258
Apply Spotless, update skeleton project version, resolve itest runbundles (#9459)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:37:44 +01:00
jenkins
e4554f4aa6 [unleash-maven-plugin] Preparation for next development cycle. 2020-12-21 10:36:42 +00:00
James Melville
4586f18863
[mqtt] Correct Typo (availabe) and propose clearer naming (#9403)
Signed-off-by: James Melville <jamesmelville@gmail.com>
2020-12-17 08:36:41 -08:00
Wouter Born
d2e5c3e7dd
Remove SmartHome leftovers (#9283)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-08 18:03:49 +01:00
Wouter Born
ac6f08908f
Use renamed Units class (#9267)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-07 10:34:02 +01:00
Wouter Born
ac18da7fc3
Use core unit classes (#9261)
Add-ons should not depend on tec.uom.se classes but use core unit classes instead so they are less impacted when this library is replaced or upgraded.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-06 19:57:26 +01:00
J-N-K
ba4c96d99d
[infrastructure] move infered nullness warnings to error and update EEA (#8949)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-11-12 21:07:11 +01:00
Jochen Klein
ddb5f9a3bf
[mqtt.generic] Fix re-subscribing on new connection (#8920)
Signed-off-by: Jochen Klein <git@jochen.susca.de>
2020-10-31 16:57:34 -07:00
J-N-K
bd664ff0c8
[infrastructure] add external null-annotations (#8848)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-10-31 00:29:03 +01:00
Armin Stebich
e0efd8438a
[mqtt] fixed Hex/Oct formatting, resulting values were interchanged (#8730)
Signed-off-by: Armin Stebich <home@mail.lordofbikes.de>
2020-10-12 07:41:32 -07:00
Jochen Klein
f06068a189
[mqtt.homeassistant] Make sensors compliant (#8591)
Signed-off-by: Jochen Klein <git@jochen.susca.de>
2020-10-01 18:07:08 -07:00
Wouter Born
b503dce9fd
Fix MQTT transport deprecations (#8570)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-24 13:50:46 -07:00
Wouter Born
7f39d01a0f
Remove/ignore Eclipse project files (#8529)
Fixes #8451

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-21 22:50:37 +02: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