Using Virtual Switch to trigger Routine?

It sounds like you’re feeling frustrated right now, and I think we’ve all been at that place. Smartthings is both powerful and flexible and can do many different functions. But it’s not intuitive and it can be hard to figure out how to get it to do those things. :disappointed_relieved:

For example, Unfortunately, SmartThings doesn’t give you a way through the mobile app to create a virtual switch. You have to go through the IDE (integrated development environment), which is a website that gives you access to your account information. You can get there by clicking on the community link at the top right of this page which will take you to the first page of the forum, and then clicking on “developer tools” at the top right of that page.

Once you have created a virtual switch, it will show up on any of your device lists for switches. Including on the selection list for the two smartapps.

The two smartapps do different things. One lets you assign a routine to the switch. The other lets you assign a mode to the switch. I know that doesn’t seem like a big distinction, but these two smartapps were written quite early after smartthings came out, and it was a big deal at the time. The switch can be virtual or physical.

For a step-by-step set of instructions on how to do all of this, including creating the virtual switch, see the FAQ for setting up echo to control a routine. You just don’t need to do the final step to have echo do it, just do the first two.

As far as then tying everything to IFTTT, again, once you have created the virtual switch, it will show up on any of your lists of switches. Including the one where you authorize IFTTT to use that switch. Once you have done that, then the virtual switch will be available in the SmartThings service/channel and you can just select it when you’re creating an IFTTT applet.

https://support.smartthings.com/hc/en-us/articles/211978466-IFTTT

So three basic steps:

One) Create a virtual switch through the IDE

  1. use the smartapp from the marketplace to have the switch run a routine. (After that, every time that switch comes on, the routine you specified will run.)

  2. if you want to use it with IFTTT, you will need to authorize IFTTT to access the virtual switch in the SmartThings service/channel, and after that it will be available to use in an IFTTT applet/recipe.

Again, if this all seems frustrating and unnecessarily complicated, I don’t think any of the community members are going to disagree with you. We can’t change the way SmartThings has chosen to design things, we can just share the information we have collectively discovered about how to accomplish the end result.

1 Like