* Optimize initialization of shades.
Fixes#12071
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Avoid hashmap reallocation during initialization.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* [hdpowerview] refactor enum constant names
* [hdpowerview] add support for blackout shades
* [hdpowerview] unit tests for capabilities 8 & 9
* [hdpowerview] delete no longer valid comment
* [hdpowerview] blackout shade position is never UNDEF
* [hdpowerview] updated read me
* [hdpowerview] refactor unit tests into two classes
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* Add support for repeaters.
Fixes#12060
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Simplify thing type filtering.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Improve robustness of configuration ID validation/initialization.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Convert repeater-identify to command channel.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix logged warning.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Skip unneeded bridge status logic.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Skip redundant logging.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix chanenl type label for blinking enabled.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Extract dynamic channel creation to separate classes.
* Avoid double list allocations.
* Add test coverage for scenarios with no channels built.
* Extract common builder stuff to super class.
* Fix grammar.
* Reduce constructor access modifiers.
* Removed unneeded this keyword for protected method.
* Fix null annotation issues.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add support for calibrating a shade.
Fixes#11767
* Fix startup problems by decoupling capabilities cache from updateSoftProperties.
* Minor refactoring of capabilities and shade id handling.
* Dispose faster/safer by killing any remaining tasks.
* Set shade thing status to UNKNOWN until we receive any data for shade.
* Fix position update glitch after setting position.
* Remove unneeded catch after shade id refactoring.
* Document return values in Javadoc.
* Avoid logging InterruptedException during dispose.
* Add calibration example item.
* Reduce nesting.
* Add myself as reviewer for binding.
* Add Andrew Fiddian-Green as reviewer for binding.
* Handle JsonParseException.
* Fix alphabetic order.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix SAT warnings about missing @NonNullByDefault.
* Move part of firmware JSON response validation to HDPowerViewWebTargets.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add support for enabling/disabling automations.
Fixes#11516
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix class description.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Document automation channel and channel groups.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Update scene example in documentation.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Consolidate method for getting channel map.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Extract channel updating from data fetching methods.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Draft implementation of better automation description.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Simplify and optimize building weekday string.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Further simplify building weekday string.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Update scheduled event channels when modified.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Update scene channels when modified.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Update scene group channels when modified.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix cache synchronization during initialization.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Reduced code duplication.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Shorten time formatting.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Danish translations for dynamic channels.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Simplify, optimize and fix dynamic channel creation.
Channel order is now preserved when updating an existing channel.
Scenes and scene collection are sorted correctly.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Provide backwards compatibility for deprecated channels.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Document purpose of createDeprecatedSceneChannels.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Cleaned up poll method for improved readability.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix potential race condition when initialize() is called while updating channels.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add support for scene collections.
Fixes#11533
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add unit test for parsing of scene collections response.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add default i18n properties file.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix CAT: File does not end with a newline.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Update documentation with scene collections.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix CAT: File does not end with a newline.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix formatting.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix CAT: File does not end with a newline.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Split offline tests into separate distinct tests.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Increase test coverage for scene/scene collection parsing.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Internationalization of dynamic scene/scene collection channels.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Rename scene collections to scene groups.
Renamed for all user-oriented texts/references to be consistent with now abandoned feature of the PowerView app.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Change custom text keys to not collide with framework.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Avoid multiple thing updates.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add missing label/description texts for secondary channel.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Remove unneeded @Nullable annotations.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* [hdpowerview] get secondary shade position value was inverted
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [hdpowerview] remove testing Jar from PR
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* Add Hub configuration option hardRefreshBatteryLevel for refreshing battery status more frequently.
* Explicitly update battery channels to Undefined when data is missing or invalid.
Fixes#11259
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add new batteryVoltage channel.
Fixes#11154
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix documentation for lowBattery.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Organized channels into two groups: Shade and Battery.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Revert breaking change.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* [hdpowerview] refactor from jax-rs to http client
* [hdpowerview] adopt proposals of code reviewer
* [hdpowerview] adopt additional proposals of code reviewer
* [hdpowerview] provide exception class name
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>