Commit Graph

2196 Commits

Author SHA1 Message Date
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
545ecfee21
Also adjust system channel types for unit (#3649)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-11 21:25:16 +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
J-N-K
f36ccea50c
Bump jose4j (#3645)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-08 13:26:43 +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