Examples‎ > ‎

Run SmartThings Routine with Voice

posted Jan 23, 2016, 9:33 AM by Joshua Lyon   [ updated Jan 23, 2016, 10:02 AM ]
In this tutorial, we will demonstrate how to use Tasker, AutoVoice, and SharpTools to run a SmartThings routine using your voice. At the end of this tutorial, you will be able to say "Okay Google, run the routine Good Morning" and have the "Good Morning!" routine/phrase run.

This tutorial uses the SmartThings Voice Control with Tasker tutorial as a baseline. If you are unfamiliar with using AutoVoice or Tasker, I would strongly recommend reviewing the SmartThings Voice Control with Tasker tutorial.

  1. Create a new Event Profile in Tasker
  2. Choose AutoVoice → Recognized
  3. For the command filter, enter:
    Run the routine (?<routine>.+)
    Note: Make sure "Use Regex" is checked
  4. Proceed to creating your task (optionally providing a name for the task)

    At this point, we will create several actions for each desired phrase and will make these actions trigger conditional upon our desired phrase being spoken.
    (More details on conditional actions)

  5. In the task, create an action using Plugin → SharpTools → A Phrase
    Note: A Phrase is the legacy name for A Routine
  6. Use the pencil icon in Tasker to edit the "A Phrase" plugin and select your desired phrase.
  7. In the Action Edit screen for "A Phrase", scroll down to the If section and enter the %routine variable on the left and the phrase on the right that you would like to trigger the action.
    Example: If %routine ~ goodnight

  8. Repeat steps 5-7 for each desired phrase. When you are finished adding Phrases, press back multiple times to fully exit Tasker and enable the profile.

In the end, your task will have several actions like:
A Phrase: "Good Night!"
  If %routine ~ "goodnight"

A Phrase: "Good Morning!"
  If %routine ~ "good morning"

A Phrase: "Special Phrase!"
  If %routine ~ "custom spoken trigger"

AutoVoice Recognized - Event Profile Configuration Tasker Profile Configuration Conditional Phrase Action Conditional Phrases Task Overview
Note: For debugging purposes, you may want to include a simple Notify or Flash action to show the contents of the variable captured with AutoVoice. Sometimes the words captured by AutoVoice/Google are slightly different than you expected and you will want to adjust your conditional actions accordingly (eg. "good night" → "goodnight",  "10" → "ten")

For additional troubleshooting steps, see the troubleshooting section of the SmartThings Voice Control with Tasker tutorial.

Joshua Lyon,
Jan 23, 2016, 9:35 AM
Joshua Lyon,
Jan 23, 2016, 9:35 AM
Joshua Lyon,
Jan 23, 2016, 9:35 AM
Joshua Lyon,
Jan 23, 2016, 9:35 AM