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
Add support for Scenes in OpenHab #1528
Comments
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/scenes-openhab-vs-home-assistant-in-2022/138782/24 |
I argue that no changes to openHAB core are required here and that this issue should be transferred to openhab-webuis. From the core's perspective, there is nothing distinctive about a scene compared to a UI rule consisting of just Item Actions. A scene is just a list of Items and what they should be commanded to when activated. We already have a way to do that. The only thing missing is the UI to make defining them easier. |
|
I have read the forum thread and the discussion here. And I have some questions:
Regarding transitions: It's nearly impossible to do that as a generalized concept. There are so many corner cases where the behavior is unexpected or unintuitive. I have tried that when developing DMX binding and I still think it's not ideal - and that is only one technical solution. There has been some discussion in the past which are related to that. IIRC @cdjackson proposed extending |
Again it's not about the list - it's about the editor. One page that has controls to edit all the items part of a scene and that is the value that the other systems I included have. I don't see how a rule editor would be retrofit to do this specific use case. Otherwise, you can always code scenes manually in any language and enter manually RGB values for your theme.
That was an example on how rules would be applied to locations - but I was thinking the group would be the most intuitive target. I want to add that @rkoshak had a very important point in the thread about educating the users. I'd be concerned that doing everything in rules will complicate the whole UX for new users. Most users will know scenes from other systems. |
I think you are making a false assumption. No one is arguing to retrofit or modify the existing rule editor at all. What I at am saying is to create a new dialog to create scenes. In the core, it creates a rule like any other but the dialog itself is optimized in all the ways you describe, just like the dialog/editor to created a rule from the Scripts page is different and optimized for that case. And the only things required here are additions to MainUI. No changes to core are required.
I think that's a general limitation of the semantic model in general. But in this particular case, I'd put that scene in the top level of your house since it applies to the whole house. I do something similar for things like the outside temperature, home/away status, etc. But this also raises another interesting idea. What if these scenes were made available from and perhaps even could be scheduled from the Schedule page. That would be pretty cool. But, given that the same over all problem exists for Items, any alternative solution to this cross cutting problem would best be solved in adjusting the semantic model itself so both can benefit. To summarize what I propose:
That seems to address all the issues except transitions (which are not feasible for the reasons @J-N-K describe). And everything above is 100% implemented in the UI. No changes to core are required so I still maintain this issue is in the wrong repo.
You assume the current UI. You assume we do not introduce the word nor the concept of "Scene" to OH. Neither of which are being argued for. Yes, we should have something called a "Scene" and yes we should have a custom screen to define them to limit the clicking and complexity. But I am vigorously arguing that "Scenes" are not something new and completely different from rules. A "Scene" should be documented, presented, and described as a special case of rules. And no changes to core are required to support them, just as there are not changes to core required to support Scripts or Schedule. And while some users have exposure to the concept of scenes from other systems, exactly what a "scene" means and what it can do is different between almost all of them. |
@kaikreuzer This also need to be transferred to ui, can you do that? Thanks. |
Following up on the debate on this thread
Scenes
Definition
A scene is a preset that will change all items that are effected, so if you set a scene in a room, all lights in that room will be changed to the settings of that scene.
Scenes in Hue
Scenes is the main user flow in the Hue interface. Other features such as triggers, buttons and other integrations are secondary in the user interface.
Scenes in Home Assistant
Since version 0.15, Home Assistant has a support for scenes. See this link for more details. A scene in HA has a name, icon and a series of entities. Each entity in each scene has any number parameter values.
HA also supports transitions for scenes to gradually transition the values when possible. HA enables to create snapshots of multiple entities into a scene using their scene service.
To clarify some of the debate in the thread above, the HA concept and features don't seem to be debated by users in their github.
Implementation
Rules
A series of addon Widgets provide multiple features to support scenes. See this
Pros:
Cons:
Core OH Addition
If OH did follow the HA model - scenes can be added in the core model.
Scenes could be applied at the group level and provide a way for a group to switch between multiple scenes.
livingRoomLights.SetScene("Morning")
Pros:
Cons:
Other considerations
One additional consideration for implementing rules would be to integrate with existing scene systems. Almost every light system already have their own built-in scene support, it would be nice if the API could leverage them transparently:
livingRoomLights.SetScene("Morning")
would call scene "Morning" inside my Hue lightsThe text was updated successfully, but these errors were encountered: