AutoVoice AutoVoice and SharpTools integration

Discussion in 'AutoApps' started by benmctee, Nov 9, 2015.

  1. benmctee

    benmctee New Member

    Joined:
    Nov 9, 2015
    Messages:
    3
    Likes Received:
    1
    Hello community!

    I'm trying to implement this: http://sharptools.boshdirect.com/examples/autovoice-control-device and have followed the directions exactly, but the command does not work.

    My regex is: turn (?<command>on|off) (?<z1>my|the) (?<device>.+)
    My test command is: "Turn on the hallway" which is recognized and displayed in the toast.

    When I hard-code it in AutoVoice with "turn on the hallway" as the Command Filter, it works, so I know the SharpTools integration is working. When I try it with the variables, it does not work, it just shows the image results of a hallway in Google Now and the toast of the recognized command. I know that word capitalization could be an issue, based on the troubleshooting steps at the bottom of the page I linked to, so I created a variable convert: %device Function To Upper Case First

    One last thing, I also created a Go Home action to be run prior to executing the SharpTools plugin, but Google Now stays open, which is sort of annoying, but I can deal with it.

    I'm using Google Now v5.4.28.19.arm64 on a Nexus 6P, running Android 6.0.
    Tasker is v4.7u3m and AutoVoice is the most current version. I've ensured Google Now Integration is enabled in Accessibility.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please try this:
    - clear logs in AutoVoice
    - enable system logs
    -do command
    -export logs and paste them here

    Thanks!
     
  3. benmctee

    benmctee New Member

    Joined:
    Nov 9, 2015
    Messages:
    3
    Likes Received:
    1
    No problem! For some reason I can't paste into the mobile version of this forum, so I'm uploading the text file. Thanks for looking into it.
     

    Attached Files:

  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    You have a space after "turn (?<command>on|off) (?<z1>my|the) (?<device>.+) " :)
     
  5. benmctee

    benmctee New Member

    Joined:
    Nov 9, 2015
    Messages:
    3
    Likes Received:
    1
    Oh man, what a rookie mistake! Thanks Joao! Works perfectly now.
     
    joaomgcd likes this.
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    No problem :)
     
  7. ijaspley

    ijaspley New Member

    Joined:
    Sep 22, 2016
    Messages:
    2
    Likes Received:
    0
    I am also experiencing issues with this.
    Here's what I do:

    + Profile, Event, Plugin, AutoVoice, Recognized.
    I input a similar Command Filter: turn(?<z1>my| the)? (?<device>.+) (?<command>on|off)
    I select Regex.

    I then get:

    Configuration
    Command: "turn(?<z1>my| the)? (?<device>.+) (?<command>on|off)"
    Last Cmd Id Regex: false
    Last Cmd Id Invert: false
    Not on Normal: false
    Not on Continuous: false
    Contains All: false
    Use Regex Replacements: false
    Do Google Now Search: false

    %avcomm
    First recognised Command

    %avcommnofilter
    First Command Without Filter

    %avcomms()
    All recognized commands

    %avcommsnofilter()
    All recognized commands without filter

    %avsource
    Source of the Voice Command
    Can be normal, continuous, test or googlenow

    %avword()
    Word Array

    %command
    First "command"
    First match for group "command"

    %device
    First "device"
    First match for group "device"

    %regexgroups()
    Regex Groups
    Regex Groups

    %regexmatch
    Regex Match
    Regex Match

    %z1
    First "z1"
    First match for group "z1"

    I choose New Task, +, Plugin, SharpTools, A Thing, Configuration, 'tags'.

    Device: %device
    Command: %command
    Apply

    I then go back to start screen and there is a green arrow between "AutoVoice Recognized" and "A Thing"

    I "OK Google": "Turn on the living room lamp"

    Search page opens up with a song by The Kinks, and I get a toast message "Recieved possible commands: turn on the living room lamp",
    I saw that capitalisation is an issue but I also don't know how to work around that.

    Any help would be greatly appreciated.

    Thank you
     
  8. ijaspley

    ijaspley New Member

    Joined:
    Sep 22, 2016
    Messages:
    2
    Likes Received:
    0
    Ah, sorry for wasting anybody's time, I added the variable in the original post through an extra Action and this now works
     
: SharpTools

Share This Page