Groups and Scenes

No. Group app and the virtual device it creates interact in specific ways to make the app function.

1 Like

Ok, is using an extra Simple Automation Rule for cloning the status the best way to accomplish this?

Simple Automation Rule

Or is there a better way?

I have done some investigations about issues specifically around Scenes and color bulbs. What I see is that setting a scene results in that two Driver functions are called in rapid succession in the device Driver, first the setColor message, and then the setLevel message.

The problem I see is that is seems that the bulb is missing the setLevel message, I guess the bulb is busy handling the previous message. I was wondering if bulking together the zigbee messages in a List state.cmds variable, and then using a runIn(...,...) function to pass the actual zigbee message to the bulb could do the trick. I haven't tested this, but have anyone tried this with a driver?

E.g. ( pseudocode below...):

def setLevel(value, transition_time=0) {
    state.cmds += zigbee.setLevel(value)
    unschedule(transmitZigbeeMessages)
    runIn(1, transmitZigbeeMessages)
}
def setColor(...) {
    ...
    state.cmds += zigbee.command(...)
    unschedule(transmitZigbeeMessages)
    runIn(1, transmitZigbeeMessages)
}
def transmitZigbeeMessages () {
    List cmds = state.cmds
    state.cmds = []
    return cmds
}

When Scene-1.2 sets a color bulb it sends a single command to the driver with hue, sat and level in the command -- the command is setColor(hue, sat, level, rate).

1 Like

yes, I noticed. But when the bulb is in CT mode it calls:

setColorTemperature(...)
setLevel(..., ...)

I had great success using:

def sendZigbeeCommands() {
    List cmds = state.cmds

    if (cmds != null) {
        state.cmds = []
       return cmds
    }
}

And then in the setLevel() functions I add:

def setLevel(value, rate=null) {
    log.debug "Set level $value, $rate"

    if (rate == null) {
        state.cmds += zigbee.setLevel(value)
    } else {
        state.cmds += zigbee.setLevel(value, rate)
    }

    unschedule(sendZigbeeCommands)
    runInMillis(100, sendZigbeeCommands)
}

And the same to setColor().

An example implementation can be found here:

Any chance we can get groups for other device types? In my case, I have curtains grouped together. I had to select them as dimmers in this app. The only issue with that is that within Alexa, I can't use the regular curtain commands e.g. "open curtains" or "open curtains to 45%". I have to say "dim curtains to 45%". Controlling the individual curtain works fine though in Alexa.

Thanks

I have a little issue with my scene, it activates if one of my devices in the scene activates. Is this how it is supposed to work?
My scene is simple:
Name: Movie Night
Set Denon AVR to on
Set Denon AVR to Chromecast input
Turn off Family room lights.

When I turn off the scene, I have a rule (scene turns off trigger) to turn on the family room lights.

However, if I just turn on the Denon AVR (without activating the scene) the scene becomes active and if I turn it off it turns off the scene, which turns on the lights (not intended). I would have thought that I could use devices individually outside the scene and only activate the scene when I wanted that intended behaviour.

Is this a bug or designed intent?

Please show the Scene setup page.

You mean this:
image

Yeah, but the whole page.

Is this readable?

What do you mean by the Scene becoming active when you turn on the Denon AVR? Does turning it on cause the Kitchen Nook to turn off ? Your Scene only shows those two devices.

I could try that out. Usually when I turn on Denon AVR (device only)
the light is already off. I notice in my dashboard when I turn on Denon AVR, that the Scene activator turns to on, and then turns to off when I turn off the Denon AVR. This triggers my rule to turn the Kitchen nook light back on after the scene turns off (which I want evenings when I'm done watching a movie. Give me a sec and I'll check out the light being on 1st.

Ok interesting...If the Kitchen nook light is on 1st and I turn on the Denon AVR, the scene doesn't activate and the light doesn't turn off. So, only if all the devices that are in the scene are set the way the scene is does the scene go to active...and thus when one of them deactivates then the scene is turned off.

So specifically:
Case 1:
Movie Night Scene = Off
Kitchen nook light = on
Denon AVR = Off
Transition Denon AVR to On
Scene = Off
Transition Denon AVR to OFF
Scene = Off

But:
Case 2:
Movie Night Scene = off
Kitchen nook = off
Denon Avr = Off
Transition Denon AVR = On
Movie Night Scene Tranistions to ON (likely because all the devices match that state).
Transition Denon AVR to Off
Movie Night scene transitions to Off.

Same holds true if I toggle the kitchen nook to on if the scene is on,
it will turn off the scene

If the Kitchen Nook is off and the Denon turns on, that means the Scene is active, since that's the definition of the Scene.

I would have thought scene state would have only been activated by the activator. I should be able to adjust individual devices outside of the scene, and only have the scene activate a certain device state if I explicitly activate it, Otherwise, you could randomly activate a scene unintentionally. ie if you want listen to music mid day.

I can work around it, just not how I would have thought scenes should activate