posted Dec 5, 2014, 4:39 PM by Joshua Lyon
updated Feb 15, 2016, 5:33 PM
In this tutorial, we will briefly demonstrate how to use Tasker, AutoVoice, and SharpTools to control your home with your voice. At the end of the tutorial, you will be able to say
Okay Google, turn the lamp off and have your lamp turn off.
You might also be interested in the following SharpTools articles:
- Open Tasker
- In Profiles, click the "+" icon to add a new profile
- Select Event > Plugin > AutoVoice > Recognized
- Click the pencil icon to configure the AutoVoice plugin
- Tap command filter and paste in:
turn(?<z1> my| the)? (?<device>.+) (?<command>on|off)
Note: the (?<device>.+) saves the spoken device name to the %device Tasker variable
- Check the Use Regex box
- Select the checkmark at the top of the screen to save your plugin settings
- Press the back button on your phone to save the Tasker event profile
- At the prompt to select a Task, select New Task
- Leave the optional Task Name blank and click the check mark to continue
- Click the + icon at the bottom of the screen to add an action
- Choose Plugin > SharpTools > A Thing
- Click the pencil icon to configure the SharpTools plugin
- Click the 'tag' icon at the top of the screen
Note: This puts the SharpTools plugin in Tasker Variable entry mode
%device in the first field
%command in the second field
- Press Apply
- Press the back button on your phone to save the Action
- Press the back button again to close out the Task Edit
- Press the back button again to exit out of Tasker and start the profile
Now you should be able to say "Turn the device_name off" where device_name is a device you have enabled in the 'Authenticate' section of the SharpTools settings.
- Make sure you can manually toggle the desired device from the main SharpTools interface
- Make sure the command is a valid command such as "on" or "off"
- If you hard-coded the command, make sure you used the proper case
Most commands start with a lowercase letter like "on" or "toggle"
- Make sure AutoVoice is recognizing your device name exactly as it is spelled in SmartThings
- SharpTools supports partial matching. If you have several devices with "Hall" in their name and say "Turn the hall on", SharpTools will match all devices with the word 'hall' in the name and trigger the command on each device. (eg. Upstairs Hall, Downstairs Hall, Shallow Light)
- Make sure you have a licensed copy of AutoVoice - the free version truncates the received command to 4 characters.
- Make sure you are saying the phrase in the correct order. If you are following the guide above, the phrase would be
"Turn the [device] [on]"
- If the 'Apply' button is grayed out (or missing) in the 'A Thing' view, try selecting a device which has a command from the drop down selections before switching to Tasker Variable mode.
If you are still having difficulty getting the example to work, try looking at the logs. If you are still having difficulty, please send all three items listed below to firstname.lastname@example.org
- AutoVoice Logs: Clear the logs in AutoVoice, try speaking the phrase again, then review (and/or send) the logs.
- SharpTools Logs: Open SharpTools Settings, select the log icon from the action bar, then select the mail icon from the action bar.
- Make sure you send the SharpTools logs immediately after performing the action. SharpTools uses the built in Android logging system which may overwrite itself after waiting too long.
- Before pressing send on the email, make sure there is a log file attached. If not, press back to go back to the log viewer and try tapping the email icon again.
- Tasker Profile Export: export the Tasker profile in descriptive format by long pressing on the profile
- Note: You will need to have
Menu / Prefs / UI / Beginner Mode unchecked.