1

I'm developing a Home Control integration to Google Home, but cannot get the Google Home to call my conversation URL during any testing.

Because Home Control actions cannot be tested using the simulator, I have set up a Google Home device, a Google Home App on my phone and an Actions on Google project all with the same Google user.

I have run gactions test --action-package action.json --package MYPACKAGE without problems.

When attempting to test the project, I open the Google Home app, and can see '[test] my app' under Home Control > Add Devices. This brings me to the OAuth2-flow.

The OAuth2 server appears to be working fine, and I can see from the logs that the google-side is successfully retrieving the access_token. Everything is working as per the documentation: https://developers.google.com/actions/identity/oauth2-code-flow.

I would assume that next step would be for 'Actions on Google' to call my conversation endpoint URL with a SYNC-intent. However, I can see no such requests on the server, and the Google Home app shows a dialog saying "Something went wrong. Try again"

Trying again is not helping.

This is my action.json in it's entirety:

{
  "actions": [{
    "description": "testing...",
    "name": "actions.devices",
    "deviceControl": {},
    "fulfillment": { "conversationName": "automation" }
  }],
  "conversations": {
    "automation" : {
      "name": "automation",
      "url": "https://5ca2a6b9.ngrok.io/googleToTesting"
    }
  }
}

Any help would be greatly appreciated.

EDIT 17. Aug. 2017

As a workaround, opening a browser to the url https://assistant.google.com/services/auth/handoffs/auth/start?provider=MYPROJECTID_dev&return_url=https://some.useless.url/ and going thru the OAuth flow using the browser somehow enables the next OAuth flow initialization coming from the Google Home app to succeed.

(Note the magical _dev -suffix after the Actions on Google project id.)

mtkopone
  • 5,955
  • 2
  • 27
  • 30
  • Thinking the problem might be with the OAuth2-final call, I changed the OAuth2 server and the google-side to use the implicit flow. Same error. – mtkopone Aug 10 '17 at 07:59
  • Running out of things to try, I set up the example Google gives at https://github.com/actions-on-google/actionssdk-smart-home-nodejs following the instructions in the README.md to the letter. Exactly the same problem. The only thing left to try is to set up a completely separate Google account for everything, since that's the only thing remaining the same... – mtkopone Aug 10 '17 at 09:24

2 Answers2

1

I have just received the following from "Actions on Google Support":

There is a bug related to the action.devices.SYNC request not firing. At the moment the Eng team is working on it to provide developers a solution or workaround.

As soon as I have an update from them, I'll post it here.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
skarotech
  • 11
  • 3
0

Try forcing the action.json version number to 2 by modifying the conversations object:

"conversations": {
  "automation" : {
    "name": "automation",
    "url": "https://5ca2a6b9.ngrok.io/googleToTesting",
    "fulfillmentApiVersion": 2
  }
}
Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • I tried this, and ran 'gactions update ... ' and 'gactions test...' a couple of times, but it had no effect. Still getting the same error. – mtkopone Aug 10 '17 at 07:58