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

This is what I do with my Hue Tap Dials. I do also use double taps and long holds, but these are for blinds and mode changes.

1 Like

Yeah that is ideal, but that needs to be balanced with the Room Lighting configuration. I'm considering something like "any double-tap on any button on the room's scene controller turns off the room."

I am curious - I think this is a question for @bertabcd1234. Somewhere in [RELEASE] CoCoHue: Hue Bridge Integration (including scenes!) - #1344 (if I recall) I read that the removed complications in CoCoHue relate to inferring what the correct behavior is when a Scene is "turned off." Is it possible the "turn off" behavior can exist without the complications by requiring explicit configuration options instead of inferring? For my specific situation, it would be convenient to configure "when this scene "turns off," turn off Group "living room."

This isn't impossible, as older versions did more or less this, but it is complicated for reaosns I have discussed before. The biggest such reasons is that Hue itself has no concept of "turning off" a scene. They are only things that can be activated. If it did, this would be a lot easier. My recommendation is to actually do what you want instead, likely turning off a group (room/zone) or light instead.

Older versions worked around this by looking at what group a scene was associated with, or what kind if not (there were two kinds of scenes). This became harder to maintain when dealing with two API versions as the integration now does. It is also likely to create unexpected results, even on versions where it "worked," if you changed lights associated with a light scene. This is a mess I wish I never waded into, and I addressed this with the breaking change in 5.x.

If version 4.2 continues to meet your needs, you can stay on that version. However, it does seem like your outcome should be possible on 5.x by using either the scene or group device, depending on what automation you are creating...so what's wrong with that setup, I don't know but do think tinkering with app options for those automations should let you do it.

1 Like

Thanks for responding.

so what's wrong with that setup

The hurdle I'm running into is that in Room Lighting "toggle" behavior where "on" turns one thing on (the Scene), and "off" turn another thing off (the Group) is apparently challenging. On 4.2 "deactivating" the RL "turned off" the Scene (through inferring the Room and turning that off). The difference in RL is that it's toggling a single thing and isn't aware of what's actually happening behind the scenes. So ... still have some toying around to figure out the right magical incantation with RL.

I think you can more or less get the scene on/off functionality back in Room Lighting by following the "Advanced Uses of Indicator" section. Then you could layer it into a second Room Lighting instance via the activator.

If you utilize both Room Lighting and Rule Machine, I think I have way to keep the same functionality. It's not the cleanest of implementations, but it should work. First, for Room Lighting, just keep it simple. Have the button activate the appropriate scene. Make sure to select "Activate even if already Activated" in the options. For Means to Turn off, have button 4 from the scene controller and the Hue Group switch turning off selected.

Now, for Rule Machine, we can "hack" the button press to keep the consistent behavior. Basically, you'll need three rules (buttons 1-3; make sure to select the option that only one instance of the rule is running at a time) that look like:

Trigger:
Button 1 is pressed

Action:
Cancel Rule Actions: Cancel rules for buttons 2 and 3
Wait for Event - Button 1 is pressed
Turn off Hue Group - delay 5 seconds

With the above, any time button 1 is pressed, RL will turn on the scene and Rule Machine will trigger. The first action cancels any Waits in the rules for Buttons 2 and 3. Then, the rule waits for the same button press again before turning off the Hue group (the delay is to prevent a Race Condition with RL).

It's not elegant, but should get you the desired behavior. Honestly, I'd look to either simplify this (Buttons 1-3 = scenes; Button 4 off) or implement double press to turn off. If you go the latter, I think you'll find Button Controller to be a better app than Room Lighting for this setup.