Question on how to use CoCoHue 5.x scene activator with Room Lighting

Can you document how to toggle a Hue scene with the Room Lighting app? I can't really make sense of how a scene can be activated, then not re-activated after turning off the group or lights. To add to the confusion, the language here and in the changelog indicate a scene cannot be "deactivated," but turning off the scene through the Hue app and clicking Configure on the Hubitat device page turns it "off."

This was my configuration that worked before updating.

This was an attempt at making it working after the update.

It does not work because the Scene does not remain "on" and so every attempt to turn it "off" just reactivates it. If I disable the "momentary" option on the Scene, I am then able to turn the Scene "off" but I cannot then reactivate it because it remains "activated."

There is no way to "turn off" a Hue scene in the Hue app. Can you share a screenshot of what you are doing?

What you can do, as I mentioned above a few times when mentioning this change, is turn off the room or zone (group) -- or whatever you actually want to turn off -- instead. (I suspect this is what you are doing in the Hue app, too; scenes have to be associated with a room or zone in the current app, and scenes are buttons you can press to turn on, or you can turn off the room or zone itself with the toggle at the top.)

What are you hoping to accomplish with a "Configure"? This is run on its own one time when the scene device is added, and one thing it does is set some default attribute values so that everything is populated with some values. One of them is "switch: off." Perhaps I should change this to not do anything if the attribute is already present. In any case, all it does is set this value -- it doesn't actually send anything to the Hue Bridge or therefore change anything about the scene (or room/zone itself), and it even tries to avoid generating an event on the Hubitat hub.

This is not a command I would run on a regular basis or automate with many (any?) devices.

That looks close! To make it work, I think you'll need to look into either the "Force" or " Activate even if already partially Activated / Turn Off even if already partially Off" options (either could work, depending on how much you want Room Lighting to really be in control of this setup). If you don't care about the state of the scene device on the hub (and I wouldn't, but I understand that people who want to activate them from a dashboard or something might), you could leave the momentary option on the scene disabled and the force option in RL as one way to always make it get activated. There are undoubtedly other combinations of settings that could also work.

I don't use Room Lighting with Hue scenes so can't speak from any practical experience here, just general experience with the app. Maybe someone else can share any tips that have worked for them if anyone else has a similar setup.

What you can do, as I mentioned above a few times when mentioning this change, is turn off the room or zone (group) -- or whatever you actually want to turn off -- instead. (I suspect this is what you are doing in the Hue app, too; scenes have to be associated with a room or zone in the current app, and scenes are buttons you can press to turn on, or you can turn off the room or zone itself with the toggle at the top.)

Yes, this is likely correct. I am indeed tapping the "off" switch for the room, after I activated a scene.

What are you hoping to accomplish with a "Configure"?

In the normal course of things, nothing. I have been using it to force the device state back to defaults while trying to figure out the Room Lighting configuration. Good to know it doesn't communicate with the Hue bridge.

Perhaps I should change this to not do anything if the attribute is already present.

Personally I'd prefer if this functionality was retained. It can be helpful for working through this kind of thing (in general, not specifically regarding CoCoHue).

I think you'll need to look into either the "Force" or " Activate even if already partially Activated / Turn Off even if already partially Off" options ... If you don't care about the state of the scene device on the hub you could leave the momentary option on the scene disabled and the force option in RL as one way to always make it get activated.

Unfortunately the various combinations of this don't appear to work. Here's what I've tried and the results. The devices and their configuration for the Room Lighting configuration are the same as in my second screenshot. Are there other configurations I might try that you think would work?

Means to Activate Lights Means to Turn Off Lights Set Switch State to Off After Activating On Activation On Turn Off Second Activation
Scene Controller: 2 pushed Scene Controller: 2 pushed 2 seconds Scene turns on; Group turns on after ~2 sec; Scene turns off after ~2 sec Scene turns on; Group turns off after ~2 sec; Scene turns off after ~2 sec Same as On Activation
Scene Controller: 2 pushed Scene Controller: 2 pushed Disabled Scene turns on; Group turns on after 2 sec Group turns off Scene not activated but should be
Scene Controller: 2 pushed; Activate even if already partially Activated Scene Controller: 2 pushed 2 seconds Same as #1 Same as #1 Same as On Activation
Scene Controller: 2 pushed; Activate even if already partially Activated Scene Controller: 2 pushed; Turn Off even if already partially off 2 seconds Same as #1 Same as #1 Same as On Activation
Scene Controller: 2 pushed; Activate even if already partially Activated Scene Controller: 2 pushed; Turn Off even if already partially off Disabled Same as #2 Same as #2 Same as #2

I don't use Room Lighting with Hue scenes

What do you use? I can't help but feel like some use cases may have been missed with this change, but perhaps understanding how you do this will help me "translate" the configurations.

Does your scene controller also have double tap or press-hold functionality? If so, Button Controller would make more sense than Room Lighting and allow you to utilize the first tap to turn on the scene and either double tap or press-hold to turn off the group/zone.

If the scene controller does not have that functionality, you could still use Button Controller or Rule Machine with some If-then logic:

Trigger: Button 2 pressed

Action:
If Living Room Group is off, then push Hue scene
Else, turn off Living Room Group
End-If

The device does have those capabilities, but for the sanity of others in my household I would prefer to keep the behavior/use the same. And for my sanity, I hope to continue using Room Lighting because it's relatively simple and I use it for more "complex" scenes. Rule Machine is an option, but it can be tedious. I'll go that route if there are no other options - thanks for the suggestions.

This gave me an idea: does using this state to indicate whether the RL instance is "active" (forget exactly what that option is called...) create the desired outcome?

I'm assuming the goal is that buttons 1-4 control Hue scenes in the Living Room with the goal being push the button to turn on the scene and push again to turn off the Hue light group? Is there any time where a person might turn on the scene by pushing button 2, then push button 1 to get a different color, and finally push button 2 again to go back to the original scene? I've got a couple of ideas that might work.

does using this state to indicate whether the RL instance is "active" (forget exactly what that option is called...) create the desired outcome?

Indeed it does. I also tried using the Scene for this, but it did not work. So, at least in Rule Machine, I can use Groups to manage this to some extent. I do have a couple other Room Lighting configurations that this may not work for, but I can poke around later; they are less important.

I'm assuming the goal is that buttons 1-4 control Hue scenes in the Living Room with the goal being push the button to turn on the scene and push again to turn off the Hue light group? Is there any time where a person might turn on the scene by pushing button 2, then push button 1 to get a different color, and finally push button 2 again to go back to the original scene? I've got a couple of ideas that might work.

Yes, that is exactly the behavior. Pressing the same button or button 4 turns off the activated scene. Pressing a different button deactivates the currently active scene, and activates a different one.

Is button 4 still working after this change? I'm assuming it is.

As for your other buttons, I've got an outside the box idea that might. You might want to look into the idea of Preset Off in Room Lighting and turn off the Hue Group there. I've whipped up a quick example:



The idea is basically, turning on Room Lighting will turn on the scene but do nothing with the group. I use Toggle in the Means to Activate so that RL turns on and off with button 1. When I turn off this RL, it will preset off and turn off the Hue Group associated with the scene, but do nothing to the scene device (since it is already off).

In the Means to turn off, I put the Hue Group so that RL always turns off whenever the group turns off regardless of how it was controlled (this is important when using the Hue App for off).

Thinking this through a little further, you might want to use a button activation for the scene in the table rather than a switch. This way RL knows it is pushing a button; though, I do not know if that matters.

I'm not 100% positive the above might work, but theoretically, it should.

I'm circling back to this. In thinking more about your goals, I wonder if something like the following will work:


In my sample, pushing button one turns on the scene. I've got the scene as a button so RL knows that it is just pushing and not needing to track state.

For Means to Turn Off, I put the Hue Group as turning off (both via switch and determining all lights are off). This should turn off RL when either Button 1, Button 4, the Hue App, or some other way turns off the group.

The key thing I think your original attempt was missing is tracking the Hue group state of being off.

1 Like

Thanks for this! I'm playing around with these ideas.

Is button 4 still working after this change? I'm assuming it is.

No, unfortunately. Any scene deactivation is not working to turn off the Hue lights/group, including just clicking Turn Off in the RL settings. While figuring this out I've been having to turn the lights off in the Hue app. But maybe that won't matter if these ideas work out.

Thankfully, this should be the easiest one to fix. Assuming you want button 4 to always turn off the Hue Group, just do the following:

1.) In the table select the Hue Group
2.) Under Means to Activate, select "Do not Activate"
3.) Under Means to Turn off, select button is pressed (number 4 button)
4.) Means to Turn off options, select "turn off even if partially off"

