AutoVoice Send a text message with Google Home and Amazon Echo with natural language command 2017-02-13

Learn how to make Alexa and the Google Assistant be able to send text messages

  1. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,622
    Likes Received:
    731
    joaomgcd submitted a new AutoApps project:

    Send a text message with Google Home and Amazon Echo with natural language command - Learn how to make Alexa and the Google Assistant be able to send text messages

    Read more about this project...
     
  2. usn.mustanger

    usn.mustanger New Member

    Joined:
    Feb 23, 2016
    Messages:
    11
    Likes Received:
    0
    Okay, created tasker profile from scratch, I get this when I run it:
    Code (Text):
    com.joaomgcd.autocontacts version 1.1.21b
    OS Build MMB29M.N910VVRS2CQA1
    OS Code 23
    Device SM-N910V
    Manufacturer samsung
    Product trltevzw

    java.lang.IndexOutOfBoundsException
    at java.util.AbstractList.subList(AbstractList.java:738)
    at com.joaomgcd.autocontacts.query2.a.a.a.a(SourceFile:37)
    at com.joaomgcd.autocontacts.query2.a.a.a.a(SourceFile:14)
    at com.joaomgcd.autocontacts.query2.a.a.d.a(SourceFile:37)
    at com.joaomgcd.autocontacts.query2.a.a.c(SourceFile:24)
    at com.joaomgcd.autocontacts.query2.a.a.h.a(SourceFile:31)
    at com.joaomgcd.autocontacts.query2.a.a(SourceFile:92)
    at com.joaomgcd.autocontacts.query2.a.a(SourceFile:86)
    at com.joaomgcd.autocontacts.query2.a.execute(SourceFile:28)
    at com.joaomgcd.common.tasker.dynamic.IntentTaskerActionPluginDynamic.fire(SourceFile:298)
    at com.joaomgcd.common.tasker.IntentTaskerActionPlugin.fireBase(SourceFile:109)
    at com.joaomgcd.common.tasker.q.a(SourceFile:123)
    at com.joaomgcd.common.tasker.q$2.run(SourceFile:83)
    Here's the log output from AutoContacts:
    Code (Text):

    version 1.1.21b

    OS Build MMB29M.N910VVRS2CQA1
    OS Code 23
    Device SM-N910V
    Manufacturer samsung
    Product trltevzw

    AutoApps - 2017-02-13 14:24:36.047 - Got License response from AutoApps. Is licensed: false
    Licensing - 2017-02-13 14:24:35.897 - Lite from Unlock Key: true
    Licensing - 2017-02-13 14:24:35.888 - com.joaomgcd.autocontacts.unlock not present to check license
    Licensing - 2017-02-13 14:24:35.882 - Lite from In-App: true
    Licensing - 2017-02-13 14:24:35.881 - Lite from AutoApps: true
    AutoApps - 2017-02-13 14:24:35.867 - Checking license in AutoApps
    Error - 2017-02-13 14:24:19.799 - Send the developer an email with this error: null
    AutoApps - 2017-02-13 14:24:19.796 - Got License response from AutoApps. Is licensed: false
    Licensing - 2017-02-13 14:24:19.778 - Lite from Unlock Key: true
    Licensing - 2017-02-13 14:24:19.771 - com.joaomgcd.autocontacts.unlock not present to check license
    Licensing - 2017-02-13 14:24:19.766 - Lite from In-App: true
    Licensing - 2017-02-13 14:24:19.749 - Lite from AutoApps: true
    AutoApps - 2017-02-13 14:24:19.735 - Checking license in AutoApps
    Timings - 2017-02-13 14:24:00.915 - Took 17.978 seconds to refresh 272 contacts
    Refreshing Contacts - 2017-02-13 14:24:00.903 - Finished getting contacts from system. 272 contacts found.
    AutoApps - 2017-02-13 14:23:42.997 - Got License response from AutoApps. Is licensed: false
    Refreshing Contacts - 2017-02-13 14:23:42.947 - Getting contacts from system. May take a while.
    Licensing - 2017-02-13 14:23:42.944 - Lite from Unlock Key: true
    Licensing - 2017-02-13 14:23:42.941 - com.joaomgcd.autocontacts.unlock not present to check license
    Licensing - 2017-02-13 14:23:42.928 - Lite from In-App: true
    Licensing - 2017-02-13 14:23:42.927 - Lite from AutoApps: true
    AutoApps - 2017-02-13 14:23:42.901 - Checking license in AutoApps
    AutoApps - 2017-02-13 14:23:31.994 - Got License response from AutoApps. Is licensed: false
    Licensing - 2017-02-13 14:23:31.900 - Lite from Unlock Key: true
    Licensing - 2017-02-13 14:23:31.894 - com.joaomgcd.autocontacts.unlock not present to check license
    Licensing - 2017-02-13 14:23:31.890 - Lite from In-App: true
    Licensing - 2017-02-13 14:23:31.880 - Lite from AutoApps: true
    AutoApps - 2017-02-13 14:23:31.871 - Checking license in AutoApps

     
    No text gets sent. Not sure what I'm doing wrong here.
     
    Last edited: Feb 13, 2017
  3. usn.mustanger

    usn.mustanger New Member

    Joined:
    Feb 23, 2016
    Messages:
    11
    Likes Received:
    0
    Okay, update: I went ahead and subscribed to AutoApps, since it looked like the "Lite" version of AutoContacts may have been holding me back. The good news is that I no longer get the Java error. The bad news is that it still doesn't work.
    Here are my logs:
    AutoVoice:
    Code (Text):
     version 3.0.10b.bf2
    Natural Language - 2017-02-13 18:10:16.274 - Doesn't match because action "sendatexttocontacttext" doesn't match any selected action: addanentrytomycalendar
    Natural Language - 2017-02-13 18:10:16.064 - New Last Natural Language Command: Name: send a text to contact text
    Action: sendatexttocontacttext

    ---Variables---
    text: how are you
    contact: addison;
    Natural Language - 2017-02-13 17:59:31.535 - Doesn't match because action "sendatexttocontacttext" doesn't match any selected action: addanentrytomycalendar
    Natural Language - 2017-02-13 17:59:31.415 - New Last Natural Language Command: Name: send a text to contact text
    Action: sendatexttocontacttext

    ---Variables---
    text: how are you
    contact: addison;
     
    Tasker:
    Code (Text):

    20170213 18.10.16 P Instant  ID2      Send Text From GH
    20170213 18.10.16 E Start    ID0:0.0  TaskService
    20170213 18.10.16 T Running  ID3      Anon
    20170213 18.10.16 A OK       ID3.1    Anon.Flash
    20170213 18.10.16 A OK       ID3.2    Anon.com.joaomgcd.autocontacts\n***\n*!&$*;com.joaomgcd.autocontacts.activity.ActivityConfigQuery2
    20170213 18.10.17 A OK       ID3.3    Anon.Flash
    20170213 18.10.17 A OK       ID3.4    Anon.Send SMS
    20170213 18.10.17 T ExitOK   ID3      Anon
    20170213 18.10.17 E Stop     ID0:0.0  TaskService

     
    AutoContacts: No Logs (even with System Log turned on)
    It's worth noting that part 3 of the Tasker Profile Task, where it's supposed to flash the found number on the display, always says "Found number: %acnumber", instead of displaying the actual number found, e.g. "Found number: 520-123-4567". So for some reason, it seems as if AutoContacts isn't properly saving a value in the %acnumber variable, or isn't passing it back to Tasker correctly.
    Please help?
     
    Last edited: Feb 13, 2017
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,622
    Likes Received:
    731
    Thanks for the logs! Can you please try disabling the "Get Default Number" option in the AutoContacts action and see if that helps? Thanks in advance!
     
  5. usn.mustanger

    usn.mustanger New Member

    Joined:
    Feb 23, 2016
    Messages:
    11
    Likes Received:
    0
    @joaomgcd , THANK YOU, this partially fixed my problem.
    After doing this, I was able to send a message to my test contact (basically a dummy contact with just my Google Voice #), and one to my wife, but not to a couple of others I tried. I still get the "Found number: %acnumber".
    Logs again (they don't look much different than those from above):
    Code (Text):
    20170214 16.09.01 P Instant  ID2      Send Text From GH
    20170214 16.09.01 E Start    ID0:0.0  TaskService
    20170214 16.09.01 T Running  ID3      Anon
    20170214 16.09.01 A OK       ID3.1    Anon.Flash
    20170214 16.09.01 A OK       ID3.2    Anon.com.joaomgcd.autocontacts\n***\n*!&$*;com.joaomgcd.autocontacts.activity.ActivityConfigQuery2
    20170214 16.09.02 A OK       ID3.3    Anon.Flash
    20170214 16.09.02 A OK       ID3.4    Anon.Send SMS
    20170214 16.09.02 T ExitOK   ID3      Anon
    20170214 16.09.02 E Stop     ID0:0.0  TaskService
    20170214 16.09.49 P Instant  ID2      Send Text From GH
    20170214 16.09.49 E Start    ID0:0.0  TaskService
    20170214 16.09.49 T Running  ID3      Anon
    20170214 16.09.49 A OK       ID3.1    Anon.Flash
    20170214 16.09.49 A OK       ID3.2    Anon.com.joaomgcd.autocontacts\n***\n*!&$*;com.joaomgcd.autocontacts.activity.ActivityConfigQuery2
    20170214 16.09.49 A OK       ID3.3    Anon.Flash
    20170214 16.09.49 A OK       ID3.4    Anon.Send SMS
    20170214 16.09.49 T ExitOK   ID3      Anon
    20170214 16.09.50 E Stop     ID0:0.0  TaskService
     
    AutoVoice:
    Code (Text):
     version 3.0.10b.bf2

    OS Build MMB29M.N910VVRS2CQA1
    OS Code 23
    Device SM-N910V
    Manufacturer samsung
    Product trltevzw

    Natural Language - 2017-02-14 16:09:49.438 - Doesn't match because action "sendatexttocontacttext" doesn't match any selected action: addanentrytomycalendar
    Natural Language - 2017-02-14 16:09:49.298 - New Last Natural Language Command: Name: send a text to contact text
    Action: sendatexttocontacttext

    ---Variables---
    text: how are you
    contact: derpy;
    Natural Language - 2017-02-14 16:09:01.778 - Doesn't match because action "sendatexttocontacttext" doesn't match any selected action: addanentrytomycalendar
    Natural Language - 2017-02-14 16:09:01.708 - New Last Natural Language Command: Name: send a text to contact text
    Action: sendatexttocontacttext

    ---Variables---
    text: happy valentine's day princess
    contact: maddie;
     
    Note that the top message in the logs was from a successful message sent to my test contact, "Derpy", and the second one is a failed attempt that results in the "Found number: %acnumber" toast.
    It's worth noting that the two contacts that it consistently fails on display a misspelled name, so the problem might stem from AutoContacts not pulling up the contact associated with the misspelled version of the name. For example, in my failed message above, the name is picked up by AutoVoice as "maddie", but the correct spelling of the name from my contacts is "Maddy". Likewise, it fails on another one where the name is picked up as "addison", but the contact spelling is "Adison." I just successfully sent a message to a "Selena" where the name was properly picked up, and so the contact was properly found. Do you think this might be the issue? Name spelling? I thought api.ai was supposed to help mitigate this?
    I'll test this theory out by texting some other contacts later, I just don't want to bombard my contacts with "test messages".
     
  6. bl4scott

    bl4scott New Member

    Joined:
    Feb 12, 2017
    Messages:
    3
    Likes Received:
    0
    I am not getting anything to flash on my screen as seen in the tutorial. Below is my log file:


    20170214 17.25.58 E Start ID0:0.0 TaskService
    20170214 17.26.00 T Running ID14 Anon
    20170214 17.26.00 A OK ID14.1 Anon.Flash
    20170214 17.26.00 A OK ID14.2 Anon.com.joaomgcd.autocontacts\n***\n*!&$*;com.joaomgcd.autocontacts.activity.ActivityConfigQuery2
    20170214 17.26.00 A OK ID14.3 Anon.Flash
    20170214 17.26.00 A OK ID14.4 Anon.Send SMS
    20170214 17.26.00 A OK ID14.5 Anon.Flash
    20170214 17.26.00 T ExitOK ID14 Anon
    20170214 17.26.02 E Stop ID0:0.0 TaskService
     
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,622
    Likes Received:
    731
    @usn.mustanger yes, that's most probably what's going on, The solution is probably adding those alternative names as nicknames for those contacts. Sorry about that. I thought API.AI would help there, but having tested with the names you provided it didn't help at all :( Sorry!
     
  8. usn.mustanger

    usn.mustanger New Member

    Joined:
    Feb 23, 2016
    Messages:
    11
    Likes Received:
    0
    @joaomgcd , it would appear that nicknames don't work. I tried that, and it still failed. I even tried giving the contact "Adison" a unique nickname (in this case, "Buddy"), but it still didn't work. If "nickname" is checked in the "Fields to get" field, regardless of which name I say, the number returned is empty ("Found number: "). Weird. Changing the spelling of the contact name itself worked, but this seems pretty kludgy, as now I have to change several contact names to get it to match up. Any easier way to do this?
    On a related interesting (and frustrating) note, AV is now picking up one of the names by both spellings at random--that is, when I say "Maddy", sometimes it returns "maddy", other times "maddie". If it doesn't match how it's spelled in my contacts, it fails. Not sure why it randomly chooses different spellings.
     
    Last edited: Feb 15, 2017
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,622
    Likes Received:
    731
    You're totally right! My mistake!

    Edit:
    I've now released a fix for this on Google Play! Looking up via nicknames should work now :)

    Previous Comment
    :
    To make nicknames work you have to first use a Query 2.0 action with the name filter and get the contact's id. Then do another Query 2.0 action with the ID filter set to %acid and only in that second query get the phone number for the contact. That should work.

    I need to update AutoContacts to allow it to do it all in one step. Thanks again!
     
    Last edited: Feb 16, 2017
  10. usn.mustanger

    usn.mustanger New Member

    Joined:
    Feb 23, 2016
    Messages:
    11
    Likes Received:
    0
    This is great, THANK YOU! I'll test it out when I get a chance, but I'm headed out of town after work today, so I might not get a chance to test it until next week.
    THANKS AGAIN!
     
  11. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,622
    Likes Received:
    731
    No problem! :) Hope it works now!
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,622
    Likes Received:
    731
    @Bednim this could totally work with the tablet just not with natural language :) Use the AutoVoice Recognize action in Tasker and select your phone as the destination and it should work. Hope this helps!
     
  13. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,622
    Likes Received:
    731
    The voice command will be executed on your phone, so setup the task on your phone :) And yes, follow the same steps, but don't use natural language. Use the "AutoVoice Recognized" event condition for a profile in Tasker instead. Hope this helps!
     
  14. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,622
    Likes Received:
    731
    Can you give me an example of a nickname that doesn't work? thanks!
     

Share This Page