Commit Graph

513 Commits

Author SHA1 Message Date
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
Wouter Born
0894d25448
Upgrade JUnit to 5.9.2 and Mockito to 4.11.0 (#3450)
For release notes, see:

* https://junit.org/junit5/docs/current/release-notes/#release-notes-5.9.2
* https://github.com/mockito/mockito/releases/

Signed-off-by: Wouter Born <github@maindrain.net>
2023-03-12 20:47:54 +01:00
Wouter Born
0c792ec89a
Upgrade XStream to 1.4.20 (#3446)
This addresses CVE-2022-40151 and CVE-2022-41966, see:

https://x-stream.github.io/changes.html#1.4.20

This version also fixes an issue with closing streams so the workaround in GenerateDefaultTranslationsMojoTest is no longer needed.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-03-12 12:22:33 +01:00
Andrew Fiddian-Green
a5d65ce2ad
Add support for Jetty HTTP/2 clients (#3433)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-03-12 10:22:50 +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
Gwendal Roulleau
ac88faa5dc
[serial] Ability to use /dev/serial/ symlinks for usb serial device (#3290)
The rxtx serial port provider is now able to scan symlink in /dev/serial/by-id and use them as valid identifier.
Benefit : users won't have to fix the path of their USB serial device  with udev anymore, they can now use the explicit and stable symlink directly.

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
[serial] Ability to use /dev/serial/ links

Revert previous commit (rewriting to use discovery serial service to provide the symlinks to all serial provider, and not only rxtx).
Workaround for the rxtx provider which can resolve symlink before using the native code (limit path to 80 char).

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-03-04 14:43:46 +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
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
Kai Kreuzer
fafadd4b83
Add nullable annotation to avoid error marker in Eclipse (#3376)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-02-16 23:40:53 +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
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
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
GiviMAD
c30e4b8eea
[voice] Support managed dialogs (#3264)
* [voice] introduce methods for dialog persistency

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-02-08 21:12:22 +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
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
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
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
Wouter Born
07d09c5a7a
Update Jackson to 2.14.1 (#3284)
Updates Jackson from 2.12.7 to 2.14.1

For release notes, see:

https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.13
https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.14

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-30 22:46:51 +01:00
Wouter Born
80770161ac
Fix several compiler warnings (#3260)
Fixes a deprecation, unused imports and some raw type warning.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-23 16:41:46 +01:00
Wouter Born
4a49cb419c
Add missing new line to org.openhab.core.storage.json.tests/itest.bndrun (#3259)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-23 12:28:36 +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
41ba3ff854
Raise minimum JDK version to 17 (#2994)
* Raise source level to Java 17 (except for model classes)
* Remove Nashorn script engine
* Upgrade spotless and add jvm options  
  See https://github.com/diffplug/spotless/issues/834
* Add suppression for findBugs false positive error
* Upgrade xtext to 2.29.0
* Adjust JNA
* Resolve itests

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 19:52:43 +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
9c3e2f3f06
Upgrade bnd to 6.4.0 (#3205)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-09 20:07:51 +01:00
J-N-K
e90811cfd7
DSL support for sharedCache/privateCache (#3187)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-05 22:08:42 +01:00
GiviMAD
d7f8ec2375
[voice] New voice manager dialog methods (#3142)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2022-11-30 22:46:38 +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
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
J-N-K
d9bf8f7a15
[rest] add semantics query endpoint to item resource (#2985)
* [rest] add semantics query to item resource

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-10-30 15:50:36 +01: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
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
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
J-N-K
836ae89489
Wait for thing-type available in PersistentInbox (#2981)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-07-17 21:15:48 +02:00
Kai Kreuzer
2e7fd9d72a
Upgrade to JmDNS 3.5.8 (#3029)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-07-04 21:52:34 +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
Wouter Born
5545004e09
Fix null analysis error in ThingMigrationOSGiTest (#3008)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-06-20 22:10:24 +02:00
Wouter Born
916b6e9db1
Remove redundant @NonNullByDefault In Integration test (#3009)
Nullness default is redundant with a default specified for the enclosing type AutomationIntegrationJsonTest.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-06-20 22:09:30 +02:00
J-N-K
d74277f798
Use ThingStorageEntity instead of ThingImpl/BridgeImpl for storage (#2914)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-06-18 14:31:45 +02:00
J-N-K
8f3ad5ce12
Bump bnd to 6.3.0 (#2991)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-06-02 08:36:54 +02:00
GiviMAD
f5da311608
[voice] Fix try all interpreters (#2980)
* fix try all interpreters
* add test

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2022-05-26 07:47:28 +02:00
J-N-K
7027e1e139
[test] Allow intercepting logs and make assertions for log messages (#2939)
* [test] Allow intercepting logs and make assertions for log messages

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-25 21:13:40 +02:00
lolodomo
e5ec888330
[voice] Add voice parameter to startDialog and listenAndAnswer (#2971)
* [voice] Add voice parameter to startDialog and listenAndAnswer

Fix #2819

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-05-21 10:50:00 +02:00
J-N-K
c96ce5b5a8
Fix namespace "channel" is added to item metadata (#2957)
* Fix namespace "channel" is added to item metadata

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-21 09:27:29 +02:00
GiviMAD
5753627c02
[voice] Allow list of HLIs in dialog function (#2906)
* [Voice] Allow hli list

Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-05-11 17:42:06 +02:00
J-N-K
de1f850e10
Fix EphemerisManager crashing on invalid configuration (#2949)
It has been reported in the past (and in the forum) that the EphemerisManagerImpl can't handle illegal configurations. Due to dependencies in other bundles this results in the whole automation component to be unavailable.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-05 21:25:30 +02:00
Wouter Born
4ab0f83e83
Upgrade to Karaf 4.3.7 (#2934)
* Syncs dependencies with Karaf 4.3.7
* Resolves itest runbundles for these new dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-28 22:00:16 +02:00
J-N-K
a192a1dfc6
Add a generic script transformation (#2883)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-24 19:00:03 +02:00
Gaël L'hopital
af6a6c6ac4
Adding missing system channels descriptions. (#2912)
* Adding missing system channels descriptions.
Removing some redundant null checks of the same package.

Signed-off-by: clinique <gael@lhopital.org>
2022-04-22 23:02:24 +02:00
Wouter Born
05fdc81b27
Improve test stability and OS compatibility (#2878)
This fixes the build being broken when building on Windows.
It also contains many fixes for timing issues which seem to impact macOS and Windows more than Linux.

* Fix .gitattributes and add *.xml_gen to fix line ending issues on Windows
* Derive fork count from CPU details in org.openhab.core tests for more stable tests on machines with fewer cores
* Adjust SafeCallerImplTest timings
* Increase ExecUtilTest timeout
* Increase SchedulerImplTest timeouts
* Increase AudioConsoleTest serveStream timeout
* Increase AudioServletTest serveStream timeout
* Increase SchedulerImplTest test timeouts
* Increase ExpireManagerTest timeout used for checking published events
* Increase PeriodicSchedulerImplTest max allowed delta
* Increase SchedulerImplTest timeouts
* Fix BundleInfoReader file stream not closed causing temp dir deletion issues on Windows
* Fix GenerateDefaultTranslationsMojoTest Windows line endings issues
* Fix GenerateDefaultTranslationsMojoTest Windows temp dir deletion problem
* Fix GenericItemProviderTest tearDown sometimes fails because of queued events
* Fix ChannelLinkNotifierOSGiTest wait for channel link events
* Fix ChannelCommandDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix ChannelStateDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix GenericItemChannelLinkProviderTest not waiting for async updated state to become true
* Fix GenericThingProviderTest failing due to events of previous test
* Fix InboxOSGiTest sometimes fails because of queued events
* Fix ScriptEngineOSGiTest failing because items are not yet added to registry
* Fix ThingManagerOSGiTest failing due to async handleRemoval call

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-14 23:00:33 +02:00
J-N-K
afd8768340
Extend ProfileContext to allow data type changing profiles (#2852)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-14 22:52:52 +02:00
J-N-K
785d3e5ae5
Fix hanging build (#2910)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-11 18:52:04 +02:00
J-N-K
2a3e2e5567
Reduce Mockito warnings (#2893)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-03 22:36:55 +02:00
Wouter Born
f20799b69b
Improve HostFragmentSupportTest (#2859)
* Remove duplications
* Better null handling
* Use constants
* Use default waitForAssert timeout (10s)

This may help to get the test more stable (#1089).

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-27 10:46:36 +02:00
Gaël L'hopital
847aa349d8
Adding Indoor Temperature as system channel type (#2866)
Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2022-03-26 12:29:03 +01:00
J-N-K
c2ba4dcd16
Fix build in localized environments (#2855)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-20 10:28:28 +01:00
J-N-K
45b5c6772a
Improve ThingManagerOSGiTest (#2858)
This change ensures that the storage of bridge and thing are done before the initialization is reported.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-19 21:09:02 +01:00
J-N-K
2686102f20
[thing] Show config validation messages in thing status (#2829)
* Show config validation messages in thing status

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-17 11:49:08 +01:00
J-N-K
437b31dbe9
Fix things in REMOVING state initialize instead of getting removed (#2828)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-14 15:49:26 +01:00
J-N-K
e64c06c22b
Upgrade build tools and allow building on macOS 12 / M1 (#2836)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-12 21:05:37 +01:00
Wouter Born
e6ddeccd78
Add more null annotations to XML processing classes (#2775)
This adds null annotations to many XML processing classes and a few others.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-10 19:57:31 +01:00
Wouter Born
7422a13e22
Remove temporary OSGi framework inclusion (#2820)
The itests are run using an R7 framework so the inclusion no longer seems required.
This also allows for easily customizing Import-Package headers in itest bundles.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-09 21:49:58 +01:00
Wouter Born
44f9baff18
Upgrade Xtext/Xtend to 2.26.0, LSP4J to 0.12.0 (#2786)
For release notes, see:

https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2022/02/28/version-2-26-0

This release adds initial support for Java 17.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-05 11:28:56 +01:00
J-N-K
192e4a2347
Add a profile for linking trigger channels to String items (#2769)
* Add a profile for linking trigger channels to String items

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-23 21:17:11 +01:00
Wouter Born
5e33cfc26a
Fix test failures when building with Java 17 (#2788)
* Adds some --add-opens to maven-surefire-plugin for:
  * modbus transport tests (java.net)
  * tests using Gson/XStream (java.util)
* Only run ScriptScopeOSGiTest when Nashorn is available as it has been removed since JDK 15

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-20 20:40:10 +01:00
lolodomo
79ec0396b3
[voice] Check that the provided locale is supported by KS/STT/HLI services (#2789)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-02-20 15:47:28 +01:00
Wouter Born
92917946d4
Add even more null annotations (#2752)
This PR adds even more missing null annotations which did not fit in #2742 as it grew too big.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-17 21:30:51 +01:00
Christoph Weitkamp
44da7a4e0e
Avoid URISyntaxException in tests (#2770)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-15 17:33:59 +01:00
Wouter Born
fb6ef20cd9
Move Java only tests from org.openhab.core.tests to org.openhab.core (#2768)
These tests only require Java and not OSGi.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-15 16:34:14 +01:00
Wouter Born
3d7be0ffa7
Avoid throwing raw exception types (#2747)
* Avoid throwing raw exception types

This fixes all 36 AvoidThrowingRawExceptionTypes SAT findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-14 16:14:25 +01:00
Wouter Born
ad936cd83f
Add more null annotations (#2742)
* Add more null annotations
* Fix mock name

Adds null annotations to most of the tests as well as a few other classes.
Also fixes a few other SAT findings.
Fixes ~300 SAT findings in total.


Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-14 11:33:50 +01:00
Wouter Born
b5bf0b0157
Always run OSGi HTTP service on random port in itests (#2759)
It is probably always a good idea to run the OSGi HTTP service on a random available port in itests.
This fixes some stacktraces when running itests and it will also prevent future issues when tests using the HTTP service are written.

These stacktraces often show when running itests in parallel:

```
org.ops4j.pax.web.pax-web-runtime [org.ops4j.pax.web.service.internal.HttpServiceStarted] ERROR : Could not start the servlet context for context path []
java.io.IOException: Failed to bind to /0.0.0.0:8080
	at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:349)
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310)
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
	at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.server.Server.doStart(Server.java:401)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:350)
	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:255)
	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:226)
	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:210)
	at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:69)
	at org.openhab.core.io.http.servlet.BaseOpenHABServlet.activate(BaseOpenHABServlet.java:56)
	at org.openhab.core.io.http.servlet.OpenHABServlet.activate(OpenHABServlet.java:40)
...
```

Similar to: openhab/openhab-addons#11523

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-14 08:09:55 +01:00
J-N-K
c0b033b95c
Fix WatchQueueReader cancelling jobs too early (#2745)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-12 10:10:23 +01:00
J-N-K
d6f63e7500
[thing] Fix removal of thing properties (single and bulk) (#2735)
* fix removal of thing properties (single and bulk)

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-07 19:32:22 +01:00
J-N-K
ea6f21f74d
allow multiple listeners for same directory in WatchService (#2724)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-07 10:14:41 +01:00
Wouter Born
d1a4d226b6
Upgrade XStream to 1.4.19 (#2738)
This addresses CVE-2021-43859, see:

https://x-stream.github.io/changes.html

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-06 21:33:10 +01:00
J-N-K
61f5e7f57d
[config] Enable config validation for updates by handler (#2712)
* Enable config validation for updates by handler

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-01 10:10:37 +01:00
lolodomo
8f0dd94343
[voice] Update dialog processing (#2693)
Related to #2688

Updated methods startDialog
New method stopDialog
Null annotations added to the class DialogProcessor

Allow translation of sentences "said" by the dialog processor in case of error

2 console commands added to start and stop a dialog

Enhanced integration tests

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-01-30 18:27:51 +01:00
J-N-K
1fff165cb0
[thing] Enable config validation for thing creation and update (#2682)
* Enable config validation for thing creation and update

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-01-20 10:20:16 +01:00
Wouter Born
ab929b50aa
Upgrade to Karaf 4.3.6 (#2689)
* Syncs dependencies with Karaf 4.3.6
* Resolves itest runbundles for these new dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2022-01-16 11:55:04 +01:00
Christoph Weitkamp
0dbc2b2ef4
[rest] Do not reuse FilterCriteria instance for more than one query (#2668)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-15 17:07:25 +01:00
Christoph Weitkamp
cabb3f7315
Update license headers to 2022 (#2671)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-07 13:16:42 +01:00
Christoph Weitkamp
33a553fa4d
[core] Added nullness annotations and suppress warning for 'AuthenticationException' (#2659)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-02 11:33:16 +01:00
Christoph Weitkamp
33f6651972
[mdns] Cancel removal task on manual scan (#2647)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-30 10:18:13 +01:00
Kai Kreuzer
e3b07782b4
pom reference update from http to https (#2644)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-23 22:55:20 +01:00
Christoph Weitkamp
8074ea7dfe
Replaced Runnable by lambda expression (#2642)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-23 09:44:14 +01:00
Christoph Weitkamp
89fff918ad
Resolve itest runbundles for snapshot 3.3.0 (#2631)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-20 08:09:08 +01:00
Kai Kreuzer
1ebf7395d9 Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 06:59:22 +01:00
openhab-bot
5ac05c4968 [unleash-maven-plugin] Preparation for next development cycle. 2021-12-19 21:49:34 +00:00
Wouter Born
b285e9be8f
Upgrade to Karaf 4.3.4 (#2603)
* Syncs dependencies with Karaf 4.3.4
* Resolves itest runbundles for these new dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-18 10:59:35 +01:00
Yannick Schaus
198e2eb405
Change the syntax for references in automation modules configuration (#2606)
Fixes #2510.

This changes the placeholder syntax used by the reference resolver notably
used in rule templates from `${reference}` to `{{reference}}`.

The former syntax is also used by other languages, notably JavaScript's
template strings, and therefore writing rule templates including JavaScript
code with template strings wouldn't behave as expected.

This also fixes a bug identified in #2510 where you couldn't have a
single closing brace before the start of the first placeholder - which
could more easily happen than having two closing braces.

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-12-12 19:20:19 +01:00
Wouter Born
0028a3c792
Downgrade Aries JAX-RS Whiteboard from 2.0.1 to 2.0.0 (#2599)
It causes unneccessary bundle refreshes whenever add-ons are installed/uninstalled.
As a result the UI does not get properly notified of installation changes.

Fixes #2580
Reverts the Aries JAX-RS Whiteboard upgrade of #2532

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-10 23:34:01 +01:00
Wouter Born
69043bea74
Use Accept-Language header for locale in ConfigurableServiceResource (#2602)
Most RESTResources already use the LocaleService to get the locale based on the Accept-Language header and use the system locale only as fallback.
Because the ConfigurableServiceResource does not do this, it results in mixed up languages whenever your browser locale is not the same as the configured system locale.

See:

* https://community.openhab.org/t/language-support-question-regional-settings-language-vs-browser-language/128010
* https://github.com/openhab/openhab-webui/issues/1083

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-10 23:33:13 +01:00
Wouter Born
ca063a3a2f
Update bnd to 6.1.0 (#2583)
For release notes, see:

https://github.com/bndtools/bnd/wiki/Changes-in-6.1.0

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-28 21:57:31 +01:00
Wouter Born
66c391a2c1
Upgrade JUnit and Mockito dependencies (#2574)
Upgrades:

* JUnit from 5.7.0 to 5.8.1.
* Mockito from 3.7.0 to 4.1.0.

For release notes, see:

* https://junit.org/junit5/docs/current/release-notes/index.html
* https://github.com/mockito/mockito/releases

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-23 20:27:17 +01:00
openhab-bot
598245b919
New Crowdin updates (#2566)
* New translations audio.properties (Hungarian)
* New translations DefaultSystemChannels.properties (German)
* New translations inbox.properties (Hungarian)
* New translations magic.properties (Hebrew)
* New translations magic.properties (Hungarian)
* New translations magic.properties (Italian)
* New translations marketplace.properties (Hungarian)
* New translations sitemap.properties (Hungarian)

* Fixed unit tests

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-11-21 13:06:09 +01:00
Wouter Born
3d722ec13b
Upgrade UoM dependencies (#2573)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-21 10:27:20 +01:00
spacemanspiff2007
abb17c1658
[rest] Align item endpoint with items endpoint (#2533)
Add option to skip members, e.g. if the goal of the request to just get the metadata of a group item

Signed-off-by: spacemanspiff2007 <git@sgerber.de>
2021-11-02 08:25:18 +01:00
Wouter Born
bf81eaa1c2
Fix/suppress PMD CompareObjectsWithEquals findings (#2548)
Newer PMD versions discover more CompareObjectsWithEquals findings.

Related to https://github.com/openhab/static-code-analysis/pull/423

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-30 19:37:34 +02:00
Wouter Born
39dad81ebb
Fix unstable ItemChannelLinkResourceOSGiTest (#2536)
New ItemChannelLinkProviders are added asynchronously to the ItemChannelLinkRegistry, which can cause this test to fail:

TEST org.openhab.core.io.rest.core.internal.link.ItemChannelLinkResourceOSGiTest#shouldReturnLinks() <<< ERROR:
Expected: a collection with size <3>
     but: collection size was <0>
java.lang.AssertionError:
Expected: a collection with size <3>
     but: collection size was <0>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
	at org.openhab.core.io.rest.core.internal.link.ItemChannelLinkResourceOSGiTest.shouldReturnLinks(ItemChannelLinkResourceOSGiTest.java:109)

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-25 16:59:25 +02:00
Wouter Born
a2ef0084d2
Upgrade JAX-RS Whiteboard and CXF (#2532)
* Upgrade JAX-RS Whiteboard and CXF

* Upgrades Aries JAX-RS Whiteboard from 2.0.0 to 2.0.1
* Upgrades CXF from 3.4.3 to 3.4.5

For CXF release notes, see:

* https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310511&version=12350023
* https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310511&version=12350279

Fixes #2512

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-25 11:55:02 +02:00
Wouter Born
d2557f950c
Update bnd to 6.0.0 (#2514)
For release notes, see:

https://github.com/bndtools/bnd/wiki/Changes-in-6.0.0

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-09 18:43:56 +02:00
Wouter Born
ba6386d83b
Use CoreItemFactory item type constants in tests (#2497)
This prevents typos and using the constants makes it easier to find out what other items types are accepted.
It also makes it easier to see that these values are item types and not labels or descriptions.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-27 07:34:58 +02:00
Wouter Born
0d5b2d6140
Upgrade to Karaf 4.3.3 (#2489)
* Syncs dependencies with Karaf 4.3.3
* Resolves itest runbundles for these new dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-18 16:06:57 +02:00
Wouter Born
4d842f4ba3
Upgrade XStream to 1.4.18 (#2482)
For release notes, see:

https://x-stream.github.io/changes.html#1.4.18

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-11 15:21:31 +02:00
Christoph Weitkamp
b2336a53fd
Resolve itest runbundles for snapshot 3.2.0 (#2419)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-06-28 11:19:17 +02:00
Kai Kreuzer
5a667cc868 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:22:02 +02:00
jenkins
b8d2077805 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 15:50:02 +00:00
Christoph Weitkamp
556d3498c1
Added 'ChannelDescriptionChangedEvent' (#1505)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-06-21 13:03:37 +02:00
Kai Kreuzer
3cac330c5f
[rest] Fix links to group members in REST response (#2399)
* Fix links for to group members in REST response

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-08 21:41:51 +02:00
Kai Kreuzer
17f95768a4
Update to new JmDNS release 3.5.7 (#2391)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-05-30 18:42:50 +02:00
Christoph Weitkamp
585e870183
[config] Changed 'ConfigDescriptionParameterDTO' field serialization 'defaultValue' -> 'default' (#2383)
* Changed ConfigParameterDTO field serialization 'defaultValue' -> 'default'

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-30 18:27:35 +02:00
Christoph Weitkamp
8acaa8994f
Added nullness annotations to Item events (#2384)
* Added nullness annotations to Item events
* Added nullness annotations to tests

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-30 18:27:15 +02:00
Christoph Weitkamp
53e9de5858
Fixed warnings on missing representation properties (#2385)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-25 21:44:51 +02:00
Christoph Weitkamp
d43106c016
Added "timestamp-trigger" Profile (#2364)
* Added Timestamp on Trigger Profile

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-23 22:43:27 +02:00
Wouter Born
85f17aefa4
Upgrade XStream to 1.4.17 (#2369)
Upgrades XStream from 1.4.15 to 1.4.17

Prevents the following vulnerabilities when using XStream instances with an uninitialized security framework:

* CVE-2021-21341
* CVE-2021-21342
* CVE-2021-21343
* CVE-2021-21344
* CVE-2021-21345
* CVE-2021-21346
* CVE-2021-21347
* CVE-2021-21348
* CVE-2021-21349
* CVE-2021-21350
* CVE-2021-21351
* CVE-2021-29505

See: http://x-stream.github.io/changes.html#1.4.17

Related to: #2250, #2251

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-19 21:15:55 +02:00
Wouter Born
e3f12c8a45
Upgrade to Karaf 4.3.2 (#2363)
* Syncs dependencies with Karaf 4.3.2
* Resolves itest runbundles for these new dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-17 21:09:46 +02:00
Christoph Weitkamp
ba53e8a08d
[profiles] Added "timestamp-offset" Profile (#2351)
* Added timestamp-offset Profile
* Fix RAWBUTTON_TOGGLE_ROLLERSHUTTER Profile

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-15 19:39:24 +02:00
Christoph Weitkamp
66525afce6
Expose Channel Type UIDs of default System Channel Types (#2361)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-14 12:21:27 +02:00
Wouter Born
91307993ad
Upgrade Units of Measurement dependencies (#2319)
Upgrades UoM dependencies to:

* javax.measure 2.1.2
* si-units 2.0.1
* indriya 2.1.2

An openHAB OSGi-ified si-units bundle is used as runtime dependency, because the latest si-units release is still missing proper OSGi manifest headers.

Notable changes:

* Quantity not longer implements an `equals` method, so the unit tests had to be adjusted. This should have any impact outside of the unit tests though since the rest of openHAB should be using QuantityType instead.
* RationalConverter is not package private, so instances of it much be created through the MultiplyConverter static functions.
* Quantities.getQuantity can no longer parse values without units like `100`. A workaround has been implemented.
* The unicode greek `mu` letter is now returned for unit prefixes instead of the unicode `micro` character. These characters are visually identical but the unit tests had to be adjusted. The new library seems to parse both types just fine.

Also-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-10 20:54:25 +02:00
Wouter Born
7579aa4d31
Fix more SAT findings and add a few suppressions (#2335)
* Fix more SAT findings and add a few suppressions

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-05 20:59:59 +02:00
Christoph Weitkamp
141e73c85f
Added nullness annotations to Thing events (#2341)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-04 17:04:58 +02:00
Christoph Weitkamp
e4f77f7992
[REST] Added editable flag for ItemChannelLinks by introducing an EnrichedItemChannelLinkDTO (#2318)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-27 11:03:41 +02:00
Christoph Weitkamp
c28c956d66
Fixed JsonParser deprecations (#2320)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-27 10:44:39 +02:00
Björn Lange
6258268031
Ignore illegal thing status updates from REMOVING (#2313)
* Ignore illegal thing status updates from REMOVING

Ignore illegal thing status transitions from REMOVING instead of throwing IllegalArgumentException

Signed-off-by: Björn Lange <blange@itemis.com>
2021-04-26 08:42:16 +02:00
Wouter Born
0fe6b31f19
Upgrade Aries JAX-RS Whiteboard to 2.0.0 (#2316)
Upgrades the Aries JAX-RS Whiteboard from 1.0.9 to 2.0.0

The biggest change is that CXF is now an external dependency of the Aries JAX-RS Whiteboard bundle.
This also fixes the issue that you could not properly debug the CXF code because there was no source code for the embedded classes.
CXF 3.4.3 is now used instead of 3.2.14.

For release notes see:

* Changelog: https://github.com/apache/aries-jax-rs-whiteboard/blob/master/changelog.md
* Apache JIRA: https://issues.apache.org/jira/issues/?jql=project%20%3D%20ARIES%20AND%20fixVersion%20in%20(jax-rs-whiteboard-1.0.10%2C%20jax-rs-whiteboard-1.1.0%2C%20jax-rs-whiteboard-2.0.0)%20AND%20component%20%3D%20jax-rs-whiteboard

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-25 11:23:56 +02:00
Christoph Weitkamp
c80719fefa
Renamed Yahoo to ACME (#2304)
* Rename Yahoo to ACME
* Remove Paper UI references

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-20 22:31:32 +02:00
Wouter Born
94b69e2ccb
Switch properties files encoding from ISO-8859-1 to UTF-8 (#2298)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-19 20:04:23 +02:00
Christoph Weitkamp
4311b167f3
Added unit test for UTF-8 encoded properties (#2295)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-19 17:07:47 +02:00
Wouter Born
05b7ec86f1
Fix new SAT findings (#2291)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-14 18:41:07 +02:00
Sönke Küper
db488d861e
[automation] Added rule rest endpoint and backend operation for rule execution simulation (#2125)
* Added marker interface for TriggerHandler to indicate if they are time based and thus can be used to simulate execution times.
* Added marker interface for ConditionHandler to indicate, if they are time based and thus can be checked during rule execution for a certain time.
* Moved CronAdjuster to common, so it can be used for the rule simulation
* Created RuleExecutionSimulator that allows simulation of rules
* Added method in RuleManger to create simulation
* Added rest endpoint for rule simulation.
* Changed marker interface to return TemporalAdjuster instead of cron expression. This better hides the internals of the TriggerHandler (i.e. the cron expression) and is more clear and flexible for other handlers to implement

Fixes #2044
Fixes #2266

Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
2021-04-11 09:31:48 +02:00
Wouter Born
6eba0a0c33
Upgrade Xtext/Xtend to 2.25.0, LSP4J to 0.10.0 (#2278)
For release notes, see:

https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2021/03/02/version-2-25-0
https://github.com/eclipse/lsp4j/blob/master/CHANGELOG.md#v0100-nov-2020

Also aligns the spifly and xbean runtime dependencies with Karaf 4.3.1 which was not possible because the older Xtext required ASM 8.0.1.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-08 16:17:59 +02:00
Wouter Born
ef1b86c1d1
Upgrade to OSGi R7 and Karaf 4.3.1 (#2264)
* Aligns compile dependencies with OSGi R7
* Aligns runtime dependencies with Karaf 4.3.1
* Fixes issues due to dependency changes:
  * AudioServletTest never ending due to Jetty upgrade
  * Feature resolution failing due to Karaf activation-api no longer visible
* Uses Pax Logging as runtime dependency instead of Felix Log
  This dependency change makes itests and Demo App behave more like the actual distro
  To change the log level in itests, change the value of org.ops4j.pax.logging.DefaultServiceLog.level in itest-include.bndrun
* Adds --add-opens and nashorn.args in itest-include.bndrun to prevent some warnings being logged in itests

Related to openhab/openhab-distro#1167

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-02 13:39:54 +02:00
Wouter Born
db11cfda51
Add null annotations to org.openhab.core.voice (#2255)
Allows for using null annotations with the voice TTS add-ons.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-25 20:19:11 +01:00
Wouter Born
4bf156ffc0
Upgrade Gson to 2.8.6 (#2244)
* Upgrade Gson to 2.8.6

Upgrades Gson from 2.8.2 to 2.8.6.

See change log: https://github.com/google/gson/blob/master/CHANGELOG.md#version-286

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-17 19:18:17 +01:00
Arjan Mels
e20348e8d6
[channel] Fix createChannelBuilders not using overriden label/description (#2229)
* Use channelDefinition in createChannelBuilder

Closes #2225 

Signed-off-by: Arjan Mels <github@mels.email>
2021-03-12 17:54:05 +01:00
Wouter Born
b0b6848e04
Update bnd to 5.3.0 (#2217)
See: https://github.com/bndtools/bnd/wiki/Changes-in-5.3.0

Fixes https://github.com/openhab/openhab-core/issues/2134

Signed-off-by: Wouter Born <github@maindrain.net>
2021-02-28 21:33:08 +01:00
Christoph Weitkamp
191a629e68
Added Sematics actions for Rules (#2088)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-27 10:33:32 +01:00
Christoph Weitkamp
9c0302ec26
[profiles] Added 'Range' profile (#2046)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-27 10:28:09 +01:00
Christoph Weitkamp
76e0cfdb81
[voice] Changed annotation of getPreferredVoice method to allow null results (#2186)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-09 19:26:49 +01:00
Wouter Born
46666eb169
Fix deprecations (#2163)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-30 12:22:31 +01:00
Christoph Weitkamp
12659595a6
Added system default channel type to control color temperature in Kelvin (#2157)
* Added system default channel type for controling color temperature in Kelvin

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-26 08:13:04 +01:00
Wouter Born
074bd7a623
Fix BOM dependency issues (#2120)
* Sync biz.aQute.tester.junit-platform version using bnd.version property
* Remove duplicate osgi-resource-locator dependency, causing warnings/unstability

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-15 16:33:39 +01:00
Wouter Born
c28090497d
Fix unstable tests due to RuleEngine not being started (#2093)
Fixes #1633
Fixes #1955
Fixes #2080

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-09 23:17:40 +01:00
Christoph Weitkamp
c2702d0dfe
Moved NumberExtensionsTest from itest to pure unit test and merged redundant calsses (#2087)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-08 23:17:28 +01:00
Wouter Born
64f444cf6e
Update Mockito, JUnit and use MockitoExtensions in itests (#2075)
* Updates Mockito to 3.7.0
* Updates JUnit to 5.7.0
* Use MockitoExtensions where possible

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-05 22:58:58 +01:00