Commit Graph

395 Commits

Author SHA1 Message Date
Holger Friedrich
769aa562a1
Code cleanup: Use Java 17 features (#3522)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-16 21:43:59 +02:00
Jacob Laursen
eb6b6b9677
[oauth] Add support for custom deserialization of AccessTokenResponse (#3537)
* Add possibility to inject custom GsonBuilder

Reverts #1891

Fixes #1888

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-04-14 21:19:08 +02:00
Holger Friedrich
b0b8bb547b
Reduce rounding errors of RGB/HSB conversion and enhance ColorUtil (#3479)
* HSBType: Reduce rounding errors of RGB/HSB conversion
* Move RGB to HSV conversion to ColorUtil
* Restructuring HSBType and ColorUtil

- Move RBG/HSB conversion from HSBType to ColorUtil
- Rename helper functions "hsv" to "hsb" to be consistent with HSBType
- Add parameterized tests

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-07 18:43:01 +02:00
J-N-K
3047ed42a5
Prevent unnecessary MODIFY events in WatchServiceImpl (#3524)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-07 14:47:08 +02:00
Florian Hotze
633002c647
Fix wrong event subscription in CommunicationManager (#3529)
* Fix wrong event subscription in CommunicationManager

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-07 14:26:19 +02:00
J-N-K
ee392e861f
Fix WatchService tests (#3518)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-04 07:33:16 +02:00
Wouter Born
4851bfbcae
Fix recently introduced SAT issues (#3516)
* Fix recently introduced SAT issues

Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-01 17:18:22 +02:00
Holger Friedrich
74052e7bcd
Code cleanup: Use Java17 features (#3508)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-01 09:51:12 +02:00
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
GiviMAD
4d0dba1abc
Fix OOBE in item metadata descriptions providers (#3488)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-03-30 20:33:21 +02:00
J-N-K
6294c48be4
Use try-with-resources on Files.walk/Files.list (#3504)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-29 09:54:41 +02:00
GiviMAD
b6c8aeaf10
Allow using quotes in metadata state/command description value/label (#3363)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-03-26 19:30:21 +02: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
J-N-K
a32f1e0253
Add ColorUtil for better support of xyY conversion (#3434)
* Add ColorUtil for better support of xyY conversion

This has been refactored to align with the usually used conversion by a lot of ZigBee products like Hue or Deconz.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-16 22:25:03 +01:00
J-N-K
c05fe8ad4d
Fix ready marker ordering on late subscriptions (#3454)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-13 21:15:55 +01:00
jimtng
f9751448c1
Fix ISE during WatchService disposal (#3432)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-03-07 15:43:45 +01:00
J-N-K
278e99b461
Fix IllegalStateException in WatchServiceImpl (#3389)
Added a check to prevent attempts to unregister already unregistered service

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-05 09:44:58 +01:00
J-N-K
07e8ff56c7
Prevent duplicate events in WatchService (#3404)
On Samba shares a single MODIFY event may result in different sequences of CREATE/DELETE/MODIFY events. Unfortunately this is not properly handled by the underlying library and we have to re-introduce our ugly workaround. The solution itself is a bit improved over the old one as it not only keeps the last event but determines the correct event by examining the sequence of received events.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-05 09:44:23 +01:00
Wouter Born
ec3af50f11
Upgrade to Karaf 4.4.3 (#3252)
* Sync runtime dependencies with Karaf 4.4.3, most notably:
  * Jetty 9.4.50.v20221201
  * Pax Logging 2.2.0
  * Pax Web 8.0.15
* Use OSGi R8 as compile dependency
* Rework Servlets to use Http Whiteboard annotations in favor of proprietary `org.openhab.core.io.http.servlet` classes
* Resolve itest runbundles

Also-by: Jan N. Klug <github@klug.nrw>

Signed-off-by: Wouter Born <github@maindrain.net>
2023-03-01 13:09:07 +01:00
Gwendal Roulleau
5544945d48
[tts] Cache mechanism (#3057)
* [tts] Cache mechanism

Implements a cache mechanism for all TTS services.
Eviction policy is LRU mode.
This cache can serve several streams concurrently, for the same utterance, with only one call to the TTS. It doesn't wait for the stream to end and can serve data rapidly.
Cache size is a voice bundle parameter (10 mb default)

Closes #3039

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-02-28 08:45:44 +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
J-N-K
c17481c2ac
Align AbstractScriptDependencyTracker with AbstractScriptFileWatcher (#3372)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-18 09:17:59 +01:00
Cody Cutrer
474d24c62d
Refactor GenericEventTrigger and GenericEventCondition (#3299)
* rework GenericEventTrigger and GenericEventCondition

fixes #3234

to make their interfaces and semantics match, as well as having a
well defined (and useful) way of defining topic filters

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-02-14 09:07:23 +01:00
J-N-K
fcb8dee9a6
Improve handling of erroneous localized messages (#3366)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-12 17:04:33 +01:00
J-N-K
7f113c51bc
Refactor WatchService (#3004)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-12 14:12:22 +01:00
Kai Kreuzer
304617c5b7
Remove author from addon xsd (#3362)
* Remove author from addon xsd

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-02-11 19:50:05 +01:00
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
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
Дилян Палаузов
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
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
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