* [nanoleaf] More color for less network calls
This is a refactoring that moves the "get panel color" out of the
panel handler and into a separate class, with callbacks.
This makes us do only one REST call to get colors instead of one per
panel that is a thing. It also lets us retrieve colors for all panels -
also those that doesn't have a thing in OpenHAB,
While testing this out, I found a bug where solid colors set in the app
wasn't reflected in neither the controller nor panel channels, and that
should also be fixed now.
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* [homekit] delay starting until a particular StartLevel
instead of a blind "delay by seconds", the new default won't even
attempt to start until items are loaded (both file-based and UI-based),
with an additional config to let the user delay it any further (in
case they have items coming from JSR223 scripts that can't run until
at least SL20 anyway).
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [knx] Improve handling of serial gateways
Take over initialization logic from KNX IP gateway for serial gateway.
Properly re-initialize serial gateway after configuration changes done in UI.
Fixes#13892.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* State descriptions cleanup
* Converted channels to QuantityType, adjusted default translations
* Channel definitions and percent to QuanityType
* Changed default state descriptions from MB to MiB
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
* Add smoke detector service and add it to twinguard handler
* Add handler for smoke detector
* Support for smoke detector
added smoke detector device with SmokeDetectorCheckService
added SmokeDetectorCheckService to TwinguardHandler
added tests for smoke detector code
updated smoke detector code to latest boschshc version after cherry-picks of initial code from Christian Oeing
* re-generate i18n file, refactoring of smoke detector code to use abstract base classes
* Fix typos
* Add unit test for PlayPauseType commands
* Add unit test for SmokeDetectorCheckState
* Re-add null annotation
* Fix warning
Signed-off-by: Christian Oeing <christian.oeing@slashgames.org>
Signed-off-by: Gerd Zanker <gerd.zanker@web.de>
Signed-off-by: David Pace <dev@davidpace.de>
* [homekit] add BasicFan accessory
This is Fan v1. It's a subset of FanV2, except that Home allows you
to customize the icon to show a ceiling fan.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
just the sub-commands.
since the show command is already a "search", I didn't feel it's super
important to implement on that
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Lines is a Nanoleaf shape we haven't been able to test earlier.
Now we have tested them, and added support for painting them as well.
They do unfortunately not support touch gestures.
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* Update I/O Linc Documentation
The I/O Linc has a feature to match or invert the status of the contact with its control messages. The binding was written expecting the messages to be inverted. This is the opposite of how insteon recommends setting up the garage kit, and not described well by the original "Note" at the bottom of the section. Updated the instructions to specify the input is OFF when linking, and changed the note to better describe what happens if you don't. All based off of my own experience with the sensor: https://community.openhab.org/t/insteon-io-linc-garage-door-contact-slow-update/141469
* Nanoleaf Visual State fix
Fix the visual state channel name.
Also:
- Better name (from state to visual state) of the (new) channel
- Better logs which has helped us debug the problem
- Some more information on when it will work in the README
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* [homekit] persist all known accessories, to prevent loss of homekit information
See the readme for more details, but basically this keeps track of every
accessory we've ever created, and if it no longer exists, presents a dummy
accessory instead. If the accessory comes back, nothing is lost in the Home
app; if you meant to prune it permanently, you have to run a console command.
there are also several fixes to prevent presenting the device with missing data -
such as when the bundle stops, _don't_ explicitly remove the accessories until
the server has stopped.
we also don't increment the configuration version unless the configuration
has _actually_ changed (so removing and re-adding the exact same thing
won't trigger the device to reconnect). this even works across restarts
of the bundle, because we're persisting all the accessory information
for dummy information anyway.
* [homekit] Address review comments for accessory persistence
* update hap-java to 2.0.4
* remove unused local variable
* [homekit] ensure accessories are replaced in a batch
so that HAP-Java can maintain subscriptions with the new objects
* [homekit] log individual dummy accessories up to 5
* [homekit] Tweak readme for dummy accessories slightly.
* Be consistent with proper usage of useDummyAccessories.
* Make the sentence more clear about the effects of having dummy accessories.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* Added Constructor parameter to pass custom ScheduledExecutorService, that allows deterministic execution in test cases.
* Fixed some codestyles.
Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
In recent PR #13824, I added closing the context when the engine is closed, but core seems to have problems with that.
It logs: "[ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error removing ScriptEngine
java.lang.IllegalStateException: The Context is already closed."
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
To mitigate issue https://github.com/openhab/openhab-core/issues/3125
(common thread pool exhaustion when combining parallel streams with
synchronization or locks)
Signed-off-by: Sami Salonen <ssalonen@gmail.com>