-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[hdpowerview] Add support for scene groups #11534
[hdpowerview] Add support for scene groups #11534
Conversation
I will have a look at this in the next couple of days. |
@jlaur I looked at your code, and FWIW it seems excellent to me; however ..
|
@andrewfg - thanks for having a look, any additional eyes and feedback is much appreciated no matter who has the stamp. :-) I actually only have a single scene collection as I can't figure out how to create new collections using the PowerView app. It seems that either it's not supported anymore (although I can see and edit the one I already have), or there is a limition of one collection (which would seems strange). Maybe I'll try to create one more using the API directly to at least verify the "limit of one" theory. |
I will do some tests on my hub to try and create such a scene collection. |
Hmm. I just tried the PowerView app on my Android phone (app version dated October 25, 2021). Since I did not have any Scene Collections before, there was nothing that I could edit. And it seems not possible to create a new one now (the app only has tabs for Rooms, Scenes, and Automations). However I will also try on the iPad app, in case it may be different. |
^ |
It was the same activity as scenes, but with a context menu for adding "Scene Groups", as they are called in the app. I can still see and activate my scene group using latest version of the app: It could be a bug or a decision to remove the feature. I'll try to reach out to them. Nevertheless, I think it's still worth having this feature, and it works with the scene group/collection I and other users might already have. Also it provides a kind of backwards compatibility that could be useful for fully supporting #11516 when users are still having some scene collections. Otherwise they would need to be filtered, so IMHO better to have direct support. I tried to fire up Postman to try to create a new collection manually, but haven't quite figured out how yet. GET /api/sceneCollections/27119/
As you can see, this entry doesn't mention the scenesIds it actually contains. So this must be somewhere else - and would be needed for creating a meaningful new collection. |
^ |
No, I don't have it either - anymore. But used to have it. |
Conflict has to be fixed. |
Fixes openhab#11533 Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
cff3f3c
to
3b27e46
Compare
@lolodomo - done, ready again. |
Renamed for all user-oriented texts/references to be consistent with now abandoned feature of the PowerView app. Signed-off-by: Jacob Laursen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have two comments, I will push them this evening. |
...ew/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewHubHandler.java
Outdated
Show resolved
Hide resolved
...ew/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewHubHandler.java
Outdated
Show resolved
Hide resolved
...ew/src/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewHubHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.hdpowerview/src/main/resources/OH-INF/i18n/hdpowerview.properties
Show resolved
Hide resolved
...binding.hdpowerview/src/test/java/org/openhab/binding/hdpowerview/HDPowerViewJUnitTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jlaur albeit rather late, but I think that the official name for 'Scene Collection' in the HD documentaion is/was 'Multiple Room Scene' -- see below.. |
@andrewfg - do you have a link for that documentation? In the API they are called scene collections, while they are called scene groups in the app. I decided to be consistent with the app as this is probably the only reference for users, i.e. users have most likely created the scene group within the app and now wants to trigger it from openHAB. I think what you are referring to is multiple room scenes, i.e. scenes including multiple rooms. They are still supported by the app, and it's just a specific kind of scene involving more than one room, so not to be mistaken with scene group. Maybe this feature was added later, thus more or less obsoleted scene groups. Scene groups are still kind of nice IMHO since they can reduce redundancy by having to create scenes for multiple combinations. |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/hd-powerview-binding-connection-error/130552/2 |
* Add support for scene collections. Fixes openhab#11533 Signed-off-by: Jacob Laursen <[email protected]> * Add unit test for parsing of scene collections response. Signed-off-by: Jacob Laursen <[email protected]> * Add default i18n properties file. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Update documentation with scene collections. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Fix formatting. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Split offline tests into separate distinct tests. Signed-off-by: Jacob Laursen <[email protected]> * Increase test coverage for scene/scene collection parsing. Signed-off-by: Jacob Laursen <[email protected]> * Internationalization of dynamic scene/scene collection channels. Signed-off-by: Jacob Laursen <[email protected]> * 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 <[email protected]> * Change custom text keys to not collide with framework. Signed-off-by: Jacob Laursen <[email protected]> * Avoid multiple thing updates. Signed-off-by: Jacob Laursen <[email protected]> * Add missing label/description texts for secondary channel. Signed-off-by: Jacob Laursen <[email protected]> * Remove unneeded @nullable annotations. Signed-off-by: Jacob Laursen <[email protected]> Signed-off-by: Nick Waterton <[email protected]>
* Add support for scene collections. Fixes openhab#11533 Signed-off-by: Jacob Laursen <[email protected]> * Add unit test for parsing of scene collections response. Signed-off-by: Jacob Laursen <[email protected]> * Add default i18n properties file. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Update documentation with scene collections. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Fix formatting. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Split offline tests into separate distinct tests. Signed-off-by: Jacob Laursen <[email protected]> * Increase test coverage for scene/scene collection parsing. Signed-off-by: Jacob Laursen <[email protected]> * Internationalization of dynamic scene/scene collection channels. Signed-off-by: Jacob Laursen <[email protected]> * 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 <[email protected]> * Change custom text keys to not collide with framework. Signed-off-by: Jacob Laursen <[email protected]> * Avoid multiple thing updates. Signed-off-by: Jacob Laursen <[email protected]> * Add missing label/description texts for secondary channel. Signed-off-by: Jacob Laursen <[email protected]> * Remove unneeded @nullable annotations. Signed-off-by: Jacob Laursen <[email protected]> Signed-off-by: Michael Schmidt <[email protected]>
* Add support for scene collections. Fixes openhab#11533 Signed-off-by: Jacob Laursen <[email protected]> * Add unit test for parsing of scene collections response. Signed-off-by: Jacob Laursen <[email protected]> * Add default i18n properties file. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Update documentation with scene collections. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Fix formatting. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Split offline tests into separate distinct tests. Signed-off-by: Jacob Laursen <[email protected]> * Increase test coverage for scene/scene collection parsing. Signed-off-by: Jacob Laursen <[email protected]> * Internationalization of dynamic scene/scene collection channels. Signed-off-by: Jacob Laursen <[email protected]> * 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 <[email protected]> * Change custom text keys to not collide with framework. Signed-off-by: Jacob Laursen <[email protected]> * Avoid multiple thing updates. Signed-off-by: Jacob Laursen <[email protected]> * Add missing label/description texts for secondary channel. Signed-off-by: Jacob Laursen <[email protected]> * Remove unneeded @nullable annotations. Signed-off-by: Jacob Laursen <[email protected]>
* Add support for scene collections. Fixes openhab#11533 Signed-off-by: Jacob Laursen <[email protected]> * Add unit test for parsing of scene collections response. Signed-off-by: Jacob Laursen <[email protected]> * Add default i18n properties file. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Update documentation with scene collections. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Fix formatting. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Split offline tests into separate distinct tests. Signed-off-by: Jacob Laursen <[email protected]> * Increase test coverage for scene/scene collection parsing. Signed-off-by: Jacob Laursen <[email protected]> * Internationalization of dynamic scene/scene collection channels. Signed-off-by: Jacob Laursen <[email protected]> * 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 <[email protected]> * Change custom text keys to not collide with framework. Signed-off-by: Jacob Laursen <[email protected]> * Avoid multiple thing updates. Signed-off-by: Jacob Laursen <[email protected]> * Add missing label/description texts for secondary channel. Signed-off-by: Jacob Laursen <[email protected]> * Remove unneeded @nullable annotations. Signed-off-by: Jacob Laursen <[email protected]>
* Add support for scene collections. Fixes openhab#11533 Signed-off-by: Jacob Laursen <[email protected]> * Add unit test for parsing of scene collections response. Signed-off-by: Jacob Laursen <[email protected]> * Add default i18n properties file. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Update documentation with scene collections. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Fix formatting. Signed-off-by: Jacob Laursen <[email protected]> * Fix CAT: File does not end with a newline. Signed-off-by: Jacob Laursen <[email protected]> * Split offline tests into separate distinct tests. Signed-off-by: Jacob Laursen <[email protected]> * Increase test coverage for scene/scene collection parsing. Signed-off-by: Jacob Laursen <[email protected]> * Internationalization of dynamic scene/scene collection channels. Signed-off-by: Jacob Laursen <[email protected]> * 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 <[email protected]> * Change custom text keys to not collide with framework. Signed-off-by: Jacob Laursen <[email protected]> * Avoid multiple thing updates. Signed-off-by: Jacob Laursen <[email protected]> * Add missing label/description texts for secondary channel. Signed-off-by: Jacob Laursen <[email protected]> * Remove unneeded @nullable annotations. Signed-off-by: Jacob Laursen <[email protected]>
Fixes #11533
Signed-off-by: Jacob Laursen [email protected]
The Hunter Douglas PowerView Hub supports two different scene concepts:
A scene collection is a collection of scenes and can be used to group multiple scenes and activate them all with a single click or automation. When this feature was available in the Hunter Douglas PowerView app they were called scene groups. This terminology it kept in user-oriented strings, while API name is scene collections.
This PR adds support for activation of scene groups. Scene groups will appear as channels the same way as scenes, like this: