* 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>