SmartThings Community

Lighting Control with multiple switches?

I’ve got a number of light switches being turned on by my Smartthings hub, IFTTT and Wemo. I have rules in Smartthings to turn off each device after a certain amount of time.

The issue is when I want to keep the lights on for an extended period of time. I have to unplug the switches or turn off the rules in each switch. Pain.

Has anyone solved this? Is there a simple way to consolidate the timer into a central control switch that I can easily override?

The simplest way is to use a virtual switch as a timer.

Create a virtual switch, and apply all of your rules that would turn the switch off to that virtual switch.

Set up the physical lights to follow the virtual switch, so that they turn on when it turns on, and turn off when it turns off.

That way, if you control the physical light through any other means, such as Echo, a minimote, or another SmartApp, The timer won’t turn it off. It’s only when you reference the virtual switch that you will get the automatic shut off.

There’s a how to article in the community – create a wiki that gives the steps for doing this.

http://thingsthataresmart.wiki/index.php?title=How_to_create_a_virtual_timer_for_a_light

Alternatively, you can get even more sophisticated rules with more complex overrides just by using core. You probably won’t need virtual switches for that one, but it is a more complex set up.

So depending on the exact details, either of those methods should work. :sunglasses:

Thanks. I’m using a virtual switch now to control the wemo switches within Smartthings and IFTTT. Will think about having them all use a VS for a timer. I have different durations and triggers but can simplify it I guess. Will check out Core as well. If it can due multiple “thens” off of one “if” it would some some ordering problems for me as well… ie. Turn on the wemo switch

1 Like

Do virtual switches controlled by smart lighting run local?

Some types do. See:

@JDRoberts

Thanks, but for your suggestion for virtual switch, which kind of virtual switch and is it in the list of local?

I have a virtual switch called ‘Automation’ - (Device Type = ‘Simulated Switch’)

All my automations are now setup via CoRE Pistons. Each Piston is restricted to only execute when my ‘Automation’ switch is ‘on’.

If I turn off the ‘automation’ switch my home reverts to dumb control only.

The same could be achieved using modes but you can only ever have one mode at a time which quickly becomes inflexible! (And you still need virtual switches to change between modes).

I have two other virtual switches:

  • Automation Rear - pauses automation in my back garden but leaves internal stuff running.
  • Automation SMS - pauses SMS messages

I’m not sure there is a virtual binary switch device type handler that can run locally. There’s a momentary that can run locally.

@slagle might know.

I’m going to one thing first and see how it works tonight. Created a new mode called “Keep On” and had all of my Power Allocations and Timers only work in the mode is set to one of the other three. Theory is then during a party switch the mode to Keep On. Using Lights Off turns all lights off, turns a virtual switch on for IFTTT to fire and turn off all Wemos and switch mode to Night. Still struggling to get my z-wave switches to work outside despite doing multiple zwave repair. Annoying…

Lets see if I got it right!

Seems to be working well. Added a few more switches, LiFX bulbs, routines and wemos. Wife is getting concerned the house is “too smart”.

My efforts here may prove we can be replaced…