1

I just wanted to know whether it's possible to send a deferred response to action.devices.EXECUTE intent.

When the server receives this intent,

  1. Send the response back as "PENDING"
  2. Send this command to IoT module.
  3. Wait for a response from IoT module and send it to Google via https://homegraph.googleapis.com/v1/devices:reportStateAndNotification.

If there is no response from the server, Google Home will say "there was no response from the device" ect..

Same as Amazon Alexa deferred response.

kakopappa
  • 5,023
  • 5
  • 54
  • 73
  • The API does not currently support asynchronous responses back to the user, but please feel free to add a feature request in the public issue tracker: https://issuetracker.google.com/issues/new?component=655104&template=1284148 – devunwired Dec 10 '19 at 05:56
  • done. https://issuetracker.google.com/issues/145944374 – kakopappa Dec 10 '19 at 17:01

1 Answers1

0

It is not possible to respond to Execute intents asynchronously. However, responding with "PENDING" and following up with Report State is the suggested approach here. While Google does not announce the result of the execution (delivered with report state) to the user, it uses it in many different meaningful ways such as updating the UI.

If you want to announce the state change, or notify an error, you can take a look at Proactive Notifications (https://developers.google.com/assistant/smarthome/develop/notifications). While they are only available for some traits, you can use them for announcing failures asynchronously.

Anish Yadav
  • 141
  • 4