This will allow button 4 to allows turn off the Hue group. In your scenes, if you put the Hue group as switch turning off in the Means to Turn Off and Switches that determine all Lights are off, it will automatically turn off the scene RL.

Arg it's so close! Here's what I've found, between two RL configurations for this Scene Controller and the Living room Group:

  • If only button 4 is selected under Turn Off when buttons are pressed:
    • Pressing button 1 turns on that Scene, then pressing button 2 turns on that scene, then pressing button 1 turns off the Group. Same if I go 2/1/2 instead.
    • Pressing button 4 turns off the Group
  • If buttons 1 - 4, minus the button under Toggle, are selected under Turn Off when buttons are pressed:
    • Pressing 1/2/2 or 2/1/1, the scene changes on the second button press, but the third button press does not turn off the Group. A forth button press, e.g., 1/2/2/2 or 2/1/1/1 turns off the Group.
    • 2/1/4 or 1/2/4 does not turn off the Group
    • 1/4 or 2/4 turns on the scene on the first press, and the second press turns off the Group

So a bit of strangeness, but so so close.

What is the desired behavior? This seems to get what you want. Are you hoping to allow them to switch scenes at any time and only the second press of the button number would turn off the group? Basically, someone could switch as many times between 1 and 2 and only on a duplicated press would the group turn off. So, 1/2/1/1 would be the combination to turn off the group just like 2/1/2/2 would do it with the lights changing scenes twice?

That's correct - sort of treating it like each button is a single switch for a given "mode" and pushing a different button changes the "mode," I guess. Like-turns-off-like.

Thanks for the assistance, by the way. I got quite lost trying to figure this out.

I’ll have to think about this some more. Is 4 always off? If so, you might just want to simplify your behaviors:

Button 1 always turns on scene 1
Button 2 always turns on scene 2
Button 3 always turns on scene 3
Button 4 always turns off Hue Group and the other RL instances

This would at least minimize changes in behavior to just button 4 is off.

1 Like

That being said, if I was using a 4 button controller, You could activate more scenes by including a double tap for some of the buttons.
Unless I am missing something?

Correct; however, that is not what @aaron4 wants. He is trying to keep it simple with just a single press. Adding double press or press and hold would give a user more options, but this discussion is more about keeping it simple for his family.

Got it. Simple is good.