Commit Graph

2459 Commits

Author SHA1 Message Date
Holger Friedrich
3e16027b72
Bump maven-compiler-plugin to 3.13.0 (#4168)
Avoid ZipException with ejc >3.30.0.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-04 06:12:53 +02:00
lolodomo
dcfadaede6
Move to JUPnP v3.0.1 (#4165)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-02 18:21:57 +02:00
Holger Friedrich
9f5a60d6fa
Allow for compiling with Java 21 (#4161)
* Support Java 17 and 21, default compilation to Java 17 class files,
  use maven.compiler.release instead of source and target
* Add profile "j21" to compile to Java 21 class files
* Upgrade SAT to 0.16.0, adapt code which breaks build with new SAT
  checks
* Use model-specific-profile to pin xtend to Java 17

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-01 13:46:57 +02:00
Florian Hotze
be9cbf2649
[automation] Avoid memory leak on script loading failure (#4162)
Core part of the fix for https://github.com/openhab/openhab-addons/issues/16462.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 22:32:20 +01:00
Florian Hotze
e871dcfa47
[rest] TokenResource: Set SameSite attribute for session id cookie (#4160)
* [rest] TokenResource: Properly set SameSite attribute for session id cookie

Fixes #4159.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 22:31:29 +01:00
Florian Hotze
7f47d825a0
[rest] Add caching for add-on resource (#4107)
* [rest] Introduce a CACHE_CONTROL constant
* [rest] Add caching for add-ons endpoint

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 19:37:36 +01:00
Arne Seime
bf8b131701
Add REST call to get orphan links (#4115)
* Add REST call to get orphan links

Signed-off-by: Arne Seime <arne.seime@gmail.com>
Co-authored-by: Jan N. Klug <github@klug.nrw>
2024-03-23 23:02:14 +01:00
Mark Herwege
2daf94d7fc
REST response default persistence strategy when no persistence configuration (#4137)
* default persistence strategy in REST response

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-03-23 18:11:34 +01:00
Jacob Laursen
b3047c675a
[oauth] Fix exception wrapping (#4150)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-03-23 16:25:44 +01:00
Florian Hotze
c9ee992047
[automation] Allow empty script for script action & script condition (#4148)
* Script action: Allow script to be empty
* Short evaluate to reasonable defaults when script is empty

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-17 20:31:51 +01:00
Holger Friedrich
3850599163
Upgrade to Karaf 4.4.5 and Xtext 2.34 (#4133)
* Upgrade to Karaf 4.4.5 and Xtext 2.34

Upgrade Karaf from 4.4.4 to 4.4.5:
* Sync runtime dependencies with Karaf 4.4.5, most notably:
  * Jetty 9.4.53.v20231009
  * JNA 5.14.0
  * Pax Logging 2.2.6
  * Pax Web 8.0.24
  * ASM 9.6
* Resolve itest runbundles

Upgrade Xtext from 2.32 to 2.34
* Sync depencencies, most notably:
  * Guava 33.0.0
  * classgraph 4.8.165 changing provider to io.github.classgraph
* Migrate old Xtext generator xtext.generator to xtext.xtext.generator
  as xtext.generator has been removed from Xtext, affecting
  org.openhab.core.model.lazygen

* resolve runbundles
* Remove org.openhab.core.model.lazygen
  No longer in use since 2017, see eclipse-archived/smarthome#4122.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-17 09:41:15 +01:00
Holger Friedrich
9c1c88519b
Bump ecj to 3.36.0 (#4154)
Allow for compiling with Java 21

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-17 09:25:21 +01:00
Holger Friedrich
bf11a92f40
Bump maven-plugin-plugin to 3.11.0 (#4153)
Allow for compiling with Java 21

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-17 09:24:59 +01:00
Holger Friedrich
cf7bff88ee
Bump maven-shade-plugin to 3.5.2 (#4152)
Allow for compiling with Java 21

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-17 09:24:36 +01:00
Arne Seime
137cc5eb49
[rest] Allow skipping ignored things in inbox (#4108)
* Allow skipping ignored things in inbox

Signed-off-by: Arne Seime <arne.seime@gmail.com>
2024-03-15 15:51:36 +01:00
joerg1985
12a6742189
[rest] special handling for StreamingOutput (#4145)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-03-12 18:58:31 +01:00
joerg1985
3d83c70184
[rest] refactored the Stream2JSONInputStream to simplify the logic (#4099)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-03-10 17:24:01 +01:00
Florian Hotze
977fa0329a
[rest] Enable filters for cacheable items list (#4119)
This allows the usage of filters when using `staticDataOnly=true`.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-10 11:41:52 +01:00
Mark Herwege
eeb69197c6
unitSymbol for GroupItem (#4106)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-03-10 10:07:52 +01:00
Florian Hotze
38b73bf989
[auth] Set doctype for auth page (#4129)
Fixes https://github.com/openhab/openhab-webui/issues/2443.

See https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-10 09:59:38 +01:00
joerg1985
094e4a6e04
[rest] stream json without starting a new thread (#4136)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-03-10 09:46:39 +01:00
openhab-bot
942929973d
New Crowdin updates (#4138)
* New translations addons.properties (French)

* New translations addons.properties (Finnish)

* New translations addons.properties (Hebrew)

* New translations units.properties (Finnish)

* New translations scriptprofile.properties (Hebrew)

* New translations units.properties (Hebrew)

* New translations addons.properties (Polish)

* New translations voice.properties (Polish)

* New translations units.properties (Polish)

* New translations addons.properties (Russian)

* New translations marketplace.properties (Russian)

* New translations units.properties (Russian)

* New translations addons.properties (Ukrainian)

* New translations validation.properties (Danish)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)

* New translations addons.properties (Danish)

* New translations scriptprofile.properties (Italian)
2024-03-10 09:41:35 +01:00
jimtng
fc2d5375b7
Upgrade Tool: Fix NPE (#4128) 2024-03-04 07:19:51 +01:00
Florian Hotze
f4d6089eb0
Call, Contact, Image items: Don't create command descr from state descr (#4097)
* Contact item: Fix command descriptions provided even though commands are not accepted

If a state description is set on a contact item, currently a command description is automatically created as well.
This is wrong as contact items do not accept commands (except refresh) and caused the UI to display a control for the default (list) widget for these contacts.

* Also fix Call and Image items & Allow explicitly setting command description

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-03 13:20:10 +01:00
Holger Friedrich
bca1010c0e
Relax test to accept files with CRLF line endings (#4126)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-03 13:05:16 +01:00
Florian Hotze
81805ae6d9
[rest] Set editable for members of an item (#4118)
* [rest] Set editable for members of an item

Required by the UI.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-03 10:14:32 +01:00
Florian Hotze
d26aa080ab
Script profile: Fix deprecation warning (#4110)
Refs #4058.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-02 10:46:28 +01:00
Florian Hotze
45f8bff876
Upgrade tool: Add upgrade task for script profile changes (#4117)
* Upgrade tool: Add upgrade task for script profile changes

Refs #4058.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-02 10:41:34 +01:00
dependabot[bot]
3f27104e76
Bump org.bitbucket.b_c:jose4j from 0.9.3 to 0.9.5 (#4121)
Signed-off-by: dependabot[bot] <support@github.com>
2024-03-02 10:32:00 +01:00
GiviMAD
a94dd51cd3
[net] Expose Jetty EndPoint in http requests (#4092)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-03-02 09:08:48 +01:00
jimtng
97d64a156b
Add numericState and unit to StateDTO (#4123)
* Add numericState to StateDTO

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-01 18:43:02 +01:00
Gwendal Roulleau
06ee46dff6
Audio parsing : Fix byte / bit confusion (#4116)
Fix two errors for calculating bitrate and duration of sound.
In AudioSinkUtilsImpl : confusion between byte / bite
In AudioWaveUtils : confusion between byte / bite AND with the defintion of framesize (framesize already includes channels number)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2024-03-01 18:06:04 +01:00
David Pace
d56f57bf05
Replace deprecated hamcrest-library with hamcrest in test BOM (#4113)
Signed-off-by: David Pace <dev@davidpace.de>
2024-03-01 17:59:29 +01:00
jimtng
b64e9723a9
Include StartLevelEvent in start level triggers (#4093)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 22:23:27 +01:00
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