Anything planned to capture/select scenes?

I was wondering if there is anything planned to capture scenes (=settings) for multiple lights and select them. My understanding right now is that you need to manually hard code values in rules to do that.

Been wondering about this feature because OpenHab can read the colors properly on my lifx lights and it sounds that it wouldn’t be a stretch to capture/set a group of items.

What do you mean?
Many Z-Wave devices support scenes.

My lifx and other wifi based lights do not support scenes natively, it is the app that drives the color/intensity. So all the solutions so far consist of writing multiple switches and rules to set settings for a series of lights. It would be nice to have something built-in openhab to do that.

Welcome to openHAB!

I agree with Bruce that your post is a little vague. If I understand correctly, you want to set your lights manually through the Lifx app, and then store those values in openHAB?

I doubt you’ll see that appear as a built-in feature, but you can accomplish it with rules and items.

For each scene, you would need to define an item for each variable you want to “save”, an item that triggers the scene, and an item that saves the scene. Then you’d need two rules: one to save the scenes, and one to send the saved commands to your actual devices.

OpenHAB is designed as a general purpose toolbox. It can utilize a device’s built-in features or you can likely configure openHAB to do any complex processing you desire.

I do like the idea of the openhab framework being extended to make setting up scenes quicker as it is a common thing to want. Fingers crossed this becomes a reality in openhab 3.

For now there is this guide and video.

That’s an option. I also could configure all the lights manually in openhab with the sitemap controls.

But rules and items don’t really cut it if you consider > 2 lights and > 2 “scenes” that’s getting a lot of combinations to manually code. If the framework had that built-in you could ideally do something like

  • lightGroup.setScene(“evening”) (in a rule)
  • openhab would have a persistent storage for scenes - and load/store all settings for each item
  • I guess you would need some other controls to capture settings for “evening”

Actually, if you build it the way I’m thinking, adding a new scene would be as simple as cloning/renaming your item set and rule logic whenever you need to add a scene. Then you just have to store the values you want and you’re good to go.

What you described in your second post is pretty much what I suggested (based on you saying that you want to “capture” scenes in your original post). It’s just that instead of having a built-in function, we’re using rules.

This is, in large part, how openHAB works. We rely on developers to integrate the devices and services, and then we have fun figuring out new and intersting ways to combine those devices (and hopefully share those solutions with others).

I would say that the framework is providing for this through rules, which enable us to build features that are specific to our unique needs. If something can be accomplished with rules then I don’t see as much need for a defined feature that will work for some and have limitations for others.

Please note that I’m not saying “openHAB shouldn’t gain features”. I’m grateful for any work that our volunteer developers do to enhance the system. I’m just saying that that you don’t have to hope/wait for a developer to take an interest in the idea. It’s something you can do right now if you want to, and that’s the beauty of openHAB.

Actually this is possible with rules even for a lot of lights and scenes. Here you can find an example I realized for several rooms in my home with just 1 rule to load and 1 rule to save scenes. It’s working well for years now and extending the scenes with a new light or new room is really easy

1 Like

“Scenes” mean many different things to many people - it’s a widely used term in different systems and often with different concepts. I’d agree with most of the comments above - Rules are the way to manage scenes in OH and should allow you to do most things.

While I fully agree that there are many things that can be done now with the power of rules, and this is certainly the preferred and obvious way to implement “scenes” - there’s some that can’t be done - or at least can’t be done well. Unfortunately, groups / scenes is one area that falls down in OH since we can’t group items together into groups that bindings have visibility of.

Why is this important? Well, often when you set a scene, you want to set a bunch of lights to the same level - possibly with other actuators such as lowering the blinds so that your TV room is as you want it. At the moment, this is either done as a rule, or a group item. Either way, the binding gets a bunch of separate commands coming in - with lights, this becomes very noticeable as 12 different lights in a room change - each 50ms after the other.

Many systems such as ZigBee (and all the systems that use ZigBee such as Hue, Ikea, etc…) and ZWave, and I think KNX and no doubt many others have methods to work around this by communicating to multiple devices at once (ie multicast), but it’s not really possible to use this in OH as the binding doesn’t know that the user wants to control a group.

So there are things that can be done now - much/most/all of what people want can be done with rules for sure, but there is certainly room for improvement in the user experience. Unfortunately though, I don’t think OH3 is likely to see any significant changes to the concepts we’ve had in OH1 and OH2 :frowning: .


Using scripted automation with Jython and the help libraries, which will eventually by available to install through the UI…

… and using this…

… you can simply add Item metadata to configure scenes. In OH 3.0, Item metadata can be configured through the UI.


This is a pretty common thing for people to want.

Back in the openhab 1 days, I created a rule for JSR223 in Javascript that allowed me to easily group any items together into a single “scene”. I used a simple array structure to do it. The target value for each item could either be a hard coded value, or it could be the name of another item in which case that item’s value would be used as the target value when a role was selected.

That was quite a long time ago and I’m not sure if the rule is usable in openhab today. If nothing else, it might give you ideas as you think about how to implement your rules. Ideally there would be a scene definition ability within openhab core, but with the variety of possible things people might want to do and the complexity of the ui to do those things, I could see it getting really messy…

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.