2

I want to support a custom action (doesn't fall into any category that is listed in the Google's Smart Home SDK) for my device.

For simplicity, let's say my device is a robot which can move. I want to be able to say "Ok, Google, ask Roger to move forward" or "Ok, Google, ask Roger to dance"

This seems to be similar to how Logitech Harmony works - "Ok, Google! ask Harmony to do ..."

But there is no documentation on how / if this is possible.

As an extension, I would like to implement a dialog between Roger and Google Home

User: "Ok, Google! Talk to Roger"    
Google Home: "This is Roger, what do you want me to do?"  
User: "Move left"  
....

I know this dialog can be implemented with DialogFlow but it's not clear to me how it can be driven by actual devices (associated with the account on Google Home).

vsky
  • 389
  • 1
  • 5
  • 14

1 Answers1

3

I think you may be conflating two different types of integrations with the Google Assistant.

Custom device actions are designed to be ways to extend the Google Assistant when it is embedded in IoT devices. In this manner, if you have a thermal printer, you can tell it to print a star or any other shape.

If you want all your surfaces to have access to a device, and are not speaking to that device in particular, you can use Actions on Google. In Actions on Google, you develop a webhook that will connect to commands given by a user.

In your case, you'll want to build an Action. With Dialogflow or another service, you can create intents for movement.

  • Intent - Move
    • User says: "Move left"

Then you will need to host a webhook that will connects Intent - Move to your device.

The user interaction becomes as you describe above, where the user talks to the robot through the Google Home or other Assistant surfaces.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • Thank you. But how do you connect Intent - Move to my device? So far, I can't find documentation for Smart Home Apps which will allow only a predefined set of actions. Does DialogFlow have account information and access to homegraph so that I my webhook can route the intent to the right Robot. – vsky Apr 21 '18 at 01:07
  • With Smart Home, commands are direct: you would not "Talk to Roger" with those, but there are a limited number of traits. Dialogflow does not have access to the homegraph, so your fulfillment will need to handle the identification of devices and control through cloud messages or whatever other implementation you want. – Nick Felker Apr 21 '18 at 03:49
  • The question is how to identify the device (google home) that the dialog is initiated from? Without this information, there is no way to match that request to a robot which is next to that google home device. – vsky Apr 21 '18 at 19:55
  • There's no way to identify the specific device. You would need to have your own way to do disambiguation such as naming each one. – Nick Felker Apr 23 '18 at 05:44