Commit Graph

273 Commits

Author SHA1 Message Date
J-N-K
4182980ec8
Add ItemStateUpdatedEvent and enable group channel-links (#3141)
* Add (Group)ItemStateUpdatedEvent

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-31 23:01:40 +02:00
J-N-K
8494bf1199
[config] Fix ConvigValidationMessage in ThingManagerImpl (#3474)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-24 10:13:59 +01:00
J-N-K
9289fd5a78
Bump spotless and fix formatting (#3469)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-20 23:14:59 +01:00
Andrew Fiddian-Green
73b8a3ae32
Fix channel order in REST API (#3448)
* Fix sort order of Things in UI
* Add itest for channel order

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-03-13 17:26:34 +01:00
openhab-bot
07ffc11c87
New Crowdin updates (#3438)
* New translations automation.properties (Polish)
* New translations automation.properties (Slovenian)
* New translations DefaultSystemChannels.properties (Slovenian)
* New translations LanguageSupport.properties (Portuguese, Brazilian)
* New translations magic.properties (Slovenian)
* New translations restauth.properties (Norwegian)
* New translations restauth.properties (Slovenian)
* New translations validation.properties (Norwegian)
* New translations validation.properties (Polish)
* New translations validation.properties (Slovenian)
* New translations voice.properties (Norwegian)
* New translations voice.properties (Slovenian)
2023-03-08 22:09:07 +01:00
J-N-K
d0a0e6d399
Add support for channel-groups to update instructions (#3391)
* Add support for channel-groups to update instructions

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-07 21:57:39 +01:00
J-N-K
76a22d9925
Fix ConfigValidationException handling in ThingManager (#3417)
Also makes sure the `checkPrerequisites` job can't crash by catching `RuntimeException` during processing.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-02 21:09:47 +01:00
J-N-K
a2cdb25aaf
Fix CME in ThingManagerImpl (#3415)
If several threads try to acquire a lock for things a CME is thrown.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-02 17:54:41 +01:00
J-N-K
9778e6cc74
Allow initialization of incomplete things (#3397)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-01 13:14:16 +01:00
openhab-bot
ccef3d24ff
New Crowdin updates (#3395)
* New translations DefaultSystemChannels.properties (Czech)

* New translations addons.properties (Czech)

* New translations marketplace.properties (Czech)

* New translations restauth.properties (Czech)

* New translations voice.properties (Czech)

* New translations validation.properties (Czech)
2023-02-24 20:25:02 +01:00
J-N-K
dff6f9b984
Refactor XML handling (#3385)
* Refactor XML handling for things
* integrate config.xml and improve naming

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-23 20:06:29 +01:00
lolodomo
cd45dfe9f7
New method to build a valid consumer name for a web client (#3359)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-02-19 17:22:00 +01:00
J-N-K
d7fa5534bf
Refactor ThingManagerImpl (#3330)
* Refactor ThingManagerImpl

This

- moves config description URI to type-base class
- decouples the thing manager from bundle loading
- makes sure that all thing/channel-types and config descriptions are available when the thing is initialized
- enables thing type updates

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-15 22:03:59 +01:00
Cody Cutrer
35a70064c4
Fix CommunicationManager erroring on unusual item<->channel link (#3326)
Some bindings that dynamically create channels (mqtt.homie) might create
a channel that declares itself as Number:Dimensionless because the
end-device metadata has a unit of "%". But a savvy user might want to
link that to a Dimmer or Rollershutter item depending on what the device
actually is. This actually works just fine since QuantityType (with unit
PERCENT) and PercentType implicitly convert between each other. Except
this odd compatibility code in CommunicationManager that tries to assist
bindings that _aren't_ QuantityType compatible. It assumes if the channel's
item type is a dimensioned item, that the actual Item is a NumberItem,
and casts without checking. All this does is checks for that case to avoid
a ClassCastException.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-01-23 20:53:24 +01:00
J-N-K
1c34321cb5
[thing] Improve channel handling in ThingImpl (#3241)
* Improve channel-handling in `ThingImpl`

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-20 14:55:13 +01:00
Cody Cutrer
8be306a5bc
Cleanup event filtering and improve EventFilter usage (#3295)
* don't use event.topics OSGi service property
* use TopicPrefixEventFilter

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-01-03 16:30:12 +01:00
J-N-K
8d64ecfd8d
Update license header to 2023 (#3294)
* Update license header to 2023

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-03 09:45:42 +01:00
J-N-K
98b4902c4a
Remove AccessController.doPrivileged calls (#3271)
The `AccessController` and the `SecurityManager` is deprecated for removal in Java 17. We don't make use of the `SecurityManager` anyway, so we can safely remove it.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-30 16:32:34 +01:00
J-N-K
d115032940
Add JavaDoc for the ThingBuilder (#3285)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-30 16:24:43 +01:00
Wouter Born
7888da1684
Fix some recently introduced SAT and NPE issues (#3251)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 15:11:49 +01:00
Wouter Born
687688db7e
Update Eclipse .classpath files (#3250)
Also adds some missing files for recently added projects.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 14:14:35 +01:00
J-N-K
3fc4d23734
Fix spotless and resolve itests (#3239)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 11:09:31 +01:00
openhab-bot
35254b3a0a [unleash-maven-plugin] Preparation for next development cycle. 2022-12-18 23:08:22 +00:00
openhab-bot
97299c7dcb
New Crowdin updates (#3237)
* New translations DefaultSystemChannels.properties (French)

* New translations restauth.properties (French)

* New translations voice.properties (French)
2022-12-18 14:03:51 +01:00
openhab-bot
d4ea62b983
New Crowdin updates (#3221)
* New translations DefaultSystemChannels.properties (Dutch)
* New translations restauth.properties (Dutch)
* New translations units.properties (Portuguese)
* New translations units.properties (Portuguese)
* New translations units.properties (Portuguese, Brazilian)
* New translations units.properties (Portuguese, Brazilian)
* New translations voice.properties (Dutch)
* New translations voice.properties (German)
* New translations voice.properties (Hebrew)
* New translations voice.properties (Italian)
* New translations voice.properties (Polish)
2022-12-12 22:23:13 +01:00
Cody Cutrer
e2bcdcc8f3
Allow profiles to access the entire context of the link they're applied to (#3151)
So that they can vary their processing based on the item or channeluid itself,
instead of (or in addition to) solely on the prior states passing through it.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-12-11 13:30:16 +01:00
Hilbrand Bouwkamp
207c4a04da
Fix bug in migrateThingType to not call managed thing provider directly (#3162)
The `migrateThingType` call the managed thing provider directly instead of checking if it's actually a managed thing.
This check is done in the `thingUpdated` method. Changed the code so it makes the same call as in `thingUpdated`.

Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2022-12-10 10:12:04 +01:00
Дилян Палаузов
f64874e226
Fix a/an typos (#3184) 2022-11-30 21:16:18 +01:00
Дилян Палаузов
e556fdf81b
Fix a/an typos (#3181)
* Typos a/an
* Fix typo generation in generateTagClasses.groovy

Signed-off-by: Wouter Born <github@maindrain.net>
2022-11-29 20:57:48 +01:00
Cody Cutrer
af3738487c
add QuantityType.toUnitRelative (#3177)
this is a useful helper that can eliminate some complicated code elsewhere.
starting in SystemOffsetProfile. then I also want to use it in the homekit
addon.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-11-27 10:09:52 +01:00
J-N-K
d4ceca9fe0
Fix config normalization in ThingUpdatedEvent (#3157)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-11-13 10:44:30 +01:00
Sami Salonen
18d063e272
Avoid parallel streams with common thread pool to avoid deadlocks (#3137)
* Avoid parallel streams with common thread pool to avoid deadlocks

To mitigate issue #3125

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2022-11-01 20:05:54 +01:00
Cody Cutrer
221c80b12f
Change system.color-temperature-abs channel type to be a Number:Temperature (#3129)
refs https://github.com/openhab/openhab-addons/pull/13570#issuecomment-1288139778

now that Kelvin and mireds/mireks are easily convertible

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-11-01 09:50:01 +01:00
Cody Cutrer
3659542bae
Support mired units (#3108)
* Support mired units

Mired are fairly common to describe the color temperature of
lightbulbs (slightly less common than Kelvin), but are very
useful for various calculations when adjusting the color
temperature, as well as being necessary for various integerations
that require mired units.

This commit makes them a well-known unit (previously they were
still usable, using "MK^-1"), as well as making them easier to
work with on QuantityType. The hiccup is that Mireds aren't
technically a Temperature dimension, because they're a reciprocal.
So add a `inverse` method that delegates to javax.measure's
same method, and then use it as necessary when doing unit
conversions and comparisons. Unfortunately, because the
dimension changes, the return value of a conversion won't
necessarily be the same type, an additional method is added
for callers that are willing to handle the change in
dimension. This is implemented for all callers that can use
it in core.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-16 13:50:46 +02:00
openhab-bot
4096df1c64
New translations DefaultSystemChannels.properties (Norwegian) (#3098) 2022-10-05 18:44:21 +02:00
openhab-bot
92105d9a28
New translations DefaultSystemChannels.properties (Italian) (#3088) 2022-09-23 18:16:28 +02:00
J-N-K
0f82c38eea
Normalize thing configuration before initialization (#3024)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-20 22:15:24 +02:00
J-N-K
4a84b80c2c
Fix missing initial thing status event (#3072)
* Fix missing initial thing status event

A thing always has a status. This status is not properly propagated to the event bus when the thing is added. This e.g. leads to a situation where a thing's first status that is received by am event subscriber is "INITIALIZING" instead of "UNINITIALIZED". The status should always be sent so that the thing lifecycle can properly be tracked by event listeners.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-20 21:04:52 +02:00
openhab-bot
8ebc8204c7
New Crowdin updates (#3082)
* New translations units.properties (Portuguese)

* New translations units.properties (Portuguese, Brazilian)

* New translations DefaultSystemChannels.properties (German)

* New translations DefaultSystemChannels.properties (Hungarian)

* New translations units.properties (Portuguese)

* New translations units.properties (Portuguese, Brazilian)

* New translations DefaultSystemChannels.properties (Polish)

* New translations DefaultSystemChannels.properties (Finnish)

* New translations DefaultSystemChannels.properties (Hebrew)

* New translations DefaultSystemChannels.properties (Danish)
2022-09-18 10:11:32 +02:00
Christoph Weitkamp
cda7b098bd
[thing] Added default channel types for electrical energy (#3079)
* Added default channel types for electrical energy

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-09-11 14:39:36 +02:00
J-N-K
6c9b7676e4
Prevent crash on invalid entry in ManagedThingProvider (#3053)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-08-22 17:40:01 +02:00
openhab-bot
c4f0ab44df
New Crowdin updates (#3054)
* New translations units.properties (Portuguese)

* New translations units.properties (Portuguese, Brazilian)

* New translations firmware.properties (Slovenian)

* New translations units.properties (Slovenian)

* New translations validation.properties (Slovenian)

* New translations messages.properties (Slovenian)

* New translations tags.properties (Danish)

* New translations tags.properties (Slovenian)

* New translations DefaultSystemChannels.properties (Slovenian)

* New translations LanguageSupport.properties (Slovenian)

* New translations SystemProfiles.properties (Slovenian)

* New translations jsonStorage.properties (Slovenian)

* New translations network.properties (Slovenian)

* New translations i18n.properties (Slovenian)

* New translations voice.properties (Slovenian)

* New translations chart.properties (Slovenian)

* New translations persistence.properties (Slovenian)

* New translations addons.properties (Slovenian)

* New translations restauth.properties (Slovenian)

* New translations ephemeris.properties (Slovenian)

* New translations inbox.properties (Slovenian)

* New translations audio.properties (Slovenian)

* New translations hli.properties (Slovenian)

* New translations lsp.properties (Slovenian)

* New translations marketplace.properties (Slovenian)

* New translations sitemap.properties (Slovenian)

* New translations SystemThingStatusInfos.properties (Slovenian)

* New translations magic.properties (Slovenian)

* New translations automation.properties (Hebrew)

* New translations automation.properties (Slovenian)
2022-08-03 18:03:28 +02:00
J-N-K
ae3d7c749c
Add REST support for deleting links and removing orphaned links (#2970)
* add link remove for item to registry

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-19 09:24:47 +02:00
openhab-bot
f84d72d449
New Crowdin updates (#3043)
* New translations messages.properties (Danish)

* New translations audio.properties (Danish)

* New translations inbox.properties (Danish)

* New translations addons.properties (Danish)

* New translations persistence.properties (Danish)

* New translations lsp.properties (Danish)

* New translations sitemap.properties (Danish)

* New translations SystemThingStatusInfos.properties (Danish)
2022-07-15 19:16:14 +02:00
Patrick Fink
2b8bccb8fd
Add missing & refactor existing button toggle profiles (#3027)
* Add missing & refactor existing button toggle profiles
* ToggleProfileTest improvements

Signed-off-by: Patrick Fink <mail@pfink.de>
2022-07-09 19:53:30 +02:00
openhab-bot
205b5bad84
New translations firmware.properties (Danish) (#3031) 2022-07-08 18:42:09 +02:00
openhab-bot
d92a2c6945
New Crowdin updates (#3028)
* New translations units.properties (Portuguese)

* New translations DefaultSystemChannels.properties (Norwegian)

* New translations tags.properties (Norwegian)

* New translations SystemProfiles.properties (Norwegian)

* New translations audio.properties (Norwegian)

* New translations voice.properties (Norwegian)

* New translations ephemeris.properties (Norwegian)

* New translations inbox.properties (Norwegian)

* New translations restauth.properties (Norwegian)

* New translations addons.properties (Norwegian)

* New translations persistence.properties (Norwegian)

* New translations jsonStorage.properties (Norwegian)

* New translations chart.properties (Norwegian)

* New translations i18n.properties (Norwegian)

* New translations network.properties (Norwegian)

* New translations lsp.properties (Norwegian)

* New translations sitemap.properties (Norwegian)

* New translations hli.properties (Norwegian)

* New translations marketplace.properties (Norwegian)

* New translations magic.properties (Norwegian)

* New translations validation.properties (Norwegian)

* New translations SystemThingStatusInfos.properties (Norwegian)

* New translations units.properties (Portuguese, Brazilian)
2022-07-04 15:31:54 +02:00
Kai Kreuzer
61fd47c853
Apply spotless and resolver (#3018)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 13:41:28 +02:00
openhab-bot
8944bdbbe4 [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 16:37:00 +00:00
openhab-bot
cdeda77322
New Crowdin updates (#3013) 2022-06-24 18:19:02 +02:00