* Fix wrong websocket topics
The topics of the websocket event did not follow the openHAB convention of starting with `openhab/` followed by the component.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* [voice] Add notification sounds to dialog processor
* [audio] add actions and commands to play melodies
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
So that they can vary their processing based on the item or channeluid itself,
instead of (or in addition to) solely on the prior states passing through it.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Reported on the forum. Due to selection of the `RoundingMode` instead of a `MathContext` the average calculation is returning unexpected results: 19.0 °C / 19.5 °C results in 19.3 °C (instead of 19.25 °C) which might be acceptable, but 19.5 °C / 19.5 °C results in 20 °C (instead of 19.5 °C) which is obviously not what we want or expect. Setting the `MathContext` fixes this problem. I also corrected the same calculation for non-dimensional groups.
Signed-off-by: Jan N. Klug <github@klug.nrw>
The `migrateThingType` call the managed thing provider directly instead of checking if it's actually a managed thing.
This check is done in the `thingUpdated` method. Changed the code so it makes the same call as in `thingUpdated`.
Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
* Bump commons-net from 3.7.2 to 3.9.0 in /bom/runtime
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Wouter Born <github@maindrain.net>
* handle entire directories being moved in and out of a watched script path
* ensure sorted scripts when ScriptFileWatcher restarts or new directories are added
Signed-off-by: Cody Cutrer <cody@cutrer.us>
When updating file-based script transformations used in item state-descripting a CME can occur during reload. This is fixed by using thread-safe implementation of `HashMap`.
Signed-off-by: Jan N. Klug <github@klug.nrw>
When writing tests and mocking time, it can be important that
execution_time match _exactly_ with what was sent to reschedule().
When re-calculating based on now and the expected remaining delay,
this might be off by a few milliseconds. We have the exact time
that was requested already, so might as well use it.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
this is a useful helper that can eliminate some complicated code elsewhere.
starting in SystemOffsetProfile. then I also want to use it in the homekit
addon.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* log full exception information when calling JSR223 scripts
The scripts are user code, so in order to help them debug their code,
the full stack trace is very useful.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Pattern %s will match <hue>,<saturation>,<brightness>
Pattern %hsb% will match <hue>,<saturation>,<brightness>
Pattern %rgb% will match <red>,<green>,<blue>
Related to discussion in openhab/openhab-webui#427
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* tweak ScriptedRuleProvider slightly
just extend AbstractProvider so that it doesn't need to re-implement
managing listeners
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* have ScriptedRuleProvider implement ManagedProvider
there's nothing that says ManagedProvider has to be backed by storage,
just that they should be able to add and remove elements
Since that's exactly what ScriptedRuleProvider does, might as well
have it conform to the interface.
Signed-off-by: Cody Cutrer <cody@cutrer.us>