Commit Graph

2091 Commits

Author SHA1 Message Date
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
J-N-K
38a6d1e87b
# This is a combination of 2 commits. (#3486)
Bump commons-fileupload

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-04-02 12:09:35 +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
Wouter Born
b745d70d6d
Add issue and pull request templates and configuration (#3463)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-01 14:39:25 +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
Wouter Born
41ff466d65
Upgrade maven-surefire-plugin to 3.0.0 (#3514)
This fixes deprecation warnings when runnings tests with Maven 3.9.x:

`[WARNING] Parameter 'localRepository' is deprecated core expression; Avoid use of ArtifactRepository type. If you need access to local repository, switch to '${repositorySystemSession}' expression and get LRM from it instead.`

See: https://issues.apache.org/jira/browse/SUREFIRE-2154

Related to #3512

Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-01 13:36:43 +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
GiviMAD
4d0dba1abc
Fix OOBE in item metadata descriptions providers (#3488)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-03-30 20:33:21 +02:00
J-N-K
6294c48be4
Use try-with-resources on Files.walk/Files.list (#3504)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-29 09:54:41 +02:00
jimtng
c8cc05d24b
[REST] Sort profile-type resources by their label (#3491)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-03-29 08:49:04 +02:00
openhab-bot
8df40bc940
New Crowdin updates (#3489)
* New translations scriptprofile.properties (Hungarian)

* New translations voice.properties (Hungarian)
2023-03-29 08:47:45 +02:00
jimtng
30bbc95506
Clarify the script profile config description (#3506)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-03-29 08:41:38 +02:00
GiviMAD
b6c8aeaf10
Allow using quotes in metadata state/command description value/label (#3363)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-03-26 19:30:21 +02:00
Mark Herwege
850a9239de
Add inputHint parameter to sitemap Input element (#3418)
* Add inputHint param to sitemap Input element

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-03-26 11:15:56 +02:00
Andrew Fiddian-Green
4cbc0e613e
Integration tests for org.openhab.core.io.net (#3460)
* [org.openhab.core.io.net] add itests

Co-authored-by: Wouter Born <github@maindrain.net>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-03-25 17:44:15 +01:00
J-N-K
8494bf1199
[config] Fix ConvigValidationMessage in ThingManagerImpl (#3474)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-24 10:13:59 +01:00
openhab-bot
ae895790ac
New Crowdin updates (#3475)
* New translations automation.properties (Hebrew)

* New translations validation.properties (German)

* New translations validation.properties (Hebrew)

* New translations scriptprofile.properties (German)

* New translations scriptprofile.properties (Finnish)

* New translations scriptprofile.properties (Hebrew)

* New translations scriptprofile.properties (Polish)
2023-03-23 20:51:43 +01:00
openhab-bot
700b0e81ea
New Crowdin updates (#3471)
* New translations scriptprofile.properties (Danish)

* New translations scriptprofile.properties (Italian)
2023-03-22 19:50:43 +01:00
J-N-K
9289fd5a78
Bump spotless and fix formatting (#3469)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-20 23:14:59 +01:00
J-N-K
7bad9baa85
Introduce a profile for the generic SCRIPT transformation (#3292)
* Introduce a generic script profile

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-20 21:59:48 +01:00
jimtng
cb38d19360
Fix variable binding in ScriptTransformationService (#3464)
by setting all attributes before compiling

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-03-19 20:05:49 +01:00
jimtng
1e55914e55
Improve AbstractScriptFileWatcher initialization order and file handling (#3451)
* Remove initialImport from the constructor of AbstractScriptFileWatcher
- Calling initialImport inside the constructor may cause an NPE in child class.
* Refactor processWatchEvent in AbstractScriptFileWatcher
- Remove directory deletion handling and adapt test to check
for file removals instead.
- Include hidden files in deletions in case they were previously
loaded while not hidden, set to hidden, and then deleted.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-03-18 09:15:20 +01:00
mueller-ma
79c7ec8379
Add issue template for Sitemap changes (#3427)
This makes sure all maintainers are notified.

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
2023-03-18 09:12:51 +01:00
J-N-K
a32f1e0253
Add ColorUtil for better support of xyY conversion (#3434)
* Add ColorUtil for better support of xyY conversion

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

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-16 22:25:03 +01:00
lolodomo
52e36a0216
[sitemap] Add new color keyword "itemValue" (#3453)
Closes #3429

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-03-16 18:59:10 +01:00
GiviMAD
11e29c45f7
[voice] Fix default interpreter selection (#3458)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-03-16 09:05:10 +01:00
Andrew Fiddian-Green
8a0fdfc173
Add jetty-alpn-java-client dependency (#3455)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-03-16 09:04:22 +01:00
J-N-K
4390d515d6
Fix file processing in FileTransformationProvider (#3457)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-16 08:52:30 +01:00
GiviMAD
f529a7b77f
[CLI/voice] use parameters for cli voice commands startDialog and listenAndAnswer (#3253)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-03-16 08:07:06 +01:00
Jacob Laursen
3e1c0b3259
Fix InaccessibleObjectException (#3449)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-03-16 08:05:37 +01:00
J-N-K
c05fe8ad4d
Fix ready marker ordering on late subscriptions (#3454)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-13 21:15:55 +01:00
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
J-N-K
95e04fccbd
Allow inline scripts in SCRIPT transformation (#3249)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-12 12:00:06 +01:00