Rountines - One routine turns lights on and off?

Hi.

I’m new to Smartthings, moved over from WeMo and glad I did. So far I really like ST and and I’m happy I switched. I have a question about routines. I’ve been able to setup several routines and they work perfectly. However, is it possible to have one routine like “Kitchen Lights” either turn on or off the devices associated with the routine based on state. In other words… all “kitchen Lights” are off,

  1. Run the routine Kitchen Lights and the lights turn on
  2. Run the routine again to turn the lights off.

The reason is I have Alexa integration and would like to issue the following commands

Alexa - Turn on kitchen lights - lights turn on
Alexa - Turn off kitch lights - lights turn off

Is this possible or do you need two separate routines?

The short answer to your question is no you can’t run the same routine once for on and once for off. You would need separate routines to turn on and off the lights.

The long answer is that there is almost always a way in SmartThings to do what you want. I think in your case it will involve a virtual switch. I have never used these but I’m sure someone will come along after me and give you a more complete answer to this question.

First create two routines, one to turn on the lights, and one to turn them off. Then create a simulated switch (which has to be done through the IDE, as far as I can tell.) After that, using the “Switch activates home phrase” smartapp you add the routine to turn on the lights to the “On” and the routine to turn off the lights to the “Off”. Then the simulated switch will both turn on and turn off the lights.

It sounds a lot more complicated than it is.One thing I found is that I cannot change a routine once it’s been added to a simulated switch, I have to remove and recreate it. A minor thing, but it was pretty frustrating the first time I tried to edit an underlying routine and ended up with the switch not working, even though the routine itself worked.

If you just want control through Alexa, you don’t need any routines. Just tell tu turn on or off the lights you need.

2 Likes

You are making this way more complicated than you need. Use the device grouping in alexa.

create a new group called all kitchen lights… add all your kitchen lights found in smartthings integration to the alexa group…

Then just say alexa turn on all kitchen lights.

etc. etc.

only issue if some dim… and some dont, I don’t think you can say dim all kitchen lights.

6 Likes

Lgkahn,

Thank you, that worked perfectly!!!

All,

Thanks so much for the replies, the suggestion Lgkahn provided by creating a group in Alexa with the lights worked perfectly.

C[quote=“NomadTech, post:4, topic:73892, full:true”]
If you just want control through Alexa, you don’t need any routines. Just tell tu turn on or off the lights you need.
[/quote]

Agree. Just group them together, give the group a name and tell Alexa to turn on/off or dim/brighten by group name. No routine, or any other app needed.