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>
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>
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>
* 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>
* 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>
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>
* Allow OnOffType as valid conversion types for HSBType and PercentType
* Add clause for supported PercentType
Signed-off-by: Kai Kreuzer <kai@openhab.org>
* Remove redundant public modifiers from interfaces
* Remove redundant abstract modifiers from interfaces
Signed-off-by: Wouter Born <github@maindrain.net>
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>
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>
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>
* 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)
* add input widget to UI SitemapProviderImpl
* inputHint in UIComponentSitemapProvider
* add input element to REST
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
* 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>
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>
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>
* 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>
* 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)
* 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)
* 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>
* 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>
Reverts the partially working Whiteboard config changes of #3252 back to a working implementation using the HttpService.
The configurable threading makes this a non-trivial Servlet for use with the Whiteboard.
Fixesopenhab/openhab-webui#1782
Signed-off-by: Wouter Born <github@maindrain.net>
Related to openhab/openhab-webui#1755
Related to openhab/openhab-android#3285
This sitemap widget is not documented.
It is not implemented neither in Android app nor iOS app.
It was implemented in BasicUI but was buggy.
Support in BasicUI has been removed.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
On Samba shares a single MODIFY event may result in different sequences of CREATE/DELETE/MODIFY events. Unfortunately this is not properly handled by the underlying library and we have to re-introduce our ugly workaround. The solution itself is a bit improved over the old one as it not only keeps the last event but determines the correct event by examining the sequence of received events.
Signed-off-by: Jan N. Klug <github@klug.nrw>
The rxtx serial port provider is now able to scan symlink in /dev/serial/by-id and use them as valid identifier.
Benefit : users won't have to fix the path of their USB serial device with udev anymore, they can now use the explicit and stable symlink directly.
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
[serial] Ability to use /dev/serial/ links
Revert previous commit (rewriting to use discovery serial service to provide the symlinks to all serial provider, and not only rxtx).
Workaround for the rxtx provider which can resolve symlink before using the native code (limit path to 80 char).
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Also makes sure the `checkPrerequisites` job can't crash by catching `RuntimeException` during processing.
Signed-off-by: Jan N. Klug <github@klug.nrw>
This service provides add-on information when debugging in Eclipse so it is possible to add Things based on the installed bindings and configure installed add-ons in the UI.
Replaces the Sample Add-on Service.
Also shows the "Add-on Management" configuration which allows for configuring if incompatible add-ons are included.
Signed-off-by: Wouter Born <github@maindrain.net>
* Sync runtime dependencies with Karaf 4.4.3, most notably:
* Jetty 9.4.50.v20221201
* Pax Logging 2.2.0
* Pax Web 8.0.15
* Use OSGi R8 as compile dependency
* Rework Servlets to use Http Whiteboard annotations in favor of proprietary `org.openhab.core.io.http.servlet` classes
* Resolve itest runbundles
Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Wouter Born <github@maindrain.net>
* [tts] Cache mechanism
Implements a cache mechanism for all TTS services.
Eviction policy is LRU mode.
This cache can serve several streams concurrently, for the same utterance, with only one call to the TTS. It doesn't wait for the stream to end and can serve data rapidly.
Cache size is a voice bundle parameter (10 mb default)
Closes#3039
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* iconcolor attribute added to all sitemap elements
This attribute was already available in syntax for the Image element but
was probably not used by any UI.
It is now available for any sitemap element and allows defining a color
for the widget icon based on conditional statements on the item value.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* New translations DefaultSystemChannels.properties (Czech)
* New translations addons.properties (Czech)
* New translations marketplace.properties (Czech)
* New translations restauth.properties (Czech)
* New translations voice.properties (Czech)
* New translations validation.properties (Czech)
* New translations validation.properties (Italian)
* New translations automation.properties (Hungarian)
* New translations automation.properties (Italian)
* Refactor ThingManagerImpl
This
- moves config description URI to type-base class
- decouples the thing manager from bundle loading
- makes sure that all thing/channel-types and config descriptions are available when the thing is initialized
- enables thing type updates
Signed-off-by: Jan N. Klug <github@klug.nrw>
* Overload Audio & Voice actions to support float in addition to PercentType for volume
* Align params in Audio & Voice actions to increase code readability
* Fix mathematical interval notation in string
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
* rework GenericEventTrigger and GenericEventCondition
fixes#3234
to make their interfaces and semantics match, as well as having a
well defined (and useful) way of defining topic filters
Signed-off-by: Cody Cutrer <cody@cutrer.us>
When calculating `.changedSince` the "then" state is queried via the `.historicState` method. Regardless of the `serviceId` used when calling `.changedSince` the historic state was always queried from the default persistence service.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* When parsing marketplace addons, if one fails, none is loaded. This change ignores those that fail.
Signed-off-by: Boris Krivonog boris.krivonog@inova.si
Some bindings that dynamically create channels (mqtt.homie) might create
a channel that declares itself as Number:Dimensionless because the
end-device metadata has a unit of "%". But a savvy user might want to
link that to a Dimmer or Rollershutter item depending on what the device
actually is. This actually works just fine since QuantityType (with unit
PERCENT) and PercentType implicitly convert between each other. Except
this odd compatibility code in CommunicationManager that tries to assist
bindings that _aren't_ QuantityType compatible. It assumes if the channel's
item type is a dimensioned item, that the actual Item is a NumberItem,
and casts without checking. All this does is checks for that case to avoid
a ClassCastException.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* Add an add-on service that provides add-ons in the addons-folder
* fix connection and countries
This is needed to show the add-ons from the addons in the UI.
Signed-off-by: Jan N. Klug <github@klug.nrw>