Charles February 8, 2020

How to Create a Virtual Switch in SmartThings (With Images)

A virtual switch is a digital representation of a physical smart switch that has an on and off state. Virtual switches, sometimes called simulated switches, allow you to control other smart devices based on the state of the virtual switch.

Virtual switches work exactly the same as other smart switches and can be controlled through the SmartThings apps. The primary goal of a simulated switch is to control smart devices that are monitoring the switch's state.

The main use cases for virtual switches include:

  • Activating automations and routines only if a virtual switch is turned on (For example, you could create a virtual switch called security mode and have the lights in your backyard only turn on if motion is detected and security mode is enabled.
  • Virtual switches allow you to control smart devices that are not compatible with Alexa (I explain this in more detail at the end of the tutorial and how you can connect your virtual switch to Alexa).

How to Create a Virtual / Simulated Switch in the SmartThings IDE

Follow these 18 simple steps to create a virtual / simulated switch in SmartThings using the SmartThings IDE.

  1. Step 1: Create a Samsung Account

    A Samsung account is required before you can continue this tutorial. If you don't have a Samsung account, follow my tutorial by clicking the video above.

  2. Step 2: Add a Location to the SmartThings Hub

    If you don't have a location set up on your SmartThings hub, check out my tutorial by clicking the video above.

  3. Step 3: Go to the SmartThings IDE and Click Login

    Go to the SmartThings IDE https://graph.api.smartthings.com and click on login at the top right-hand corner of the screen. If you are on a smaller screen device, you may have to click on a hamburger menu to show some of the buttons and links in this tutorial.

  4. Step 4: Sign in With Samsung Account

    Click the button that says "SIGN IN WITH SAMSUNG ACCOUNT".

  5. Step 5: Sign in to Your Samsung Account

    If you aren't signed in to your Samsung account, input your credentials and click "SIGN IN".

  6. Step 6: Go To My Locations

    After logging in you will be taken back to the SmartThings IDE page, now click on "My Locations" at the top left-hand corner.

  7. Step 7: Select Your Location

    Click on the name of your hub's location under the name column.

  8. Step 8: Select My Devices

    Click on "My Devices".

  9. Step 9: Create a New Device In SmartThings IDE

    Click on the blue button named "+ New Device".

  10. Step 10: Create a Name for the Device

    Choose a name for the device. This will be the name that is displayed in the SmartThings apps and IDE.

  11. Step 11: Create a Network Id

    A network id is used by SmartThings behind the scenes to make sure messages are sent to the correct devices. Every network id has to be unique and can't be in use by any of your other devices. If you create a unique name for each of your devices, you can just copy the name you used for the "Name" field and paste it into the "Device Network Id" field.

  12. Step 12: Choose the Type of Device You Want to Create

    In the "Type" dropdown scroll down until you find the "Simulated Switch" option and then click on it.

  13. Step 13: Select the Version

    In the "Version" dropdown select "Published" if it's not already selected for you.

  14. Step 14: Select Your SmartThings Location

    From the "Location" dropdown choose your smart hub's location name.

  15. Step 15: Select Your SmartThings Hub

    From the "Hub" dropdown select the name of your SmartThings hub.

  16. Step 16: Create the Virtual Switch

    Once you have filled out the required fields (Name, Device Network Id, Type, Version, Location, and Hub) you can click the "Create" button.

  17. Step 17: Simulated Switch / Virtual Switch Has Been Created

    You'll be taken to a page showing you that your device name has been created. Now click on "My Devices".

  18. Step 18: Verify Your Switch Was Created

    If everything was successful, you'll see your newly created virtual switch along with the rest of your smart devices listed under the "Display Name" column.

  19. Connect Your Virtual Switch to Alexa

    If you want to use Alexa voice commands or routines on smart devices that aren't compatible with Alexa, virtual switches are the way to go. First, you would assign your non compatible devices to be controlled based on the state of the virtual switch (on or off).

    Next, you would create a voice command or routine that would turn on or off your virtual switch. Running the voice command or routine would trigger the virtual switch to turn on or off, which would cause your non compatible Alexa devices to be controlled indirectly.

    Before you can use your virtual switch in the Alexa app, you'll need to connect your SmartThings account to your Alexa account by using an Alexa skill. Check out my tutorial on how to do this and import your smart devices from SmartThings to the Alexa app by clicking on the video above.

About Me

My name's Charles and I love how technology is making life easier and more convenient. I created this website to share everything I've learned about smart devices and show off cool ways to automate your life. If you're looking for in-depth information, tutorials, reviews and ways to make your life smarter, not harder, then you've come to the right place.

Leave a Reply

Your email address will not be published. Required fields are marked *