When ipv6 is configured on the network, Chromecast devices will randomly
return ipv4 and/or multiple ipv6 addresses during mdns discovery.
This would trigger a thingUpdated call which will call dispose/initialize,
causing the thing to go offline/online.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
* [nanoleaf] More robust caching of layout
This is a bugfix/enhancement to make sure the caching of the layout
(to save it from being recalculated) works better:
- Only save previous layout if indeed painted
- Only save layout from the layout update, not the display state
- Recalculate anyway if current state is null
* Bugfix: Update colors
When Stefan runs, the getBridge() returns null, when Jørgen runs, is doesn't. But it isn't needed, because we
are already in the handler, so just call own methods.
Improvement: Less draws when updating colors
Instead of drawing the picture for each panel (which gave a cool effect), draw only once when we have parsed all color data.
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* Allow handling of QuantityType for color temperature channel
* Fixed log messages and reduce log level.
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* [jdbc] Update org.xerial/sqlite-jdbc to 3.40.0.0
Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Kai Takac <kai.takac@gmail.com>
Using these Markdown tweaks a small intro will show in Main UI instead of emptyness and a "more" button.
Signed-off-by: Wouter Born <github@maindrain.net>
* New translations knx.properties (German)
* New translations yamahamusiccast.properties (German)
* New translations hdpowerview.properties (Danish)
* New translations jsscripting.properties (Danish)
* New translations chromecast.properties (Italian)
* New translations sonos.properties (Italian)
* New translations exec.properties (Italian)
* New translations knx.properties (German)
* New translations jsscripting.properties (German)
* New translations yamahamusiccast.properties (German)
Slightly change wording of docs related to localSourceAddress to avoid
address conflicts during initial setup.
Add remark about knxd.
Fixes#13602.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Some add-ons use `---` separators which causes issues when rendering the documentation in Main UI.
Fixes#13953
Signed-off-by: Wouter Born <github@maindrain.net>
* [rrd4j] Error handling for broken rrd4j files
Catch exceptions thrown by getDB(..) and print the name of the affected
database file. This allows to identify a broken rrd4j file.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* Implement Authentication (WIP)
* Validation Code accepted
* Refactor session state
* RefreshClient working
* Implement session persistence in openhab store
* Integration in binding
* Remove persistent cookies, which break authentication
* Bugfixing
* Add code configuration to UI
* Improve documentation, error-handling and cleanup
* Rework auth order
* Rework auth process
* Add 2-FA-auth to documentation
* Set bridge to online if data refresh works
* Case-sensitive rename ICloudAPIResponseException
* Include authentication in refresh flow
* Fix regression for data not being updated
* Fix typo in i18n props
* Fix review and checkstyle.
* More javadoc, new RetryException
* Introduce @NonNullByDefault
* Introduce server for RetryException, add NonNullbyDefault, fix warnings
* Rework for contribution, e.g. null checks, ...
* Fix checkstyle
* Move JsonUtils to utilities package
* Async initialize bridge handler.
* Report Device OFFLINE if Bridge is OFFLINE
* Set bridge thing status to UNKOWN in init
* Move refresh init into async init
* Cancel init task in dispose
Also-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
* [jsscripting] Extend synchronization to common ScriptEngine methods
This extends the multi-thread synchronization to "eval" and "invokeMethod" and moves synchronization for "invokeFunction" to the DelegatingScriptEngineWithInvocableAndAutocloseableAndSynchronization class. Fixes the multi-thread access requested warnings described in the community (https://community.openhab.org/t/openhab-3-4-milestone-discussion/138093/130) and related to https://github.com/openhab/openhab-core/pull/3180.
* Revert "[jsscripting] Extend synchronization to common ScriptEngine methods"
This reverts commit aadd21e45879c10aad29bf279ddbb0afd789b0aa.
* [jsscripting] Extend synchronization to common ScriptEngine methods & Switch to ReentrantLock
This extends the multi-thread synchronization to "eval" and "invokeMethod" and moves synchronization for "invokeFunction" to the InvocationInterceptingScriptEngineWithInvocableAndAutoCloseable class.
The synchronization mechanism changed from using synchronized to using a ReentrantLock together with catch_finally to avoid having deadlocks when an exception is thrown.
Fixes the multi-thread access requested warnings described in the community (https://community.openhab.org/t/openhab-3-4-milestone-discussion/138093/130) and related to https://github.com/openhab/openhab-core/pull/3180.
* [jsscripting] Reduce compiler warnings
* [jsscripting] Replace finally blocks & Wrap returns in afterInvocation
* [jsscripting] Fix deadlock caused by NoSuchMethodException in Invocable interface methods
During testing my latest changes, I noticed that there is a deadlock when invokeFunction or invokeMethod are called on a non-existing method.
This happens because the NoSuchMethodException keeps afterInvocation from running and therefore the lock never gets released.
* [jsscripting] Also rethrow NPE & Fix PMD warnings/errors
* [jsscripting] Wrap and rethrow other exceptions instead of returning them
* [jsscripting] Address review comment from @jpg0
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
* New translations boschshc.properties (Italian)
* New translations ecowatt.properties (French)
* New translations nikohomecontrol.properties (Dutch)
* New translations systeminfo.properties (Dutch)
* New translations upnpcontrol.properties (Dutch)
* [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>