SmartThings Voice Control with Tasker

Post date: Dec 06, 2014 12:39:18 AM

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:

Requirements:

Instructions

    1. Open Tasker

    2. In Profiles, click the "+" icon to add a new profile

    3. Select Event > Plugin > AutoVoice > Recognized

    4. Click the pencil icon to configure the AutoVoice plugin

    5. Tap command filter and paste in:

    6. turn(?<z1> my| the)? (?<device>.+) (?<command>on|off)

    7. Note: the (?<device>.+) saves the spoken device name to the %device Tasker variable

    8. Check the Use Regex box

    9. Select the checkmark at the top of the screen to save your plugin settings

    10. Press the back button on your phone to save the Tasker event profile

    11. At the prompt to select a Task, select New Task

    12. Leave the optional Task Name blank and click the check mark to continue

    13. Click the + icon at the bottom of the screen to add an action

    14. Choose Plugin > SharpTools > A Thing

    15. Click the pencil icon to configure the SharpTools plugin

    16. Click the 'tag' icon at the top of the screen

    17. Note: This puts the SharpTools plugin in Tasker Variable entry mode

    18. Enter %device in the first field

    19. Enter %command in the second field

    20. Press Apply

    21. Press the back button on your phone to save the Action

    22. Press the back button again to close out the Task Edit

    23. 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.

Troubleshooting:

    • 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.

Sending Logs

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 support@boshdirect.com

  • 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.