Commit Graph

2352 Commits

Author SHA1 Message Date
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
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