* Upgrade commons-text to 1.10.0 (prevents CVE-2022-42889)
* Upgrade commons-lang3 to 3.12.0
* Remove commons-text, wrap from feature because it is embedded into the bundle
Signed-off-by: Wouter Born <github@maindrain.net>
* [mqtt.homeassistant] support non-RGB lights
dynamically decide which type of channel to expose. also send "down-typed"
commands to the proper topic. this also sets the groundwork for supporting
template and JSON schemas
Signed-off-by: Cody Cutrer <cody@cutrer.us>
* [tellstick] Avoid updates duplication after communication errors
Fix#13453
Do not register the same device handler many times as listener in the bridge handler
Unregister the device handler from the bridge handler when disposing device handler
HTTP timeout set to 15s
Remove the retry mechanism related to the timeout
Check HTTP status code
Fix discovery service unregistration
Log statistics about request/refresh durations and number of timeouts/errors
Change logging in case of exception
Also change few logs level (remove usage of logger.error)
Execute one refresh at bridge initialization and not 2
Small enhancement of the bridge/things status management
implement discovery service unregistration
Fix few code analysis findings
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* Use a set for deviceStatusListeners to avoid duplications
Review comment: @NonNullByDefault for TellstickHandlerFactory
Review comment: use ThingStatusDetail.CONFIGURATION_ERROR if no bridge
is defined
Review comment: use 1_000_000 instead of 1000000
Review comment: use Instant instead of LocalDateTime
Review comment: Thread.currentThread().interrupt()
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [jsscripting] Reimplement timers to conform standard JS
* [jsscripting] Name scheduled jobs by loggerName + id
* [jsscripting] Update timer identifiers
* [jsscripting] Update identifiers for scheduled jobs
* [jsscripting] Synchronize method that is called when the script is reloaded
* [jsscripting] Cancel all scheduled jobs when the engine is closed
* [jsscripting] Ensure that a timerId is never reused by a subsequent call & Use long primitive type instead of Integer
* [jsscripting] Use an abstraction class to inject features into the JS runtime
* [jsscripting] Make ThreadsafeTimers threadsafe for concurrent access to the class itself
* [jsscripting] Move the locking for `invokeFunction` to `OpenhabGraalJSScriptEngine`
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
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>