Commit Graph

1991 Commits

Author SHA1 Message Date
Wouter Born
0e03943e48
Use String.join instead of Collectors.joining (#3973)
* Use String.join instead of Collectors.joining

String.join results in less code when joining an Iterable or Array.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-28 13:11:14 +01:00
Wouter Born
e958d5b46a
Replace lambdas with method references (#3972)
Method references are more readable because they refer to class names and usually result in less code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-28 09:55:31 +01:00
J-N-K
bb7a0dad1c
Fix NPE in GroupStateTriggerHandler and GroupCommandTriggerHandler (#3966)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-12-27 23:41:44 +01:00
Holger Friedrich
361273fcb5
IP addon finder: developer docs (#3948)
* IP addon finder: developer docs

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-27 20:25:32 +01:00
Andrew Fiddian-Green
a93f3d7d90
Add-on suggestion finder for USB devices (#3922)
Also-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-27 18:27:40 +01:00
Florian Hotze
f5bd7f94f3
[rest] Add no-cache directive to cached REST responses (#3970)
Fixes https://github.com/openhab/openhab-webui/issues/2102.

This forces the browser to revalidate the cache every time it is accessed to ensure the data is always fresh.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#directives.

This is approach is also suggested in the mdn web docs, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#up-to-date_contents_always.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-27 17:52:49 +01:00
Wouter Born
b08a01c93f
Remove unnecessary parenthesis from lambdas (#3968)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-27 17:52:13 +01:00
Wouter Born
ec05a63738
Remove unnecessary boxing (#3969)
Using primitives makes the code faster and consume less memory.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-27 17:50:09 +01:00
J-N-K
ff6b33f3d8
Fix duplicate UIDs in remote add-on services (#3961)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-12-26 23:17:05 +01:00
J-N-K
ad1c37d382
Fix month, week, day not supported (#3964)
Due to the way month, week and day are defined in Indriya their symbol is not added as alias. This is a bug in indriya, but their release cycles are quite long and we should provide a fix for our users.

This should be backported to 4.1.x

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-12-26 22:43:33 +01:00
Wouter Born
11e51abb44
Use OnOffType.from to reduce code (#3954)
You can create an `OnOffType` using a boolean nowadays which reduces the amount of code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-23 15:33:07 +01:00
Holger Friedrich
bada23fdb8
Minor code cleanup (#3942)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-23 12:54:29 +01:00
Holger Friedrich
839ba1ab4c
Apply spotless after release, resolve bundles (#3953)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:14:28 +01:00
openhab-bot
3b279587b1 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 11:48:43 +00:00
Kai Kreuzer
074fcdd7ea
Delay the IP scan to make sure that no further candidates are added (#3951)
* Delay the IP scan to make sure that no further candidates are added and do not use a dedicated thread pool

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-12-22 08:49:36 +01:00
openhab-bot
be456792d3
New Crowdin updates (#3950)
* New translations i18n.properties (Romanian)

* New translations network.properties (Romanian)

* New translations i18n.properties (French)

* New translations network.properties (French)

* New translations i18n.properties (Spanish)

* New translations network.properties (Spanish)

* New translations i18n.properties (Czech)

* New translations network.properties (Czech)

* New translations addons.properties (Danish)

* New translations i18n.properties (Danish)

* New translations network.properties (Danish)

* New translations marketplace.properties (Danish)

* New translations units.properties (Danish)

* New translations i18n.properties (German)

* New translations network.properties (German)

* New translations i18n.properties (Greek)

* New translations network.properties (Greek)

* New translations i18n.properties (Finnish)

* New translations network.properties (Finnish)

* New translations i18n.properties (Hebrew)

* New translations network.properties (Hebrew)

* New translations i18n.properties (Hungarian)

* New translations network.properties (Hungarian)

* New translations units.properties (Hungarian)

* New translations i18n.properties (Italian)

* New translations network.properties (Italian)

* New translations units.properties (Italian)

* New translations i18n.properties (Dutch)

* New translations network.properties (Dutch)

* New translations i18n.properties (Norwegian)

* New translations network.properties (Norwegian)

* New translations i18n.properties (Polish)

* New translations network.properties (Polish)

* New translations i18n.properties (Russian)

* New translations network.properties (Russian)

* New translations i18n.properties (Slovenian)

* New translations network.properties (Slovenian)

* New translations i18n.properties (Swedish)

* New translations network.properties (Swedish)

* New translations i18n.properties (Ukrainian)

* New translations network.properties (Ukrainian)

* New translations i18n.properties (Chinese Simplified)

* New translations network.properties (Chinese Simplified)

* New translations i18n.properties (Portuguese, Brazilian)

* New translations network.properties (Portuguese, Brazilian)
2023-12-21 21:51:49 +01:00
Kai Kreuzer
4b310aff30
Catch ISE if config admin is no longer available (#3949) 2023-12-21 21:36:11 +01:00
Andrew Fiddian-Green
924e7b2d6d
Fixes #3946 (#3947)
* Fixes #3946

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-21 18:23:43 +01:00
Kai Kreuzer
369bd228e7
Move addons.xml to runtime folder (#3944)
* Move addons.xml to runtime folder

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-12-20 23:53:10 +01:00
Kai Kreuzer
dceec22a35
Improve HTTP 404 handling and logging (#3940) 2023-12-20 12:35:25 +01:00
Jacob Laursen
e8641efd5b
Provide I18N properties for Unit Settings (#3941) 2023-12-20 12:34:58 +01:00
Holger Friedrich
5e94d8350b
Additional logging AddonInfo addons.xml (#3928)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-20 11:19:35 +01:00
lolodomo
d7486a985e
Sitemap generator: fix button parsing for Buttongrid (#3938)
Fix #3937

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-20 09:46:41 +01:00
Wouter Born
81f14c9df1
Upgrade logback-classic to 1.3.14 (#3935) 2023-12-19 23:26:22 +01:00
Kai Kreuzer
04cd8408de
Don't log errors on NotFoundExceptions in Jetty (#3931) 2023-12-19 21:16:05 +01:00
openhab-bot
cb1b355869
New Crowdin updates (#3929)
* New translations addons.properties (Hungarian)

* New translations addons.properties (Italian)

* New translations languagesupport.properties (Portuguese)

* New translations languagesupport.properties (Portuguese, Brazilian)

* New translations addons.properties (Hebrew)
2023-12-19 21:05:30 +01:00
Andrew Fiddian-Green
3362bfbea0
Upnp add M-SEARCH with search target ST: upnp:rootdevice header (#3933)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-19 20:40:20 +01:00
Holger Friedrich
24b1784d44
Reduce SAT warnings (#3932)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-19 20:37:57 +01:00
Holger Friedrich
8bed621c8c
Service to suggest addons via generic IP scan (#3920)
* Service to suggest addons via generic IP scan

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-17 13:12:55 +01:00
openhab-bot
2c9312e55c
New Crowdin updates (#3919)
* New translations addons.properties (Danish)

* New translations addons.properties (Italian)

* New translations addons.properties (French)
2023-12-16 17:23:47 +01:00
Holger Friedrich
fe5f130ca7
minor doc update to fix javadoc build (#3926)
* minor doc update to fix javadoc build

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Co-authored-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-16 17:22:40 +01:00
GiviMAD
8cc8d8668a
[Voice] Fix match question and allow force command (#3925)
* [voice] Fix match question and allow force command

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-12-16 12:29:45 +01:00
Mark Herwege
d3ebc824b3
jar file add-on logger name (#3921)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-16 11:26:30 +01:00
GiviMAD
4ace1557f4
[voice] Add interface to represent a remote keyword spotter (#3564)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-12-16 11:22:38 +01:00
J-N-K
c8a6cf2603
[UoM] Add currency handling (#3503)
* Add currency as unit

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-12-16 11:18:25 +01:00
Mark Herwege
fe242f8ab9
Modified finder discovery schema to make future finders easier to create (#3924)
* change discovery method schema

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-16 11:08:09 +01:00
Holger Friedrich
4e634c6b55
Service to suggest addons based on running processes (#3904)
* Service to suggest addons based on running processes

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-16 10:52:41 +01:00
lolodomo
4b92db3775
Add a log when loading a YAML file (#3916)
For consistency with other model files loading.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-13 08:26:29 +01:00
Andrew Fiddian-Green
8082daa290
UPnpAddonFinder M-SEARCH ST: ssdp:all (#3918)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-12 18:29:27 +01:00
Mark Herwege
5ffeb1fc72
i8n suggestion finders config (#3913)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-11 21:58:18 +01:00
Andrew Fiddian-Green
be70a13afe
Handle ISE when shutting down (#3910)
* Suppress logging when shutting down
* Cancel scheduled tasks on shutdown

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-10 22:45:12 +01:00
lolodomo
070de55b27
Add a YAML file provider for semantic tags (#3659)
* Add a YAML file provider for semantic tags

Files in folder conf/tags are loaded by this provider.

Related to #3619

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-10 11:26:03 +01:00
lolodomo
152ffe3fbb
Fix handling of mDNS instances when an IP address changed (#3906)
Fix openhab/openhab-addons#16023

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-09 21:56:56 +01:00
Mark Herwege
708a954081
Fix addon name localisation before installation (#3908)
* fix addon name and description

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-09 20:29:24 +01:00
Andrew Fiddian-Green
bb30eab3b9
[addon] fix #2204 (#3905)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-09 12:19:51 +01:00
Andrew Fiddian-Green
62a50a409a
Service to find suggested addons to install (#3806)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-07 17:32:33 +01:00
Andrew Fiddian-Green
de9912d06b
AddonInfoAddonsXmlProvider check for missing folder (#3903)
* [AddonInfoAddonsXmlProvider] fix issue #3901

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-07 14:30:10 +01:00
Jared
44b92dbc59
add support for passing extra fields to oauth token request (#3881)
allows using oauth client for authentication with velux API https://github.com/nougad/velux-cli/blob/master/velux-protocol.md#initial-login

Signed-off-by: Jared Lyon <lyonj3@gmail.com>
2023-12-06 07:32:47 +01:00
GiviMAD
075bcea8c2
[voice] Support custom rules on item metadata (#3897)
* [voice] Support custom rules on item metadata
* fix isTemplate functionality and test
* fix filter location based for non labeled rules

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-12-06 07:18:44 +01:00
lolodomo
76b10ac1c1
[Sitemap] Change syntax for Buttongrid sitemap element (#3898)
Follow-up #3810

Location in the grid is now defined by a row number and a column number.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-05 21:50:58 +01:00
Andrew Fiddian-Green
cc9b70516a
AddonInfo extensions (#3865)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-05 16:49:31 +01:00
Jacob Laursen
aa305d90d0
Fix AutoUpdatePolicy for channel (#3888)
* Fix AutoUpdatePolicy for channel

Fixes #3887

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

* Simplify setting of auto update policy

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

---------

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-12-04 10:56:33 +01:00
Holger Friedrich
9a9726b8fe
[ColorUtil] Extend rgbToHsb(PercentType[]) for RGBW (#3882)
* [ColorUtil] Extend rgbToHsb(PercentType[]) for RGBW

rgbToHsb(PercentType) supports arrays of size 4 (RGBW) in addition to and arrays of size 3 (RGB).

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-03 20:14:35 +01:00
J-N-K
7186bf85ff
Add time-series support for websockets (#3889)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-12-03 20:11:56 +01:00
joerg1985
32237a9bdc
Do not leak running pools from the internal collection (#3885)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2023-11-24 22:24:37 +01:00
lolodomo
f71ebfb83c
Extend support to ISO8601 format for sitemap chart period parameter (#3863)
* Extend support to ISO8601 format for sitemap chart period parameter

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-24 16:53:10 +01:00
joerg1985
ae117f6317
Use a single thread to watch all event executors (#3884)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2023-11-24 16:52:07 +01:00
joerg1985
bdb1e55b58
Use a scheduled thread pool in JsonStorage + Bugfixes (#3874)
* Use a scheduled thread pool in JsonStorage to avoid one thread per instance
* Removed an incorrect conversion between millis and nanos

Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2023-11-22 22:43:44 +01:00
Holger Friedrich
3e3afd8cdc
[DSL] Expose ColorUtil methods to DSL rules (#3879)
New functions for RGBW introduced in #3849.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-22 21:36:39 +01:00
J-N-K
8a6e7432cd
Add log websocket (#3859)
This adds a websocket connection for receiving logs.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-11-22 21:35:35 +01:00
Wouter Born
7af02598ef
Small code cleanup (#3873)
* Removes hyphens from JavaDoc parameters
* Fixes a few 'exists' grammar mistakes

Signed-off-by: Wouter Born <github@maindrain.net>
2023-11-15 16:47:58 +01:00
Holger Friedrich
9ad2fef549
Fix javadoc warnings (#3870)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-15 09:21:07 +01:00
Holger Friedrich
47cc6db982
Fix javadoc warnings in directory org.openhab.core (#3867)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-12 11:38:36 +01:00
Marco Müller
237f2ebb56
[core] Add conversion for HSB to RGBW and back (#3849)
* Add conversion for HSB to RGBW and back
for KNX DPT251.600 to use all 4 colors.

With the new feature, the HSBType can converted into RGBW, and also back
to HSB.

Due to the conversion, some accuracy is lost, but the result is
approximately correct.

Signed-off-by: Marco Müller <marco@ms-mueller.ch>
2023-11-12 11:23:44 +01:00
J-N-K
cdbca4dd0a
Allow sending TimeSeries for items (#3597)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-11-07 20:08:41 -08:00
maniac103
fb6f1923e8
[sitemap] Provide information about widget label source to clients (#3804)
* [sitemap] Provide information about widget label source to clients

The label can be populated from a label specified on the respective
sitemap widget, or (if no label was specified) from the label of the
backing item. Allow clients to differentiate between both cases.

Related to openhab/openhab-webui#2065

Signed-off-by: Danny Baumann <dannybaumann@web.de>
2023-11-06 21:40:36 -08:00
jimtng
99bb994b36
Suppress SseItemStates warnings during startup (#3774)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-11-06 21:36:21 -08:00
GiviMAD
ade531288f
[voice] Support item descriptions in built-in interpreter. (#3853)
* [voice] Support item descriptions in built-in interpreter

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-11-06 21:34:00 -08:00
Gwendal Roulleau
26283dab75
[webaudio] Allow stopping play (#3766)
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-11-01 08:50:01 +01:00
J-N-K
7b0f77bac3
Fix thing upgrades for bridges (#3858)
Bridges could not be updated because the updated bridge was a `ThingImpl` instead of a `BridgeImpl`. Also the copy-creator in the `BridgeBuilder` was missing. This should also be cherry-picked to 4.0.x.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-10-30 18:31:32 +01:00
Mark Herwege
d75d6dffce
Fix UI defined sitemaps (#3850)
* fix UI defined sitemaps
* allow AND conditions
* label not required

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-10-26 23:30:17 +02:00
Wouter Born
f2c20af944
Improve FolderObserver ignored paths handling (#3856)
The FolderObserver needs to make sure that paths are properly handled for any parsers that are added at any moment by other threads during activation.

Fixes #3784
Fixes #3793

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-21 09:23:07 +02:00
Kai Kreuzer
14f8490d1c
Address warnings in StringUtils class (#3845)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-10-15 22:01:07 +02:00
lolodomo
7281dca286
[Sitemap] Add optional conditional rules for icon (#3820)
This allows dynamic icons based on items states even with non OH icon sources.
This also allows overwritting the default handling with state done by the icon servlet.

Example: icon=[item1>0=temperature,==0=material:settings,f7:house]

Related to openhab/openhab-webui#1938

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-15 22:00:35 +02:00
lsiepel
4001161810
Add string utils to core (#3738)
* Add utils to core

Signed-off-by: lsiepel <leosiepel@gmail.com>
2023-10-15 20:35:15 +02:00
J-N-K
ae85096e53
Improve code in QuantityType (#3842)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-10-10 21:49:41 +02:00
jimtng
e9d969c31d
Fix QuantityType UNIT_PATTERN regex (#3841)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-10-10 10:08:45 +02:00
Wouter Born
783c57cbb9
Use 'uid' instead of 'UID' as method parameters (#3840)
Using 'UID' is confusing as method parameter because it can be mistaken for some kind of constant while reading code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 21:39:47 +02:00
Wouter Born
e8e1c9fe73
Simplify code that creates List, Map and Set objects (#3836)
Simplifies the code by using List.of, List.copyOf etc. where possible which results in less code and imports.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 18:00:00 +02:00
jimtng
304453ec58
Make DecimalType, QuantityType, PercentType accept lowercased exponent notation (#3834)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-10-09 10:59:25 +02:00
Wouter Born
09b3160a55
Simplify code using Stream.toList (#3831)
Stream.toList was introduced in Java 16 and creates an unmodifiable List so it can be used to simplify code whenever the List is not expected to be modified.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 09:20:08 +02:00
Florian Hotze
2794c973d3
[rest] Add caching for UoM info (#3838)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-09 09:18:45 +02:00
Florian Hotze
176e23f296
Fixes source filter not working for GenericEventTrigger (#3837)
While reviewing https://github.com/openhab/openhab-js/pull/300,
I noticed that filtering by source `org.openhab.core.expire` was not possible.

This was because the specified source was checked against the event topic, which makes no sense at all given that different schemes.
Source filtering is done inside the `apply` method.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-08 19:43:08 +02:00
lolodomo
e5518b9322
[Sitemap] Add support for multiple AND conditions (#3819)
Concerns labelcolor, valuecolor and visibility

Also fix wrong positions of ")" in Sitemap.xtext

Closes #3058

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-08 09:48:58 +02:00
jimtng
0d355fbbc7
Make QuantityType.toUnitRelative accept a String (#3802)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-10-06 20:42:50 +02:00
Wouter Born
93d80e36b9
Remove unused javax.inject annotations (#3827)
AFAIK these annotations are not used when using declarative services.

I stubled upon these annotations when feature validation failed while creating #3817.
Xtext now uses Guice 7 which is using jakarta.inject imports.

Only si.uom:si-units:2.1 still imports javax.inject but it will also switch to jakarta.inject when 2.2 gets released.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-04 22:10:53 +02:00
Wouter Born
012d7a034f
FolderObserver improvements (#3821)
* Mark extensions as ready in addModelsToRepo only if parser was availabile
* Store valid extensions using Set instead of List
* Use java.nio where possible
* Add more debug logging
* Cleanup and simplify code

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-03 13:19:26 +02:00
openhab-bot
dda021ae07
New Crowdin updates (#3807)
* New translations addons.properties (Russian)
* New translations automation.properties (Hebrew)
* New translations languagesupport.properties (Portuguese)
* New translations languagesupport.properties (Portuguese, Brazilian)
* New translations scriptprofile.properties (Finnish)
* New translations voice.properties (Finnish)
* New translations voice.properties (Hebrew)
2023-10-02 10:30:39 +02:00
lolodomo
f7d176570c
[Sitemap] Accept an optional icon for each value/label mapping (#3809)
* [Sitemap] Accept an optional icon for each value/label mapping

When set by the user, the icon can be used by UIs for switch element with mappings to render a button with the icon rather than the label.

Related to #3441

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-02 09:36:23 +02:00
Mark Herwege
3eef2872f5
fix trailing space in state string (#3812)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-10-01 21:47:25 +02:00
lolodomo
366bffa406
[Sitemap] Introduce "Buttongrid" as new sitemap element (#3810)
Related to #3441

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-01 21:36:31 +02:00
lolodomo
369a49aab1
[sitemap/MainUI] Fix a typo in buildWidget (#3811)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-01 16:38:38 +02:00
Wouter Born
d4a433a4ce
Upgrade to Karaf 4.4.4 (#3814)
* Sync runtime dependencies with Karaf 4.4.4, most notably:
  * Jetty 9.4.52.v20230823
  * JNA 5.13.0
  * SLF4J 2.0.6
  * Pax Logging 2.2.3
  * Pax Web 8.0.22
* Resolve itest runbundles
* Use new Pax Web features to simplify dependency management
* Add specs features because Pax Web now depends on "asm"

Signed-off-by: Wouter Born <github@maindrain.net>
2023-09-29 20:23:31 +02:00
J-N-K
af4fce1e4f
Fix CommunicationManager command handling (#3714)
* Fix CommunicationManager

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-09-13 22:27:12 +02:00
GiviMAD
d87ef1f645
[voice] Add dialog group and location (#3798)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-09-13 21:09:13 +02:00
Wouter Born
f6435ec132
Fix countries and connection AddonInfo issues (#3797)
Fixes the following:

* connection and countries details missing for some AddonServices
* missing connection getter on AddonInfo
* countries lists has empty String when when countries info is missing

Related to #3795

Signed-off-by: Wouter Born <github@maindrain.net>
2023-09-09 12:15:03 +02:00
J-N-K
daeb367155
Add uptime to /systeminfo REST endpoint (#3796)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-09-09 10:57:07 +02:00
Mark Herwege
2b8475253f
Adjust QuantityType calculations for temperatures (#3792)
* fix quantity calculations
* remove temperature offsetProfile workaround

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-08 18:02:34 +02:00
GiviMAD
4364e3b354
[voice] Reduce collisions on exact match and use item synonyms (#3698)
* [voice] Reduce collisions on exact match and use item synonyms

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-09-08 16:32:43 +02:00
lolodomo
1c8096b4eb
[DSL] Expose ColorUtil methods to DSL rules (#3749)
Fix #3743

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-02 19:14:59 +02:00
Wouter Born
c39d15ade6
Cleanup code (#3787)
This code cleanup fixes various warnings in Eclipse.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-30 22:50:17 +02:00
Gwendal Roulleau
3ddbdb25ed
[cache] Fix concurrent use of a cache entry (#3785)
Closes #3507
Fix some rare case where the concurrent readings of a cache entry can fail.

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-08-30 14:23:35 +02:00
Wouter Born
e765af06cb
Upgrade Maven and plug-ins (#3788)
* Use Maven 3.9.4 with GitHub Actions CI
* Upgrade Maven plug-ins

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-30 13:29:34 +02:00
Wouter Born
f8b52ea3f6
Use JUnit TempDir which automatically removes temp dirs (#3786) 2023-08-28 22:30:56 +02:00
dependabot[bot]
a0eeed9292
Bump org.apache.ivy:ivy in /bundles/org.openhab.core.semantics (#3773)
Bumps org.apache.ivy:ivy from 2.5.1 to 2.5.2.

---
updated-dependencies:
- dependency-name: org.apache.ivy:ivy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 09:41:50 +02:00
J-N-K
b426cccf9c
Fix GenericThingProvider (#3779)
When things from multiple handler factories are provisioned from the same file the internal thing map was not properly updated.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-08-28 09:26:52 +02:00
Wouter Born
9cc7b58ac0
Fix linuxsysfs itest failing when serial device is connected (#3782)
This fixes that some linuxsysfs tests always fail on Linux whenever a real serial device is connected.
Due to the changes in #3290 the tests would also scan the actual devices causing tests to fail due to unexpected results.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-27 11:16:04 +02:00
Wouter Born
5daf4ff076
Fix SAT and null analysis issues (#3781)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-27 11:15:15 +02:00
Mark Herwege
096d11bf3f
Fix sitemap visibility rule with blanks (#3769)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-08-26 15:10:10 +02:00
Holger Friedrich
ce5cef959b
Migrate to java.nio.file.createTempFile (#3767)
Use function from nio package as it uses more restrictive file permissions.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-08-26 15:08:03 +02:00
Wouter Born
d909543415
Upgrade org.bouncycastle:bcpkix-jdk15on (#3765) 2023-08-19 10:54:57 +02:00
J-N-K
04eb32185c
Bump UoM libraries to 2.2 (#3758)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-08-18 21:38:43 +02:00
lolodomo
5f8658d0ae
[REST] Check a label is provided when creating a new semantic tag (#3734)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-16 17:48:09 +02:00
Wouter Born
aef57edd73
Use workaround to fix high CPU usage by LinkedTransferQueue (#3756)
This is a workaround for JDK-8301341 by using the Java 11 LinkedTransferQueue with the QueueingThreadPoolExecutor in the Core and jUPnP.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-14 10:37:20 +02:00
lolodomo
c12067a63b
[sitemap] Add new "staticIcon" parameter (#3735)
When set, the UI should not provide the item state when requestiong the
OH icon and should not request again the icon when the item state is
updated.

Related to openhab/openhab-android#3404

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-13 19:36:41 +02:00
J-N-K
3af2e30098
Fix logging in AbstractProvider implementations (#3751)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-08-13 18:20:02 +02:00
J-N-K
da73b5770c
Fix CME in RuleEngineImpl (#3754)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-08-13 18:18:45 +02:00
J-N-K
caf13da88a
Fix StackOverflowError in SemanticsMetadataProvider (#3748)
In case of cyclic/recursive membership of groups (i.e. a group has itself or a child as parent) the recursive processing of the items leads to an `StackOverflowError` (reported in the forum and the german Facebook group). Also this is clearly a configuration error it should not result in the bundle not starting.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-08-12 11:49:12 +02:00
Wouter Born
04105c1b1a
Link to Java 17 documentation (#3750)
This prevents issues because older documentation may not apply to Java 17.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-12 10:19:48 +02:00
J-N-K
409198cd8c
Move factory interface to public package (#3742)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-08-11 17:47:44 +02:00
openhab-bot
a690aeba3d
New Crowdin updates (#3744)
* New translations voice.properties (Hungarian)

* New translations automation.properties (Hungarian)
2023-08-11 14:08:26 +02:00
openhab-bot
b3cc326217
New Crowdin updates (#3739)
* New translations automation.properties (Italian)

* New translations LanguageSupport.properties (Portuguese, Brazilian)
2023-08-03 14:08:47 +02:00
Florian Hotze
c4fb71fcc6
[automation] Update texts for rule-based actions (#3733)
Core part of https://github.com/openhab/openhab-webui/issues/1921.

With UI-support for scenes & scripts, the texts (labels, descriptions etc.) for rule-based actions should be updated to mention scenes & scripts as well.
This improves the UI experience.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-30 20:26:51 +02:00
Florian Hotze
f5a0b37b3d
[persistence] Handle null value for relative & inverted props of filters (#3727)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-25 21:07:24 +02:00
Florian Hotze
e1741cf61d
[rest] Add caching for TagResource & De-duplicate code for caching (#3729)
* [rest] Add caching for TagResource
* [core] Add & use RegistryChangedRunnableListener class

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-25 20:59:39 +02:00
J-N-K
79fd459f59
Fix limitToOptions in script profile (#3730)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-25 09:16:07 +02:00
Kai Kreuzer
5692232e2b Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:11:37 +02:00
openhab-bot
fd93f0a766 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 17:14:35 +00:00
J-N-K
546e34252f
Fix system started DSL rules (#3725)
* Fix system started DSL rules

Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-23 10:21:37 +02:00
GiviMAD
559ab9136f
[Auth Filter] Fix implicit user role for websocket connections (#3724)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-07-22 22:53:19 +02:00
Flole998
5449c476e0
Provide correct version information for XChart in NOTICE (#3721)
Signed-off-by: Flole <flole@flole.de>
2023-07-21 22:07:20 +02:00
J-N-K
573c94b560
Fix MQTT crashes when subscriber throws exception (#3719)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-21 17:37:57 +02:00
Kai Kreuzer
7a87001f98
Revert "Upgrade XChart to 3.8.4 (#3291)" (#3720)
This reverts commit c2e81a13fd.
2023-07-21 17:21:14 +02:00
J-N-K
b8ae55c3f5
Fix rule startlevel trigger executes during initialization (#3717)
* Fix rule startlevel trigger executes during initialization

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-21 14:18:28 +02:00
Florian Hotze
72ec0f3517
[rest] Add missing fields to /rest/items?staticDataOnly=true resource (#3712)
Fixes #https://github.com/openhab/openhab-webui/issues/1958.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-21 13:35:38 +02:00
Florian Hotze
62a83557ae
[persistence] Handle null value for unit field of filters (#3716)
Setting up a treshold filter with the UI, it did not work because the unit field was blank.
I got an NPE from PersistenceTresholdFilter, and the PersistenceIncludeFilter would also throw a NPE in that case.
For PersistenceTimeFilter, defaulting to "s" is just cosmetic.

Picks-up PR #3681 and should be merged for the 4.0 release, because the UI does not prevent the unit field from being null.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-20 17:17:53 +02:00
J-N-K
5a00bfdc41
Align system-channel-types for electricity (#3707)
* Align system-channel-types for electricity

These are only used by one binding at the moment and it's very inconsistent to have power, voltage and current with the "electric" prefix and energy with "electrical".

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-18 09:05:42 +02:00
Wouter Born
3396ff7758
Use Eclipse formatter 4.25 with Spotless (#3710)
Fixes #3515

Signed-off-by: Wouter Born <github@maindrain.net>
2023-07-18 09:03:16 +02:00
openhab-bot
2ee85a75f5
New translations voice.properties (French) (#3709) 2023-07-17 17:58:47 +02:00
lolodomo
f71137331f
[Sitemap UI] Do not break format defined in label with extra spaces (#3708)
Fix openhab/openhab-webui#1953

Fix a regression introduced by PR #3644

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-07-17 17:58:01 +02:00
J-N-K
66dec25571
Keep channel properties in upgrades (#3612)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-16 10:24:21 +02:00
J-N-K
9ba8e71c54
Add unit "calorie" (#3684)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-15 22:18:27 +02:00
openhab-bot
7b7ccba5bb
New translations voice.properties (Italian) (#3703) 2023-07-15 22:17:15 +02:00
J-N-K
35ca7a9a94
Fix NPE in PersistenceManager (#3704)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-15 22:16:32 +02:00
Gwendal Roulleau
07e88234c6
[voice] Add length limit to TTS handled by cache (#3699)
* [voice] Add length limit to TTS handled by cache

We can safely assume that long TTS are generated for report (meteo, chatGPT ?), probably not meant to be repeated, and so not cached.

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-07-15 09:47:59 +02:00
J-N-K
141b7b637a
Increase large event queue warn limit (#3702)
On larger installations with 1000+ items the limit of 1000 elements in the queue is exceeded easily. Since no events are lost (they just take longer to be processed), the limit that needs to be exceeded before a warning is issued should be increased.

See reports on the forum.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-14 21:47:14 +02:00
Mark Herwege
f0c00959aa
[rest] add unit to item response (#3654)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-07-14 20:01:22 +02:00
openhab-bot
fb4f45e3e2
New Crowdin updates (#3653)
* New translations scriptprofile.properties (Hungarian)

* New translations validation.properties (Hungarian)

* New translations automation.properties (Hungarian)

* New translations lsp.properties (German)

* New translations persistence.properties (German)
2023-07-11 18:47:44 +02:00
lolodomo
f0adf76719
HTTP audio servlet: check end of play every 2 seconds (#3695)
Instead of 5s before.
It helps triggering the end of playback earlier for audio sinks in asynchronous mode.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-07-11 18:46:01 +02:00
lolodomo
591b16ff35
Avoid null hash warning in WatchServiceImpl when possible (#3691)
Fix #3680

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-07-07 20:26:12 +02:00
J-N-K
abcfe54678
Fix marketplace add-ons missing config description URI (#3688)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-06 08:26:33 +02:00
J-N-K
6a0b268c3e
Fix wrong ready marker in ScriptEngineFactoryBundleTracker (#3683)
* Fix wrong ready marker in ScriptEngineFactoryBundleTracker
* fix ready marker handling

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-06 08:25:13 +02:00
lolodomo
e9719eb577
Make firmwareStatus field not final in DTO object (#3687)
Fix #3679

If not, calls of method limitToFields by PR #3335 fails when the list of
fields does not contain firmwareStatus.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-07-05 21:02:24 +02:00
lolodomo
b2934ad044
Avoid warning log introduced by PR #3644 (#3686)
Fix openhab/openhab-webui#1951

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-07-05 20:15:10 +02:00
J-N-K
4be95788f1
Remove error logging from PersistenceIncludeFilter (#3682)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-04 07:34:27 +02:00
J-N-K
a656073352
Improve performance for state update handling (#3635)
* Improve threading in EventHandler
* refactor pagechangelistener to event
* One executor per subscriber type, not per subscriber

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-02 12:12:53 +02:00
GiviMAD
6b914162bf
[voice] Add console commands for register/unregister dialogs and list them (#3459)
* [voice] Add voice commands for register/unregister dialogs and list dialogs and dialog registrations

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-07-02 11:27:10 +02:00
Gwendal Roulleau
3ec1457583
[audio] Improve audio duration computation (#3675)
Allows the use of a Sizeable interface (for AudioStream that we know the length of, but we cannot clone). We can then improve the duration detection, for example for the pulseaudio sink (PR coming after).
We can also give the length information to sink in more cases.

Add the support of the mark / reset methods to some common AudioStream. We then allow more stream analysis for sink requiring it (Stream analysis often requires to get back in time after consuming a few bytes)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-07-02 11:19:34 +02:00
Mark Herwege
5ceaa64768
[rest] Add widget state pattern and default unit to ItemUIRegistry (#3644)
* expose widget format pattern to sitemap REST
* Add unit fields to sitemap REST

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-07-02 11:03:00 +02:00
Scott Hraban
505e51210e
Always use ThingUid as the unique identifier for thing status metrics (#3674)
* Always use ThingUid as the unique identifier for thing status metrics

At bind time, ThingId was being used, but then ThingUid was being used when changes occured,
causing multiple meters to be created for the same Thing, with the status always being 0 for
the meter created at bind time.

This change uses the full ThingUid, for both binding and event processing, since ThingUid is
the globally unique value.

Fixes #3672

Signed-off-by: Scott Hraban <scotthraban@gmail.com>
2023-07-02 09:31:02 +02:00
Wouter Born
db97610111
Replace StringBuffer usages with StringBuilder (#3668)
See: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/StringBuilder.html

> This class provides an API compatible with StringBuffer, but with no guarantee of synchronization.
> This class is designed for use as a drop-in replacement for StringBuffer in places where the string buffer was being used by a single thread (as is generally the case).
> Where possible, it is recommended that this class be used in preference to StringBuffer as it will be faster under most implementations.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-06-25 17:24:46 +02:00
J-N-K
78e66745ab
Add support for things with generic channels (#3355)
* Add support for generic channels

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-25 16:22:55 +02:00
J-N-K
64fd046266
Bump spifly to 1.3.6 and asm to 9.4 to support records (#3658)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-23 10:46:43 +02:00
J-N-K
36f95bb5b5
Fix missing query prefix in JarFileAddonService (#3664)
See title. This brings the query id in-line with the other add-on services.

Also adds correct content type.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-18 21:08:47 +02:00
J-N-K
d64bd3b90b
Improve existing and add new persistence filters (#3642)
* Improve existing and add new persistence filters
* include filter

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-18 09:29:49 +02:00
J-N-K
c2e81a13fd
Upgrade XChart to 3.8.4 (#3291)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-17 11:00:39 +02:00
Gwendal Roulleau
8eddad5c76
[audio] Enhance AudioSink capabilities using the AudioServlet (#3461)
* [audio] More capabilities for AudioSink using the AudioServlet

AudioServlet can now serve all type of AudioStream multiple times by buffering data in memory or in temporary file.
Adding method to ease disposal of temporary file after playing a sound
Adding an identifyier to audio stream for further development (allow audio sink to cache computation data)

We can now send audio with a Runnable for a delayed task to be executed after. This delayed task includes temporary file deletion and volume restoration.
This is a no breaking change / no behaviour modification for other addon AudioSink, as existing AudioSink must explicitly override the old behaviour to use this capability.
Add AudioSinkSync / AudioSinkAsync abstract classes to use this capability easily.
WebAudioSink now implements this capability, with the help of a modified AudioServlet

Adding (approximative, better than nothing) sound duration computation method for MP3 and WAV.
Use this sound duration computation to guess when the async sound is finished and when to do the post process (i.e. volume restoration)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-06-16 21:54:11 +02:00
lolodomo
f86635fe96
[rest] Add semantic tag registry + API to manage user tags (#3646)
* Add semantic tag registry + REST API to manage user tags

Related to #3619

New registry for semantic tags.
New default semantic tags provider for all built-in semantic tags.
New managed provider to add/remove/update user semantic tags.
Storage of user semantic tags in a JSON DB file.
New REST API to add/remove/update user tags in the semantic model.
New REST API to get a sub-tree of the semantic tags.

Semantic tag class annotations are removed.

Semantic tag classes are now created at runtime.
Classes Locations, Equipments, Points and Properties are removed

Static methods SemanticTags.add removed
The adding of semantic tag classes is now managed only by the tag registry.

Avoids calling static method SemanticTags.getById when possible

SemanticsMetadataProvider service now requires semanticTagRegistry to start.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-06-16 16:38:03 +02:00
Yannick Schaus
6e83d3f8de
"Cacheability" option for critical REST resources (#3335)
* Closes #3329.

This implements a new optional `cacheable` parameter for these REST endpoints:
- `/rest/items`
- `/rest/things`
- `/rest/rules`

When this parameter is set, a flat list of all elements excluding
non-cacheable fields (e.g. "state", "transformedState", "stateDescription",
"commandDescription" for items, "statusInfo", "firmwareStatus",
"properties" for things, "status" for rules) will be retrieved along with
a `Last-Modified` HTTP response header. When unknown, the Last-Modified
header will be set to the date of the request.

Also only when this parameter is set, and a `If-Modified-Since` header is
found in the request, that header will be compared to the last known
modified date for the corresponding cacheable list. The last modified date
will be reset when any change is made on the elements of the underlying
registry. If the `If-Modified-Since` date is equal or more recent than the
last modified date, then a 304 Not Modified response with no content will
be served instead of the usual 200 OK, informing the client that its
cache is still valid at the provided date.

All other request parameters will be ignored except for "metadata" in the
`/rest/items` endpoint. When a metadata selector is set, the resulting
item list will be considered like a completely different resource, i.e.
it will have its own last modified date. Regarding metadata, the approach
to invalidating last modified dates is very conservative: when any metadata
is changed, all cacheable lists of items will have their last modified date
reset even if the change was in a metadata namespace that wasn't requested.

This also implements the abovedescribed behavior for the
`/rest/ui/components/{namespace}` endpoint, but no `cacheable` parameter
is necessary. The last modified date is tracked by namespace.

Signed-off-by: Yannick Schaus <github@schaus.net>
2023-06-15 20:16:14 +02:00
J-N-K
885a8548c8
Improve community marketplace addon handler (#3641)
Allow unusual jar naming convention

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-11 22:36:34 +02:00
J-N-K
7e734b8540
Fix AuthFilter service declaration (#3651)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-11 21:22:26 +02:00
GiviMAD
e3396c9477
[websocket] Allow registering websocket adapters (#3622)
* [WebSocket] Allow register websocket handlers

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-06-10 15:35:23 +02:00
Florian Hotze
be7488958d
[sse] Add type information to state event (#3647)
* SSE Item state stream: Provide state type

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

* Add comment for method source

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-08 14:31:34 +02:00
openhab-bot
5550ea79b2
New Crowdin updates (#3639)
* New translations audio.properties (Romanian)

* New translations addons.properties (Romanian)

* New translations i18n.properties (Romanian)

* New translations network.properties (Romanian)

* New translations marketplace.properties (Romanian)

* New translations validation.properties (Finnish)

* New translations scriptprofile.properties (French)

* New translations scriptprofile.properties (Slovenian)

* New translations validation.properties (Hebrew)

* New translations validation.properties (Polish)

* New translations validation.properties (Slovenian)

* New translations hli.properties (French)

* New translations hli.properties (Polish)

* New translations automation.properties (Hebrew)

* New translations automation.properties (Polish)
2023-05-29 14:26:59 +02:00
openhab-bot
3e8905bcb7
New Crowdin updates (#3638)
* New translations lsp.properties (Italian)

* New translations hli.properties (Italian)

* New translations addons.properties (Finnish)

* New translations automation.properties (Italian)

* New translations LanguageSupport.properties (Portuguese)
2023-05-28 13:20:05 +02:00
J-N-K
88bb76c21c
Add event information in rules for time, manual and RunRuleAction trigger (#2965)
* Add event information for time triggers

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-28 10:15:16 +02:00
J-N-K
d34b9164f7
Trigger immediately when start level already reached (#3278)
* Trigger immediately when start level already reached

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-28 10:14:03 +02:00
J-N-K
86abf68727
Fix build (#3637)
copyright outdated

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-28 09:23:24 +02:00
J-N-K
796f66a2fa
Add a ScriptEngineFactory bundle tracker (#3275)
* Add a ScriptEngineFactory bundle tracker

The `ScriptEngingeFactoryBundleTracker` tracks all bundles that provide `ScriptEngineFcatory` capabilities and sets a `ReadyMarker` if all of them are activated.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-27 21:48:16 +02:00
jimtng
6bb15b806c
Add getAllStatesSince() and getAllStatesBetween() to PersistenceExtensions (#3466)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-05-27 21:33:48 +02:00
J-N-K
7843b6872a
Add group name to GroupStateTriggerHandler (#3536)
* Add group name to GroupStateTriggerHandler

When triggering on state change/update of group member, the group is not available in the rule context (because the event is the `ItemStateChanged/UpdatedEvent` that caused the group to change/update. This adds a new element `triggeringGroup` to the rule context.

This is useful for generalized rules that trigger on different groups.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-27 21:30:34 +02:00
J-N-K
ed392eec86
[rest] Add endpoint for UoM information (#3611)
* [rest] Add endpoint for UoM information

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-27 21:10:32 +02:00
J-N-K
ee6d7b39b2
Fix NPE in WatchServiceImpl (#3633)
It was reported on the forum that in some cases the hash is null.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-27 19:19:25 +02:00
J-N-K
c6a4dd2a31
Remove package support from FeatureInstaller (#3634)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-27 19:14:48 +02:00
Andrew Fiddian-Green
4d3535a411
[ColorUtil] optimise constants; hue overflow check (#3629)
* [ColorUtil] define constants; fix hue overflow

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-05-26 10:32:29 +02:00
J-N-K
cd06e6d324
Fix event ordering for item events (#3628)
Posting the `ItemAddedEvent` after notifying the listeners results in `ItemStateUpdated/ChangedEvents` before the `ItemAddedEvent` because the state could be altered by persistence services. This is at least unexpected and can be fixed by swapping the order.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-25 19:58:11 +02:00
J-N-K
0df4857b11
Move RuleHLI service from voice to system (#3625)
This is needed to clean-up UI. The categories should be used for add-ons while core services should use `system`.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-25 08:38:59 +02:00
J-N-K
9e088f8c62
Move LSP service from misc to system (#3626)
This is needed to clean-up UI. The categories should be used for add-ons while core services should use `system`.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-25 08:37:50 +02:00
J-N-K
8e81bebd3a
Fix exception in TransformationHelper (#3627)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-25 08:36:45 +02:00
J-N-K
cd7840dc63
Add dimension RadiationSpecificActivity (#3608)
* Add dimension RadiationSpecificActivity

This can be used e.g. for radon monitoring. The unit Bq/m3 was wrongly assigned to the dimension `Density` before.

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

* improvement

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-20 09:42:58 +02:00
J-N-K
d87007a585
Fix only first group config considered in persistence manager (#3618)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-18 11:00:45 +02:00
Hans Böhm
f92424c0b8
Add unit rpm (#3616)
Signed-off-by: Hans Böhm <h.boehm@gmx.at>
2023-05-17 11:47:53 +02:00
J-N-K
55d6d21f1f
Fix marketplace add-on services fail after upgrade (#3572)
* Fix marketplace add-on services fail after upgrade

A format change in the database (related to the introduction of addon.xml) leads to a non-migrateable and permanent error that floods the log with exceptions and malfunctions.

If such an error is detected, the database is purged and an error logged.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-13 20:55:17 +02:00
J-N-K
0f1f1729b7
Reduce loglevel in UnitUtils (#3609)
The log level was increased during the UoM refactoring but it turns out that a lot of code depends on failing silently. Therefore the log level is again reduced to DEBUG.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-13 20:50:53 +02:00
openhab-bot
08924232fc
New Crowdin updates (#3589)
* New translations DefaultSystemChannels.properties (Greek)

* New translations restauth.properties (Greek)

* New translations voice.properties (Greek)

* New translations scriptprofile.properties (Greek)

* New translations i18n.properties (Greek)

* New translations validation.properties (Italian)

* New translations validation.properties (French)

---------

Signed-off-by: J-N-K <github@klug.nrw>
Co-authored-by: J-N-K <github@klug.nrw>
2023-05-13 17:54:26 +02:00
lolodomo
e4e23e3ccb
Fix failed persistence tests (#3601) 2023-05-10 15:56:25 +02:00
J-N-K
9ef076dc6a
[uom] Add unit metadata for NumberItem (#3481)
* Add defaultUnit metadata for NumberItem

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-09 22:42:25 +02:00
J-N-K
67b80af872
Fix storing of StateDescriptionFragment in AbstractStorageBasedTypeProvider (#3598)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-09 18:10:47 +02:00
lolodomo
6af9870c50
Fix build (AbstractStorageBasedTypeProviderTest) (#3596)
Fix #3594

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-05-08 11:02:36 +02:00
J-N-K
8e1a2cfd0a
Add an AbstractStorageBasedTypeProvider (#3407)
* Add an AbstractDynamicTypeProvider

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-07 21:51:10 +02:00
J-N-K
960cf0c179
Improve thing updates (#3576)
* Improve thing updates

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-07 20:46:42 +02:00
J-N-K
2e00efc9bb
Allow managing persistence configurations and enable filters (#2871)
* Allow managing persistence configurations

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-07 20:33:28 +02:00
J-N-K
28ec419afd
Fix non-unique module handler identifiers (#3592)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-05 20:25:33 +02:00
J-N-K
d7ba8ad636
Improve message when rule action fails (#3593)
Also logs the full stacktrace at DEBUG level

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-05 20:16:55 +02:00
Jacob Laursen
c8464870bb
[ephemeris] Add support for overriding holiday definitions (#3573)
* Add support for overriding holiday definitions

End Danish General Prayer Day

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-05-02 09:11:59 +02:00
Kai Kreuzer
476975a012
Allow OnOffType as valid conversion types for HSBType and PercentType (#3588)
* Allow OnOffType as valid conversion types for HSBType and PercentType
* Add clause for supported PercentType

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-05-02 09:10:34 +02:00
J-N-K
cdab53b814
Change default imperial unit for length to inch (#3587)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-01 15:04:59 +02:00
Holger Friedrich
5e0a4ff25a
Reduce SAT warnings (#3586)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-05-01 09:08:26 +02:00
Holger Friedrich
a77a303dc3
Code cleanup: Use Java 17 features (#3585)
* Code cleanup: Use Java 17 features

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-05-01 08:27:15 +02:00
jimtng
58df2b272d
Remove GenericScriptEngineFactory (#3550)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-30 18:38:25 +02:00
Kai Kreuzer
ac0f512178
Consider auto-update veto from channel types (#3575)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-04-24 20:14:20 +02:00
jimtng
bff92e0349
Improve log message to identify profile's link (#3568) 2023-04-22 08:18:49 +02:00
GiviMAD
7cf090140c
[voice] Remove deprecated dialog methods (#3567)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-04-21 23:05:09 +02:00
Andrew Fiddian-Green
da5ac36a68
Improve precision of ColorUtil (#3542)
* [ColorUtil] add fine precision methods and tests
* [ColorUtil] set precision to 5

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-04-21 21:31:16 +02:00
jimtng
bc922022c3
[REST] List semantic tags (#3559)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-20 22:20:30 +02:00
Jacob Laursen
4349be6945
Redefine connection in addon.xsd (#3563)
* Redefine addon.xml connection
* Remove remains of author

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-04-20 20:36:44 +02:00
Wouter Born
3c6d855d4b
Remove redundant public and abstract modifiers from interfaces (#3560)
* Remove redundant public modifiers from interfaces
* Remove redundant abstract modifiers from interfaces

Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-20 20:22:58 +02:00
lolodomo
cfb2fa1be8
Icon server: remove old style request with the state in the URL (#3548)
The state is now expected to be passed only in the "state" parameter of the request.

As a result, the icon name can now contain hyphen(s).

Closes #3543

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-04-18 10:48:39 +02:00
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
Sami Salonen
fdea66ae75
[modbus] Fix possible NPE when connection construction fails (#3490)
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2023-04-15 16:29:36 +02:00
jimtng
7a9b76dfdf
Fix division-by-zero error in Persistence average (#3556)
* Fix division-by-zero error in Persistence average
* Add test

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-15 16:03:45 +02:00
jimtng
9e334497f9
Add methods to get Semantic tag synonyms and description (#3553)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-15 11:24:12 +02:00
J-N-K
9bbe4567f8
Fix wrong event subscription in GroupStateTrigger and ItemStateTrigger (#3533)
The `GroupStateTrigger` subscibed to `ItemStateEvent` instead of `ItemStateUpdatedEvent` (while `ItemStateTrigger` uses `ItemStateUpdatedEvent`), this is confusiing and results in different behavior of both triggers.

The `ItemStateTrigger` did not subscribe to `GroupStateUpdatedEvent` which results in the trigger not firing for group state UPDATES. This is wrong because it fires for item UPDATES and for both, group and item CHANGES.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-15 09:25:14 +02:00
J-N-K
016828ccee
Fix thing reloading from things file (#3526)
It was found that things from textual configuration are not properly updated if changes are only made in configuration or label of a channel. The reason is that for equality only uid and accepted item-type where checked.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-15 09:16:32 +02:00
J-N-K
5ca849ed88
Fix hidden files showing up in TransformationRegistry (#3532)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-15 09:11:03 +02:00
jimtng
3fc4a4c9d2
Improve logging to identify the offending link (#3554)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-15 09:04:37 +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
jimtng
5d46377d22
Fix IndexOutOfBoundsException in ScriptEngineFactoryHelper (#3549)
* Fix IndexOutOfBoundsException in ScriptEngineFactoryHelper

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-14 18:39:20 +02:00
jimtng
4f2af88e73
Add dynamic creation of semantic tags (#3519)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-14 14:35:43 +02:00
openhab-bot
9610404ceb
New Crowdin updates (#3541)
* New translations SystemProfiles.properties (German)

* New translations scriptprofile.properties (German)

* New translations scriptprofile.properties (Hebrew)

* New translations scriptprofile.properties (Italian)

* New translations scriptprofile.properties (Polish)
2023-04-13 20:06:03 +02:00
Mark Herwege
44a146f5a8
Add Input widget to main UI sitemap configuration and REST API (#3431)
* add input widget to UI SitemapProviderImpl
* inputHint in UIComponentSitemapProvider
* add input element to REST

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-04-13 20:04:47 +02:00
spacemanspiff2007
e535510483
Return item metadata by default (#3311) 2023-04-12 22:16:59 +02:00
jimtng
fbaf992666
Add dynamic scripting-language transformation service (#3487)
* Add dynamic scripting language transformation service

This replaced SCRIPT transformation with one specific to each language

e.g. JS, RB, GROOVY, etc.

Co-authored-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-12 21:56:06 +02:00
lolodomo
fa37a467ac
Extend sitemap syntax for icon (#3378)
The icon value can now contain until 3 segments separated by a semi-column.
First segment is the icon source. Example: oh, if, iconify, material, f7, ...
Second segment is the icon set (and can be empty). Example: classic
Third segment is the icon name (and can contain hyphen). Example: temperature

In case only two segments are provided, the first segment is the icon source and the second the icon name. "classic" icon set is assumed if icon source is "oh".
In case only one segment is provided, the icon source is assumed to be the openHAB server and its classic icon set and the value is then the icon name.

Ability to surround the value with simple or double quotes is kept for better backward compatibility.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-04-12 17:42:06 +02:00
lolodomo
953c08c367
Extend item syntax for category/icon (#3539)
The icon value can now contain until 3 segments separated by a semi-column.
First segment is the icon source. Example: oh, if, iconify, material, f7, ...
Second segment is the icon set. Example: classic
Third segment is the icon name (and can contain hyphen). Example: temperature

In case only two segments are provided, the first segment is the icon source and the second the icon name. "classic" icon set is assumed if icon source is "oh".
In case only one segment is provided, the icon source is assumed to be the openHAB server and its classic icon set and the value is then the icon name.

Ability to use a string containing anything has been removed.

Related to #3052

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-04-12 17:40:24 +02:00
J-N-K
643fe49f8a
Improve log messages in ItemStateConditionHandler (#3535)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-09 11:45:00 +02:00
rimago
26daabce9c
[persistence] fix time weighting in averageSince and averageBetween (#3439)
* fix time weighting in averageSince
* add getAllStatesBetweenWithBoundaries

Signed-off-by: Florian Binder <fb@java4.info>
2023-04-08 16:43:33 +02:00
jimtng
a39beed8dc
EventLogger minor refactor (#3523)
* EventLogger minor refactor

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>

* Fix null check

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-07 19:47:01 +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
8af908302b
Fix IllegalStateException in CommunityKaraAddonHAndler (#3528)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-07 09:44:28 +02:00
openhab-bot
4a82f5ba49
New Crowdin updates (#3509)
* New translations scriptprofile.properties (Italian)

* New translations messages.properties (German)

* New translations scriptprofile.properties (German)

* New translations scriptprofile.properties (Hebrew)

* New translations scriptprofile.properties (Polish)
2023-04-06 20:51:40 +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
J-N-K
d557a64532
Fix AbstractDependencyTracker (#3510)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-01 14:15:01 +02:00
J-N-K
8aa9e11342
Fix resource leak in SysfsUsbSerialScanner (#3513)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-01 11:32:53 +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
jimtng
003635dbfa
Fix Semantics default synonyms (#3511)
Fix incorrect Property id

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-01 09:32: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