Commit Graph

332 Commits

Author SHA1 Message Date
J-N-K
f67809a5e8
Fix CME in JarFileAddonService (#3351)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-04 15:43:45 +01:00
lolodomo
14bae356c2
Consider language in KarafAddonService when creating Addon (#3341)
* [REST] Consider language when retrieving installed addons

Fix openhab/openhab-webui#1666

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-01-28 14:18:58 +01:00
J-N-K
673827733a
Fixes and enhancements for add-on services (#3293)
* Add an add-on service that provides add-ons in the addons-folder
* fix connection and countries

This is needed to show the add-ons from the addons in the UI.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-21 22:07:48 +01:00
Kai Kreuzer
10eb42af3f
Fix nullable errors (#3319)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-01-15 19:03:59 +01:00
J-N-K
3d54ee54d2
Introduce metadata for all add-ons (#3050)
* Introduce addon.xml

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-15 15:31:42 +01:00
J-N-K
a09ad3d37c
Ensure metadata available at startlevel 20 (#3273)
* Ensure metadata available at start-level 20

This makes the `MetadataRegistry` report when the elements of the `ManagedMetadataProvider` is available via a ready marker (like other registries).

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-10 22:24:26 +01:00
J-N-K
fd5b451e59
Log the version/build on startup (#3270)
* Log the version/build on startup

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-10 22:13:44 +01:00
Cody Cutrer
d8a2c19609
Prevent a provider from removing elements added by another provider (#3301)
* prevent a provider from removing an element from another provider

if multiple providers provide the same element, the added callback
simply ignores the duplicates. but the provider has no idea its element
was ignored, so it may try to remove it in the future, and things will
get all out of whack if the element is removed from the registry even
if another provider thinks it's still there

this is easily reproducible by creating an item in the UI, then
creating the same item via a .items file, and then removing the item
from the .items file. The item will seem like it is gone to most
of openHAB, but will come back after reboot when the managed
provider re-adds.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-01-09 19:29:14 +01:00
Sami Salonen
ef34e5b0b4
QuantityType.as(PercentType.class) fixes with dimensionless units (#3297)
* QuantityType.as(PercentType.class) fixes with dimensionless units

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2023-01-05 18:51:58 +01:00
stefan-hoehn
084f9779a7
Add method to get namespaces to MetadataRegistry and ItemResource (#3298)
* add retrieve namespaces for item

Signed-off-by: Stefan Höhn <stefan.hoehn@nfon.com>
2023-01-03 18:27:17 +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
Jacob Laursen
100aa6e838
Add method to DateTimeType for returning Instant (#3287)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-30 20:40:58 +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
Wouter Born
a3dc57784a
Remove wrong DataAmount units (#3261)
These wrong DataAmount units were added in #3208 for backwards compatibility.
In OH4 we can clean them up because this major version allows for breaking changes.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-23 23:51:28 +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
Дилян Палаузов
d48ac20377
typo: successful (#3236) 2022-12-19 15:45:17 +01:00
J-N-K
5a9fb679ef
Remove redundant ctor in DecimalType (#3240)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 15:44:18 +01:00
J-N-K
08d7d13c9b
Fix default unit for Energy (#3213)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-11 12:06:49 +01:00
J-N-K
94b8c2a540
Fix DataAmount dimension units (#3208)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-11 11:00:50 +01:00
J-N-K
1b8280812b
Fix AVG calculation in GroupFunction (#3202)
Reported on the forum. Due to selection of the `RoundingMode` instead of a `MathContext` the average calculation is returning unexpected results: 19.0 °C / 19.5 °C results in 19.3 °C (instead of 19.25 °C) which might be acceptable, but 19.5 °C / 19.5 °C results in 20 °C (instead of 19.5 °C) which is obviously not what we want or expect. Setting the `MathContext` fixes this problem. I also corrected the same calculation for non-dimensional groups.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-10 16:02:35 +01:00
J-N-K
d10cae0631
Improve UoM handling (#3201)
Also-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-07 15:55:02 +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
lolodomo
27b847f40c
Define format method for HSBType (#3165)
Pattern %s will match <hue>,<saturation>,<brightness>
Pattern %hsb% will match <hue>,<saturation>,<brightness>
Pattern %rgb% will match <red>,<green>,<blue>

Related to discussion in openhab/openhab-webui#427

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-11-26 16:00:54 +01:00
J-N-K
d00d14d9fc
Add default units for all dimensions (#3143)
* Add default units for all dimensions

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-11-19 23:10:38 +01:00
J-N-K
4f35d474fc
Strip unit if NumberItem has no dimension (#3153)
* Strip unit if NumberItem has no dimension

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-11-19 23:05:55 +01:00
J-N-K
2bceba6954
Fix missing stateDescriptionProvider in Group items (#3144)
* Fix missing stateDescriptionProvider in Group items

The stateDescriptionProvider was not properly passed to the base item. Because of that units set in the state description were not properly used when setting the group state after calculating aggregation functions.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-11-06 20:50:05 +01:00
Cody Cutrer
a7d912d1e9
Fix invertible unit conversions when sent via a binding or uses in ItemUIRegistry (#3134)
* fix invertible unit conversions when sent via a binding
* do invertible unit conversion in ItemUIRegistry

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-27 20:26:27 +02:00
Cody Cutrer
ccdf2c5573
Allow sending IncreaseDecreaseType directly to DimmerItem (#3116)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-17 08:05:02 +02: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
Cody Cutrer
7f38d419c6
Allow sending QuantityType to NumberItem (#3115)
NumberItems always accept QuantityType

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-15 09:31:30 +02:00
openhab-bot
07be655b0e
New Crowdin updates (#3109)
* New translations automation.properties (Italian)
* New translations restauth.properties (German)
* New translations restauth.properties (Italian)
* New translations addons.properties (Italian)
* New translations restauth.properties (Danish)
* New translations restauth.properties (Finnish)
* New translations restauth.properties (Hungarian)
* New translations restauth.properties (Polish)
2022-10-15 09:27:02 +02:00
Cody Cutrer
065e33f5ab
Fix StartLevelService "hanging" if config is changed. (#3092)
Unregistered trackers aren't clear, so then we never register new trackers,
and thus never get notified of any changes.

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

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-09-25 09:44:57 +02:00
J-N-K
e3b90e32ce
Normalize Metadata configuration from managed provider (#2958)
* Normalize Metadata configuration from managed provider

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-09-20 21:20:27 +02:00
Jacob Laursen
9bb88a1b7b
[oauth] Migrate usage of LocalDateTime to Instant (#3066)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-08-22 08:13:52 +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
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
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
J-N-K
f79f8c348e
Improve UID error message (#3022)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-06-29 21:54:31 +02:00
Kai Kreuzer
2cf875fdd8
Fix ConcurrentModificationException in WatchQueueReader (#3016)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-26 17:14:51 +02:00
openhab-bot
cdeda77322
New Crowdin updates (#3013) 2022-06-24 18:19:02 +02:00
J-N-K
c2ec97cfaf
Add ability to name timers / scheduled jobs (#2911)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-06-18 15:04:35 +02:00
J-N-K
344a9ae018
Fix log levels and duplicate implementation warning in tests (#2982)
* Fix log levels and duplicate implementation warning in tests

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-26 23:33:08 +02:00
J-N-K
792b7511bf
Fix item name checking in ItemUtil (#2941)
* Fix item name checking in ItemUtil

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-21 09:29:42 +02:00
Sami Salonen
09b9b33cc0
[expire] Allow ignoring commands (#2954)
* [expiry] [expire] bool configuration parameters parsing as util method
* [expiry] [expire] extend ExpiryManager to allow ignoring commands

Similar to ignoreStateUpdates parameter, this introduces new optional
parameter ignoreCommands.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2022-05-11 18:30:53 +02:00
openhab-bot
bb634b9189
New Crowdin updates (#2930)
* New translations DefaultSystemChannels.properties (Italian)

* New translations DefaultSystemChannels.properties (Dutch)

* New translations DefaultSystemChannels.properties (Polish)

* New translations DefaultSystemChannels.properties (Finnish)

* New translations DefaultSystemChannels.properties (Hebrew)

* New translations DefaultSystemChannels.properties (German)

* New translations DefaultSystemChannels.properties (Hungarian)

* New translations addons.properties (Hungarian)

* New translations marketplace.properties (Hungarian)
2022-04-26 17:25:51 +02:00
J-N-K
b331066ea9
Allow changing watched directory of a WatchService (#2894)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-24 19:01:33 +02:00
J-N-K
ca94fd57b0
Add new module DateTimeTrigger for triggering on a DateTime state (#2923)
* Add DateTimeTrigger

This adds a new module that triggers at the time given by the state of an item.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-24 11:29:55 +02:00