How to turn on/off all lights at the same time?


I have 10 different Z-Wave and ZigBee light sources in my bedroom and want to turn them on or off all at the same time. How can I do that?

Currently, I call lights*.on() and lights*.off() and then I can clearly see how the different light sources are turned on/off one after another with a clearly noticeable delay. That’s not a nice experience. Might that depend on the device handler?

Any hints? Maybe on the perfect device handler :wink:


There are many positive things about mesh topology, but one of the things that can take a little getting used to is that you cannot force the sequence of events. The devices route the messages themselves, and they can and do bounce around the network for a little while sometimes. There isn’t anything you can do about that directly.

This can lead to the “popcorn effect” where different lights will come on in a different sequence and sometimes with a noticeable beat or two between them.

This problem is aggravated when there are multiple protocols involved.

There isn’t really anything you can do about it except try to get the network as efficient as possible. Which can be easier said than done.

If you need totally synchronized lighting about the only thing you can do is go to a different topology, usually Wi-Fi, where each device has its own direct route to the hub.

(The best networked lighting is probably Lutron. They hold a number of patents and their maximum is around the minimum for many other protocols. Unfortunately, there is no direct integration with SmartThings. There is in direct integration using IFTTT, but that can add its own lag. So you can end up with lights that are better synchronized but take longer to come on. )

But as long as you’re working with Z wave and zigbee, you just need to get the network tuned up as much as you can. You might want to add additional repeaters (two per room is usually sufficient), make sure you do a network heal for each Protocol anytime you move or add a new device, reduce polling as much as possible, etc.


I created a routine just for the purpose of turning off all lights at once. It is a manually triggered group, not set to time or anything. When I accidently trigger a motion sensor in either away or night mode my lights turn on. To avoid that, I made the routine “All Off” that turns off all my lights and sets my home to home mode with one button push.

In Alexa, I grouped all the lights together and labeled it all lights and I can tell Alexa all off or all on etc.


Thanks for this detailed answer.


@tpip What exactly do you mean with “It is a manually triggered group”?


Under the automations tab at bottom, then select routines at top left. My All Off routine is then right there at the top of all the routines listed. I just tap the blue circle & it triggers the routine to turn off all lights and set home to home mode.


Even with a manually triggered group, you can get a “popcorn effect.” If the lights are in different rooms, you probably won’t notice it. They will all go off, you just can’t be certain of the exact order or precisely how long it will take.

There won’t be a huge difference either, or there shouldn’t be, but you could definitely get one that takes half a second, another that takes three quarters of a second, another that takes even a second and a half.

It doesn’t matter how the instructions are issued, it’s just a matter of how they travel around the mesh each time, and that’s unpredictable.


True they don’t all respond at the exact same instance but it is pretty close. With Alexa, there is a slight gap in lights also. I was just giving an example how to turn all off with same command.


Thanks for trying to help. Just to be sure, I also tried it with the routine. And at least that way I could see that it doesn’t react differently than with my SmartApp. So, it’s not an issue with my app.

(Robin) #10

I have 40+ lights running on my system so a command to turn everything off can certainly be messy… I get lights randomly turning off up to 5 seconds after the command was given. I also found using a routine to do this is unreliable as one or two (often several) lights always seemed to stay on!

I don’t mind the delay in things turning off so much but when things don’t turn off at all it drives me crazy.

I used to use various rules to turn off ‘zones’ of up to 10 lights at a time, with several seconds between each zone to avoid overloading the mesh, then a repeat cycle to be sure, but even this sometimes left a damn light on!!

To overcome this I now use a bunch of Fibaro universal sensors wired up to simple zwave relays. I have set the universal sensors to send an all off command when activated.

As the vast majority of my lights use Fibaro Dimmers / relays I was able to set these to respond to the all off command and turn off. The result is that everything compatible turns off instantly and at the exact same time… No “popcorn effect” as @JDRoberts accurately describes it.

The last few devices not controlled by Fibaro get cleaned up the old fashioned way but this still massively reduces the scale of the overall event.

To prevent an endless loop, the Universal Sensors will only send the off command to devices immediately within range, devices receiving the command will not repeat it to the rest of the mesh. I therefore use 4 universal sensors and 4 dual relays to cover the whole house and grounds… Costly but effective!

Note - As a bonus I use the same method (2nd Fibaro sensor input / 2nd relay switch) to send alarm frames to all the lights which makes everything flash when SHM goes off.

(Jake) #11

I didn’t used to have the “popcorn” issue, only in the past few weeks have I seen a noticeable difference!A few other users have also experienced the same thing here:

(Lik Toung Kho) #12


I am facing the exact problem like you. I am also using fibaro relay. i have about 28 lights to turn off. I use to have no issue before migrate to smarthings. I use home center 2 last time with the ha-bridge they work flawless. However when fibaro release the new skill in alexa, I start to encounter the issue when I fire “turn off all lights” via alexa. Now I migrate from fibaro to smarthings hub, again I face the same issue (I always has one light miss - random reliability is 90%). I was wondering is there anyway I can fire the routine twice to clean this up (hopefully also turn off the light miss in the first routine). This drive me crazy. I do not have this issue last when run fibaro home center with ha-bridge setup.

(Jason Moody) #13

How does phillips hue do it, I’m sure that a command on my app turns them all off together. Or is that because it’s zigbee


Philips does it with a zigbee groupcast, yes.

(Robin) #15

Yeah, easy enough with webCoRE.

The following piston can be imported directly into webCoRE. It will ask you to select your devices instead of mine when you import.

It loops until all of the lights on the list are off and sends a push message telling you the number of loops it took to complete.

(Lik Toung Kho) #16

amazing community amazing people. Thanks

(Wob76) #17

Hi, I’m new to ST, moving from Domoticz, one of my goals was to get away from multiple ZigBee gateways, a Xiaomi Gateway and the awful Osram Gateway.

I’ve migrated just a few of my bulbs and sensors for testing.

This “popcorn” effect is looking to be a deal breaker for me, most of my rooms have 4 lightify downlights and having them power on/off with a second delay between is not an ideal user experience.

Can you tell me why is it that the hue bridge and even the average Osram hub are able to do ZigBee groupcasts and ST cannot?

I’ve tried the alternative DHs for the bulbs, and the Trendsetter ST App without success, is there a handler to talk via the OSRAM hub, or is adding hue bridge the only viable option at the moment to reduce lag?