Avoid registering several times the same device status listener.
It is called by the thing handler each time the bridge status changed to ONLINE.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [kostalinverter] Fix for the Kostal inverter binding to work with
different firmware releases regarded to PIKO 10-20 Version 221004
This is the next version regarded to Closed PR #13464
* [kostalinverter] Changes done 20221019
Regarded to Thread.....
* Proper handling of InterruptedException
Also removbe a useless call to return
Signed-off-by: Örjan Backsell <orjan.backsell@gmail.com>
Co-authored-by: Laurent Garnier <lg.hc@free.fr>
* Do not append number when using real item names
* Extract getTableName to separate class
* Add initial test coverage
* Extract migration logic to separate class
* Support migration from real names back to numbered
* Simplify zero-padding
* Fix NullPointerException
* Fix MySQL compatibility when CLIENT_MULTI_STATEMENTS option is not set
* Add option for case sensitive table names
* Add real name with suffix mode for backwards compatibility
* Remove real name in lower case without suffix mode
* Map directly from item name to table name
* Fix ambiguous table name scenario
* Add additional testcase
* Add migration path for changed table prefix
* Drop items table when using direct mapping
* Add configuration note
* Fix table alignment
* Extend description as more migration paths are now supported
* Do not stop halfway through a migration
* For clarity, do not use abbreviation for operating system
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fixes#13640
Working with multiple Paradox panels
Tested with:
- rename things files;
- thing disable / enable on same instance of OpenHab;
- disable on one OpenHab instance > enable on other;
Everything works as espected.
All test passed even if no Login/Logout commands were sent to IP module
Signed-off-by: Silviu Chingaru <silviuchingaru@yahoo.com>
* Extract nested DTO's to separate classes
* Rename api to dto
* Move test classes into internal
* Finish moving of files and fix namespaces
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* [linuxinput] handle keys not known by libevdev
Previously if libevdev could not resolve a numeric event code to a
symbolic name the name "null" was used.
This is useless for the user and may lead to duplicate-channel errors if
multiple unknown keys are encountered.
Instead use the numeric code itself as channel name if no symbolic code
could be determined.
Reported-in: https://community.openhab.org/t/linuxinput-binding-and-mouse-capture/122612/8
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
* [linuxinput] add channel description
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
* add thing definition with ID "smart-plug-compact"
* add constant for thing type UID
* extract abstract implementation for devices with power switch and
energy monitoring
* let in-wall switch handler and smart plug handler extend the abstract
implementation
* register new handler
* add method with boolean parameter to fetch initial state actively
* make BoschSHCDeviceHandler abstract
* add documentation
* add unit tests
closes#13528
Signed-off-by: David Pace <dev@davidpace.de>
* Fix scheduling of thing and token update, tries to avoid service rate limiting. Added more logging. Added some missing null checks. Ensure recent data is fetched, not data from yesterday
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Updated to latest versio of API lib
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Added new channel waterconsumption_since_midnight that sums todays water consumption (same as in the Grohe app)
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Add more debug logging
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* More null checks, also set channels to Undef if a value is missing
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Fixed missing embedding of commons-text as it is a dependency of the api lib
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Refresh token 1 hour before expiry
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Re-login in case token refresh fails
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Factor in timezone when calculating consum since midnight
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Use QuantityType<Volume> for water consumption
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Minor
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* i18n of dynamic error messages
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* More i18n. Plus retry of failed refresh token - with a delay to possibly avoid rate limiting
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Adjust refresh token timeout to 5 minutes before expire. Also retry with username/pwd login if token login fails (could be an expired token)
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Clear old discovery results
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Fetch data further back to ensure battery device has been online
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Updated README with old data warning
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Typo
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Do not allow polling interval less than 900 as rate limiting most likely will block the calls
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Fix failed token refresh giving up
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Removed refresh token login webpage. Another attempt at handling token refresh
Signed-off-by: Arne Seime <arne.seime@gmail.com>
* Fix status detail
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Restore formatting
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix newly introduced warnings
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Remove redundant logging
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Arne Seime <arne.seime@gmail.com>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
So that other pieces of openhab can know what unit it's going to be,
without it having a value yet. Importantly, any necessary conversion
that need to be applied to the other portion of the state description -
min, max, and step.
See also https://github.com/openhab/openhab-core/pull/3132
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [jsscripting] Share the lock mechanism that was used only for rules
This change moves the lock object that was originally created for ThreadsafeSimpleRuleDelegate to OpenhabGraalJSScriptEngine to make share it across the whole engine.
* [jsscripting] Inject the lock object into the JS runtime
* [jsscripting] Update `setTimeout` & `setInterval` polyfills to enable threadsafety
* [jsscripting] Upgrade GraalJS from 21.3.0 to 22.3.0
* [jsscripting] Reduce compiler warnings
* [jsscripting] Update node version of frontend-maven-plugin
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
* Changed discovery to MDNS; added HTTPS handling; refactor HTTPClient to use jetty shared client
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* [homekit] increase flexibility of ColorTemperature
allow Number or Dimmer items, and mired or Kelvin units.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] Improve output of console's `homekit show` command
* include the full JSON from all the characteristics, so you can confirm
everything is configured correctly.
* only use simple class names; the fully qualified package is just a
distraction.
* show linked services if they exist
* include the class name of services, not just the GUID
Signed-off-by: Cody Cutrer <cody@cutrer.us>
If you have many instances, it can take a while. So stop all the
instances in parallel. Also, fix a race condition where the update
debouncer might get called again after being stopped, because the
change listener was deregistered _after_ the debouncer was stopped.
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* Options to control polling frequency and sleep mode
* Update documentation
* Fix request token expiration calculation and additional logging for tokens
Signed-off-by: Bill Forsyth <git@billforsyth.net>
* New translations airquality.properties (Italian)
* New translations airq.properties (Italian)
* New translations airvisualnode.properties (Italian)
* New translations androiddebugbridge.properties (Italian)
* [unifi] Fix PoE port mode for 24V
The value UniFi expects is actually pasv24. Tested with different UniFi controller versions.
* [unifi] Added Hilbrand as codeowner to UniFi binding
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
* [knx] Improve localization
- introduce localization of error messages
- add new strings for common exceptions
- provide helper functions for translation
- add test cases
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* [homekit] fix BooleanItemReader to work with DimmerItems
DimmerItems have a PercentType state, which is easily convertible
to OnOffType, but is not inherited from it. So take that into account.
i.e. a variable speed fan can use a single DimmerItem for both
ActiveStatus and RotationSpeed.
* [homekit] Document that Dimmer is a possible item type for several booleans
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [homekit] allow configuring maxValue on VOCDensity
the default of 1000 is quite low in reality. tested and confirmed
working with iOS 16
* [homekit] allow step value to be configured for VOCDensity
Signed-off-by: Cody Cutrer <cody@cutrer.us>
According to the add-on documentation the Derby driver is included which was no longer the case.
The derby version was also changed because 10.16.1.1 is for Java 17+.
Signed-off-by: Wouter Born <github@maindrain.net>