Using Virtual Switch to trigger Routine?

I don’t see this app anymore. I think SmartThings cleared out a few old ones… is this an app they removed?

Hello @justinlhudson. I’m just wondering what exactly your app does.

Does it control multiple individual switches that each relate to one of the routines? (A switch for each home, away, night etc.) or is it one switch per smart app and if you want to control multiple routines you need to have multiple apps all running?

Example I am using the old smart security app that is driven by mode… however with the routines that been added when a go to bed routine for example is activated I also want to change mode to night to activate alarm system.

As mentioned in my post 19 above, that smart app is no longer needed because a few months ago they added the ability for a routine to be triggered when a switch comes on. It’s right in the routine set up wizard. You just “automatically perform” when “something turns on or off.”

A Mode change should already automatically activate the routine as long as the routine is set up to run in that new Mode, so you don’t need to do anything for that.

If you only want to run a routine when changing from a specific Mode to a different mode, such as when changing from night to home but not when changing from away to home, The most straightforward way to do that will be with web core, although there are some other ways to do it as well.

If you don’t want to use web core, you can bootstrap it with the official features.

Create a routine which runs when a virtual switch comes on as described above.

Create a smart lighting automation which runs when the mode changes and which turns on that virtual switch and which itself only runs in a specific mode

That way the mode changes from night to home, the smart lighting automation run which turns on the virtual switch, the routine runs because the virtual switch came on.

So there are many different ways to handle all of these things, none of which should require writing your own smart app.

So start by looking at the “automatically perform when” options at the end of the routine set up wizard and you can add your virtual switch coming on there. :sunglasses:

1 Like

Awesome, thanks for the explanation

Yep. This is one if the apps that was deprecated.

Hello! I need some help with a virtual switch that is not working as expected. The virtual switch changes from off to on via IFTTT when my cellphone gets connected to my wifi, and viceversa. Then in Smartthings I have an automation that changes the mode to Home or Away depending on the status of the virtual switch (on-Home off-Away). However the problem is that sometimes even when the virtual switch actually changes its state, the automation doesn’t run. I.e.i can see on my device list the virtual switch turned on but the mode did not change to Home. Any guesses on what may be happening??

Thank you very much!

I would like to start a routine when all 3 of my virtual switches are turned off. Is this possible? From the option above its only if one of the switches turn on or off. Don’t want that.

Yes, but you would have to Daisychain it by having a fourth virtual switch To stand as proxy for the group and then use webcore to turn the fourth switch on or off when all three of the others were. Then you trigger the routine from only the fourth switch.

That’s assuming you’re using the classic app, since you’re asking about a “routine.“ The new V3 app doesn’t have routines, but its built-in rules engine is better than classic and it has an “and“ trigger which the classic app does not.

So yes, it’s possible in the classic app, but the setup is annoyingly complex.

FAQ: What is WebCoRE? (And what was CoRE?)

Awesome Thanks for the quick reply JD!
Yes I am currently using the classic app and from your response I’ll try setting it up in the new V3 app as I understand “classic app” will be retired soon. I’d like to future-proof my settings.
Also I don’t need to necessarily use a routine as I just want to set the home to “away” once all 3 switches are off. Is there a way to do this?