Commit Graph

2675 Commits

Author SHA1 Message Date
Wouter Born
e628f75d7b
Upgrade jUPnP to 3.0.0 (#4098)
* Upgrades jUPnP from 2.7.1 to 3.0.0.
* Uses a custom OSGiUpnpServiceConfiguration for JDK-8301341 workaround

For release notes, see:

https://github.com/jupnp/jupnp/releases/tag/3.0.0

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-18 21:27:44 +01:00
Wouter Born
eb5ef3f9ed
Upgrade GHA dependencies (#4096)
This fixes the following deprecation warning:

> Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-17 16:21:03 +01:00
Holger Friedrich
40e6202c5f
Minor extension to generic ip discovery (#3943)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-02-14 18:53:41 +01:00
J-N-K
a27d241290
Fix itests not running (#4091)
Why do unresolved tests result in "No error" instead of "Failed"?

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-13 22:00:46 +01:00
J-N-K
d3fa049532
[persistence] Fix forecast for externally changed data (#4089)
Data added from the REST API is immediately stored in the selected persistence service, bypassing the `PersistenceManager`. Because of that the future values are not correctly "restored".

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-13 21:59:22 +01:00
lolodomo
a906d09b40
[sitemap] Add releaseOnly parameter to Slider sitemap element (#4084)
Related to #3430

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-02-12 20:12:19 +01:00
jimtng
0efaf23d4e
Fix the recursive group membership check (#4088)
Allow a group to be a member of its direct parent and also its parent's ancestors without raising an error.

Looping membership is still detected and prevented as before, thus Stack Overflow is still avoided.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-12 17:21:55 +01:00
J-N-K
d806771364
Fix CME in ReadyService (#4086)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-11 22:44:18 +01:00
Florian Hotze
6be00bd585
Script profile: Separate toHandlerScript for commands and states (#4058)
* Script profile: Separate toHandlerScript for commands and states

This allows much more fine-grained control for the script profile.
E.g. it is now possible to mimic the behaviour of the `system:follow` profile, but apply a script transformation to the forwarded state.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-06 21:29:19 +01:00
Wouter Born
f4e83693fb
Simplify Map operations using computeIfAbsent (#4020)
If the specified key is not already associated with a value (or is mapped to null), the given mapping function computes the value.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-06 20:34:05 +01:00
Jacob Laursen
823f993f56
Add dimension for emission intensity (#4069)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-02-06 20:20:55 +01:00
jimtng
c929e7dfe2
Fix reloading channel config changes in .items file (#4075)
* Apply channel config changes in .items file

Changes in channel config weren't applied because ItemChannelLink.equals() include the link configurations in the comparison. This caused the new link not being found in the set lookup, which leads to erroneously calling notifyListenersAboutAddedElement, when it should've called notifyListenersAboutUpdatedElement instead.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-04 11:23:10 +01:00
Wouter Born
85056d9d7b
Some more code cleanup (#4021)
This cleanup includes:

* Use enhanced for loops
* Use text blocks
* Use Objects.equals
* Fix some typos
* Remove redundant variable initialization
* Remove redundant null checks with instanceof
* Remove redundant thrown Exceptions
* Remove redundant empty String concatenation

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-04 11:17:55 +01:00
M Valla
2cca87a026
[transport.serial] add PORT_DISCONNECTED event (#4056)
Signed-off-by: MV <mvcode00@gmail.com>
2024-02-04 10:29:48 +01:00
J-N-K
fe4cbe546e
Improve YAML model repository (#4024)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-04 10:29:09 +01:00
dependabot[bot]
d994c136db
Bump com.jayway.jsonpath:json-path from 2.8.0 to 2.9.0 in /bom/test (#4059)
Bumps [com.jayway.jsonpath:json-path](https://github.com/jayway/JsonPath) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/jayway/JsonPath/releases)
- [Changelog](https://github.com/json-path/JsonPath/blob/master/changelog.md)
- [Commits](https://github.com/jayway/JsonPath/compare/json-path-2.8.0...json-path-2.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-04 10:18:12 +01:00
Andrew Fiddian-Green
9b5e19e3af
AddonFinderProcess fixes (#4061)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2024-01-31 20:35:23 +01:00
Jacob Laursen
fb7e030ea5
Add command completion (#4063)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-27 20:59:34 +01:00
Jacob Laursen
5b9fee7d36
[discovery] Fix warnings (#4065)
* Remove unused imports and reference explicit namespaces in Javadoc links
* Fix potential null pointer access
* Remove redundant null checks and dead code
* Suppress deprecation warnings in tests

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-27 18:14:43 +01:00
lolodomo
a9571228d2
Remove state description when loading an item with a removed pattern (#4068)
* Remove state description when loading an item with a removed pattern

Fix openhab/openhab-webui#2251

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Extended integration test testSquareBracketsInFormat

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

---------

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-27 18:00:56 +01:00
joerg1985
5f8da67983
Use the ChannelUID to retrieve the Channel from a Thing (#4067)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-01-27 17:59:22 +01:00
joerg1985
7ea603c24c
Use precompiled regular expressions to validate the segments of a UID (#4064)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-01-24 21:25:14 +01:00
J-N-K
718839052a
Add console commands to manage add-ons (#4057)
* Add console commands to manage add-ons

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-21 19:13:01 +01:00
Matthew Skinner
4905805ea8
[marketplace] Update CommunityUIWidgetAddonHandler.java to give a more helpful error (#4052)
Installing from marketplace gives an Error that is not very helpful.

Couldn’t find the widget in the add-on entry

The cause was missing ```yaml code fence when a normal code fence was used. This used to work in the past so a number of widgets are done this way and will not install. Suggest a more useful message to help guide widget devs.

Signed-off-by: Matthew Skinner <matt@pcmus.com>
2024-01-21 08:41:08 +01:00
lolodomo
5c9f192764
Useful logs added in SitemapResource for REST API calls (#4054)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-20 22:25:18 +01:00
Wouter Born
6cf048434b
Replace Markdown backticks with JavaDoc code tags (#4023)
* Replace Markdown backticks with JavaDoc code tags

The proper way to format code with JavaDoc is using code tags and not Markdown backticks.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-20 09:56:41 +01:00
Wouter Born
c2a0739f1f
Fix several compiler warnings (#4041)
* Fix several compiler warnings

* Add missing null annotations
* Add missing null checks
* Remove use of deprecated SecurityManager
* Remove redundant null checks
* Remove unused variables
* Fix raw use of parameterized class

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-20 09:55:50 +01:00
J-N-K
0b1e1b66ab
Improve RemoteAddonService and fix test (#4049)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-17 18:31:29 +01:00
J-N-K
d3d0fe3995
Fix config parsing and version handling in RemoteAddonServices (#4043)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-15 22:42:49 +01:00
J-N-K
c82a9e69dc
Fix logging in ChannelCommandDescriptionProvider (#4040)
The class of the the broken provider should be logged, not the class of the command description.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-15 22:28:36 +01:00
J-N-K
5cea59bfb1
Improve marketplace add-on handling (#4019)
It has been reported several times that add-ons were not properly installed / missing after an upgrade or the installation of incompatible add-ons resulted in broken installations.

After an upgrade (or clean cache) the `AddonHandler`s try to re-install the add-ons from the download cache (`<userdata>/marketplace`). This happens without checking compatibility. This was needed before OH4, because the cache was the only source providing information about installed add-ons. This is now different, since we store the add-on information in a JSON database, so the UIDs of the add-ons are known.

This PR changes improves the add-on services. It now

1. Reads the information about the installed add-ons from the database and sets the installation status based on information from the handlers.
2. Removes all add-ons that are not installed from the JSON database and remembers their UIDs.
3. Refreshes the remote add-on list (including check for compatibility if not disabled).
4. Tries installation of the add-ons remembered in step 2. Since incompatible add-ons are missing in the add-on list, their installation fails and a warning is logged.

This PR is has two corresponding PR in openhab-distro and openhab-linuxpkg to ensure that the upgrade script and `openhab-cli` also clear the marketplace cache.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-14 21:46:53 +01:00
J-N-K
a6401fa4ac
Fix NPE in UpnpIOServiceImpl (#4038)
Fix #4037

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-14 19:14:00 +01:00
Wouter Born
6495f4e256
Upgrade Jollyday to 0.23.2 (#4033)
Upgrades Jollyday 0.5.10 (de.jollyday) to 0.23.2 of a more actively maintained fork (de.focus-shift).

* This adds many missing holidays.
* Also removes the workaround for the Danish Great Prayer Day introduced by #3573.

For release notes, see:

https://github.com/focus-shift/jollyday/releases

Fixes #3544

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-14 15:19:15 +01:00
Wouter Born
b77f954848
Improve ThreadPoolManagerTest stability (#4035)
When the CPU load of a system is high these timeouts may not be realistic.

Fixes #3254

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-12 21:42:02 +01:00
Wouter Born
18d9b531ff
Fix wrong class name logged in LocaleServiceImpl (#4034)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-12 21:37:48 +01:00
Jacob Laursen
6867f1e956
[discovery] Fix Instant serialization/deserialization regression (#4029)
* Fix Instant serialization/deserialization regression

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Consolidate serialization and deserialization in same type adapter

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Simplify deserializer

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

---------

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-12 08:39:11 +01:00
Andrew Fiddian-Green
9cb4b9ee1f
UsbSerialDiscovery service based on Windows registry (#3934)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2024-01-11 20:00:04 +01:00
Jacob Laursen
6b2182dec6
Refactor java.util.Date usages to java.time.Instant (#4026)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-07 20:51:46 +01:00
GiviMAD
3c61c1d649
[Audio] Add piped audio stream and fix raw PCM streams format (#3960)
* [Audio] Add piped audio stream and fix pcm format usage

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-01-07 14:18:50 +01:00
J-N-K
36cafd765f
Fix CurrencyUnit (#4016)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-05 18:20:43 +01:00
Wouter Born
8e7d5d880c
Fix JavaDoc build (#4018)
Caused by #3957

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-05 18:00:03 +01:00
Kai Kreuzer
c4802e3fb0
Upgrade to JmDNS 3.5.9 (#4015)
For the changelog, see:

https://github.com/jmdns/jmdns/milestone/11?closed=1

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-01-05 00:07:41 +01:00
Holger Friedrich
7bac24e58f
IpAddonFinder: Skip installed addons (#4013)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-01-04 22:27:18 +01:00
Wouter Born
c757819a15
Fix JavaDoc issues (#4004)
Fixes various issues including wrong parameter names, references, links and dangling JavaDocs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-04 00:03:48 +01:00
Wouter Born
6a2777a878
Fix openhab-core-auth-oauth2client feature installation (#4012)
Karaf does not automatically install the feature after `dependency="true"` was added in #3814.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 23:40:17 +01:00
Wouter Born
2babea4c9a
Update license headers to 2024 (#4011)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 21:20:34 +01:00
Wouter Born
6fc7700ea6
Use protected modifier with constructor of abstract classes (#4010)
Abstract classes should not have public constructors.
Constructors of abstract classes can only be called in constructors of their subclasses.
So there is no point in making them public.
The protected modifier should be enough.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 16:17:14 +01:00
Wouter Born
81a91ee9ae
Simplify adding elements to Collections (#4006)
* Simplify adding elements to Collections

This optimizes and simplifies the code that adds elements to Collections.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 14:51:33 +01:00
Wouter Born
afd1d4726c
Iterate using Map entries (#4003)
* Iterate using Map entries

Iteration using Map entries is preferred because it is more efficient and helps preventing NPEs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 14:50:50 +01:00
Wouter Born
106c8b2270
Remove unnecessary semicolons (#4009)
This helps with stopping the proliferation of unnecessary semicolons.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 13:47:23 +01:00