Should a group switch trigger a rule?

I have a group which consist of 4 Sengled LED bulbs, lights on my front porch. I created a rule to control my front porch lights so that if the group switch is turned on when house is in night mode, it sets different dimmer levels on the four bulbs.

I set the rule to trigger on the group switch turning on, but that will not trigger the rule. I ended up using one of the bulbs as the trigger and that works. Can a group switch device not trigger a rule?

I'm not sure I understand you correctly. Do you want to trigger a rule if a group is turned on or off? I just did a quick test and yes it does work. But re-reading your post I think maybe you meant something else. Can you post a screen shot of your rule and let us take a look at it?

I have a bunch of lights that turn on at various levels at night and I use a scene to do it. The scene captures the state you want each light to be in. Activating the scene causes the lights to return to that state,

Is your group Zigbee or Z-wave?

This is my rule. It currently shows two triggers, but originally I just had the group switch as the trigger, Front Porch light. That consist of the 4 bulbs Front Porch bulb1 thru 4.

Here is a log of when I turned on the group switch. It was turned on at 8;56 and 8:59AM. When I turned on the group switch at 8:56 the group switch was the only trigger, at 8:59 I had added the bulb as a trigger as well. I had also removed the predicate for this test.

This is the log of the rule for that time period. At 8:59, when the rule had both triggers it fired and ran, but it did not run at 8:56. The log below that is from the group device front porch light and it shows events at 8:56 and 8:59.

Hmmm. I don't see why it wouldn't work the way you have it set up. It's a pretty simple rule. Odd. What is it that turns on the group in the first place? A physical switch? Even though it appears to me the above should work maybe there's something funky about using a group event as a trigger? (Which of course is why you asked the question in the first place!) Maybe whatever turns on the group in the first place would be more appropriate? Just kinda throwing stuff out here... not really sure either.

The group I used in my test is a combination of hue bulbs (via a hue bridge) and a zigbee outlet. I can try to replicate it with different devices and see what happens. But the weird part is that the logs clearly show an event that should trigger your rule. It would be different if the event never showed up in the logs.

I was just turning it on using a dashboard.

Well I'm baffled. What does your group configuration look like? Here's the one I was using... don't know why any of them would have an effect but you never know.

I feel like it should be something obvious but if it is I sure don't see it. I wonder if @thebearmay has any ideas? He's pretty good at this stuff. Otherwise perhaps it's a bug? What version of the firmware are you on? I'm running 2.2.9.140. And I suppose you could always try a hub reboot just to see...?

NO. This is a myth!! Reboot has nothing to do with apps and how they run. Please stop spreading this!!

3 Likes

Bear in mind that the switch had to have been off prior for the on event to be sent, thus triggering your rule.

If the "Use group device to initiate if any members are on" option is selected, then it might already be on. So, to use it as a trigger, don't use that option.

Another thing you could do is add a virtual switch to the group, and trigger off it being turned on.

As I indicated I have the group switch set up on a dashboard, and when I turned it on, it was off. I also have all 4 bulbs shown on that dashboard and they were in fact all off before I turned on the group switch.

That being said, I did have that option set. So I turned off that option and tried again, results were the same.

Here is the rule I used. Full logging was turned on.

Dashboard before turning on group switch Front Porch Light.

Dashboard after turning on group switch.

Log from at the time I turned on group switch and it shows all devices turning on but nothing about the rule because it did not trigger.

Below is the group setup. I realized as I was about to post I had turned on metering, but I did that just to see it it made a difference. It was not on the first time I tried this.

How about the logs from the app?

As I said, there were none, as it never triggered. There is also nothing in the event log of the app. Do you mean something else?

You can look at the Events from the 'Lighting - Front Porch light' device page to see what events it sent. But be aware that an on event for a device that is already on will not be sent by the hub to apps, it is discarded.

As I showed in my first post an event is shown on the device page for each time I turned the switch on and off. Yet the rule did not trigger.

I don't know why your rule is not triggering. Perhaps you should remove it and create a new one. And/or test it from the device page directly.

Is 'Lighting - Front Porch light' a Group Activation device? That's what this topic was about.

You edited you post again so I guess you did see that I did in fact post the event log.

Yes Front Porch light, is a group device. It consist of the four bulbs. The trigger for the rule is the group device switch.

The rule works if I use one of the bulbs as the trigger.

I don't know why your rule isn't triggering. Have you tested from the device page for that device?

I just created a rule triggered by two different Group activation devices, and both triggered it.

Create a new rule. Test it from the device page for the activation device. Be sure to have logging for the rule on.

I had not, and I just did, and it does in fact trigger if I click the ON from the device page. So the problem is the dashboard, The device page says the switch is on but the dashboard shows the switch is off. I did refresh the dashboard. I re-opened the dashboard a few times to make sure.

Also if I turn off the switch from the dashboard all the bulbs turn off on the dashboard, I also verified they actually did turn off, On the device page the switch stills shows it is on, however.

If you turn off the switch on its device page, does the one on the Dashboard turn off?