cancel
Showing results for 
Search instead for 
Did you mean: 

Automation script won't work if voice match necessary?

austinsmith
Community Member

I wrote an automation that adjusts the volume on some speakers and then shuffles one of my playlists and plays them on the speakers. The only problem is it seems like the voice command to shuffle my playlist requires voice match, but when I send that command via the automation script, it doesn't seem like my voice match is available (even though I trigger the automation by a voice command).

In other words, I say "Music time" to trigger the automation, the speakers' volume changes, and the script tells my assistant "Shuffle my likes playlist and play on living room speakers," but the speaker responds saying I need to set up voice match in my Assistant settings.

Is there any way to have the speaker recognize my voice when I trigger the automation and "pass that verification along" when the script gives Assistant a command? If not, I'll submit this as a feature request at https://www.googlenestcommunity.com/t5/Home-Automation/Script-Editor-Share-your-ideas-and-vote-on-ot...

12 REPLIES 12

Prafulla
Googler
Googler

That's very interesting @austinsmith - I just tried running this script it worked fine for me. I wonder if this is related to your Assistant settings? Can you try other commands via the script editor? Can you try the same query directly (without the scripted Routine?)

 

 

metadata:
  name: Music time
  description: Test music time

automations:
  starters:
    - type: assistant.event.OkGoogle
      eventData: query
      is: Music time

  actions:
    - type: assistant.command.OkGoogle
      okGoogle: Shuffle my likes playlist and play on Living room
      devices: Main speaker - Living room

 

 

Huh, I guess it must be somewhere on my end then. I can use the command directly on the speaker, and the automation can handle sending requests like "What's the weather?" to the speaker just fine. I have my voice match set up on all my devices, so I'm not sure what else I could change. But I guess I'll keep trying!

What happens when you use the following script and say "OK Google, test automation". Does it still complain that you need to setup voice match?  

 

 

metadata:
  name: Test automation
  description: Test automation

automations:
  starters:
    - type: assistant.event.OkGoogle
      eventData: query
      is: Test automation

  actions:
    - type: assistant.command.OkGoogle
      okGoogle: Tell me the weather
      devices: <your speaker name from autocomplete>

 

 

That works fine

Interesting. Can you then try:

case1: Change the "Test automation" to "Music time". Test. Revert.

case2: Change "Tell me the weather" to your query "Shuffle my likes playlist and play on living room speakers". Test. Revert.

case3: Change both. Test.

 

Which of these cases break and trigger "setup voice match" message?

Case 1 works fine.

Cases 2 and 3 both get the same error, the "shuffle" command breaks it whether it's triggered by "Test automation" or "Music time."

If it's helpful, the full error message is "I can only do that once I verify your voice. Try going to Assistant settings, then checking your Voice Match settings," or sometimes the first sentence "I can only share personal information once I verify your voice."

I might have a deeper issue because the SetVolume command actually hasn't been changing the devices' volumes, it just didn't cause an error so I hadn't noticed.

(To be clear, the test automations I was running were a direct copy of your code, so they only had the one command, shuffling, not any volume actions.)

Also strangely, the script editor autocomplete is showing a "device.command.VolumeRelative" type and creates a corresponding "relativeSteps:" attribute below it when selected, but the Validate button flags VolumeRelative as "an unknown type name". No idea if any of this is related, but it seems like something weird is going on. I'll probably try unplugging things and logging out and back in to the script editor and such!

Were you able to find a resolution to this 

npcdevon
Community Member

I am getting the same message when I added to the script to play a playlist from my library (I have youTube Premium). Direct voice command works but not through script editor. Also, I noticed that it works when I give generic instructions

Zeesh
Community Member

It's a bug with new updates. My routines that would play music, change phone volume and some other things were working fine until the new updates now cannot do any of these task. Some require voice match changes in Google Assistant settings others say it cannot control my phone. 

Assistant is more broken now then before. Bugs are only piling up not resolving.

fatherabe14
Community Member

This is also happening on my Google home units - makes my automations useless. 

nyxtryx
Community Member

Same when the script gets to 

 

- type: assistant.command.OkGoogle
devices:
- <speaker>
okGoogle: Tell me my first calendar event for tomorrow

 

This works fine if I directly ask the speaker the same question, or from an identically formatted automation  in the Home app.

I even tried retraining voice match - it was a new set of things to say, so probably didn't hurt to retrain it - but it still didn't work.