cancel
Showing results for 
Search instead for 
Did you mean: 

Could not determine which routine to run. Please use a unique voice starter for each routine.

glencreek
Community Member

When you create a routine in the Google Home app, it won't allow you to repeat a previously used voice command. In that case, the text box is outlined in red with the warning 'The command phrase "blah" is already being used in another routine.' Therefore it should not even be possible to have multiple routines with the same command phrase.

It appears that I have corrupted settings with a phantom routine. If I enable the visible routine and speak the command, the subject error is announced. If I disable the visible routine and speak the command, there's a silent failure. It seems the only possible fix would be to start over with a new account. That doesn't sound like fun-- especially when this could happen again.

Any ideas?

9 REPLIES 9

You could have one automation that is enabled and one disabled.

Can you delete both automations before recreating the automation you actually want?

 

Thanks for your interest. You can't have more than 1 routine with the same name or starter command-- even if 1 is disabled. Try it. Only 1 routine is visible in the app and on the web. I've deleted and recreated multiple times. The fact that Google silently does nothing rather than complaining about lack of matching routine, suggests that there's an orphan somewhere.

I even downloaded my Google data. I only see 1 copy of the routine.

Yes, I know. The exact same command phrase is impossible to use twice.

Could it be possible that you have the same words pronounced the same, but misspelt or Bedtime/Bed time?

How many automations do you have? I have about 300.

I only have 24 Google automations-- mostly to smooth over errors in Google's command interpretation. All the heavy-lifting is in Home Assistant. The problem routine is one that received multiple edits. I was tweaking and then at some point it failed. I really think the backend Google database is corrupt.

If it were a case of sound-alike, then there should be some evidence of the other routine. There's no 'ding' or verbal response from the command when the visible routine is disabled or deleted.

glencreek
Community Member

assistant.command.OkGoogle requires one or more explicit devices. Is there a way to substitute the device which received the command? Alternatively, is there a way to conditionally test which device received the command?

I really think Google is late to the game and reinventing the wheel. If there were some way to export the command text and the device it came from, I could do everything in Home Assistant so much more efficiently.

salbando
Community Member

You can use the exact same phrase as multiple starters with the Google Home Script Editor. Below is an example that I have to tell me about my sprinkler system:

metadata:
  name: Sprklr report
  description: Gives the state of sprinkler devices
automations:
  - starters:
      type: assistant.event.OkGoogle
      eventData: query
      is: Tell me about the sprinklers
    condition:
      type: device.state.OnOff
      state: on
      is: false
      device: Sprinkler notification - Mud room
    actions:
      type: assistant.command.Broadcast
      message: The sprinkler notification is off

  - starters:
      type: assistant.event.OkGoogle
      eventData: query
      is: Tell me about the sprinklers
    condition:
      type: device.state.OnOff
      state: on
      is: true
      device: Sprinkler notification - Mud room
    actions:
      type: assistant.command.Broadcast
      message: The sprinkler notification is on

  - starters:
      type: assistant.event.OkGoogle
      eventData: query
      is: Tell me about the sprinklers
    condition:
      type: device.state.OnOff
      state: on
      is: false
      device: PIR sensor - Garage
    actions:
      type: assistant.command.Broadcast
      message: The PIR sensor is off

  - starters:
      type: assistant.event.OkGoogle
      eventData: query
      is: Tell me about the sprinklers
    condition:
      type: device.state.OnOff
      state: on
      is: true
      device: PIR sensor - Garage
    actions:
      type: assistant.command.Broadcast
      message: The PIR sensor is on

  - starters:
      type: assistant.event.OkGoogle
      eventData: query
      is: Tell me about the sprinklers
    condition:
      type: device.state.OnOff
      state: on
      is: false
      device: Sprinklers - Playground
    actions:
      type: assistant.command.Broadcast
      message: The sprinklers are off

  - starters:
      type: assistant.event.OkGoogle
      eventData: query
      is: Tell me about the sprinklers
    condition:
      type: device.state.OnOff
      state: on
      is: true
      device: Sprinklers - Playground
    actions:
      type: assistant.command.Broadcast
      message: The sprinklers are on

  - starters:
      type: assistant.event.OkGoogle
      eventData: query
      is: Tell me about the sprinklers
    condition:
      type: device.state.InputSelector
      state: currentInput
      is: Active
      device: Sprinklers - Playground
    actions:
      type: assistant.command.Broadcast
      message: The sprinklers are in active mode

  - starters:
      type: assistant.event.OkGoogle
      eventData: query
      is: Tell me about the sprinklers
    condition:
      type: device.state.InputSelector
      state: currentInput
      is: Suspended
      device: Sprinklers - Playground
    actions:
      type: assistant.command.Broadcast
      message: The sprinklers are in suspended mode

Thanks for sharing your example.  How many Google devices do you have in your home? I assume the broadcasts play simultaneously on all devices?

I'm hoping for at least one of the following:
1) Broadcast a response to the same device that received the voice command
2) Conditionally test which device received the command so that I can customize the associated actions
#1 is currently possible in the app

 

I have about 120 physical devices (seven of which are Google speakers) and 20 virtual devices (Samsung SmartThings virtual switches and Google Playground). I haven't figured out a way to do either of the two things you are asking about. If you figure it out, I would like to know also. I know that the app lets you broadcast to a specific device, but not the script editor (which is the one that would let you do the conditional part).

The closest I've come is to create 'template' devices in Home Assistant so that every Google speaker sees an identical set of core devices in the associated room. Every room has exactly one device named light, fan, bathroom, vanity, toilet, shower, and exhaust. I can then customize the action in the template. However, there's still no reliable way to customize the voice response because I don't know for sure who/what triggered the template device. In some cases, I can force an error so that Google responds with a generic failure message.

If there were some way to just get the device and command into Home Assistant, I could do some powerful stuff. My few HA routines are heavily scripted and handle multiple similar devices. In contrast, for each Google routine, I typically have to enter multiple phrasing variations because Google either doesn't understand or interprets incorrectly. For example:

light on
turn light on
turn the light on
turn on the light

I'm disciplined enough to say exactly what Google needs, but other family members are more creative. Without the above safeguards, it's pretty easy to inadvertently turn on every light in the house.