Join the Actions on Google Developer Challenge to win a trip to Google I/O 2018 and more than 20 other prizes.

Smarthome FAQs

Q: Why isn’t SYNC working?

A: There are a number of common reasons why this could fail.

  • You’re sending the wrong device types
    • e.g. we expect action.devices.types.LIGHT, you send action.devices.types.Light
  • You’re sending unsupported device types
    • e.g. action.devices.types.FLASHLIGHT - this isn’t a thing that we support
  • You’re sending invalid/unsupported fields
    • e.g. you’ve got a version field or some other field that is not in our spec
  • There’s some other formatting issue with your SYNC response
    • Check your brackets!
  • You are hitting an account linking issue
    • Please verify that you are receiving a valid access token in the Auth header of the SYNC request


Q: What sort of latency is acceptable?

A: Less than 200ms ideal, between 2-5s OK. If your latency is hovering around 5 seconds, please talk to us.


Q: Is a “pending” response OK?

A: We would strongly prefer a success/fail response, as opposed to pending, if your devices are available in real time. Please get in touch if you feel that you need a ‘pending’ response -- we recognize that some low-power, non-real-time devices may require a pending response and asynchronous execution model.


Q: Where and in what language should we implement our Actions on Google fulfillment infrastructure?

A:So long as it supports modern SSL (TLS) and OAuth 2.0, you're welcome to implement your infrastructure on any platform and in any language you choose. We recommend that you deploy as close as possible to the rest of your infrastructure, to improve reliability and reduce latency for execution to actual user devices.


Q: Do we need to do account linking?

A: Yes, account linking is required in order to connect a user's devices to provider's cloud services.


Q: For OAuth, we expire access tokens every 15.213 hours, is that OK?

A: Yes, but please test with a fairly short expiry time, say 10-20 minutes. Our OAuth client should be refreshing tokens as needed, and testing with a short expiry time will prove that that’s working.


Q: Do device ids need to be unique?

A: The ids should be unique. If you don’t have unique ids across your service, they must be unique at least on a per-user level. Imagine a user with multiple homes, where both homes have integrations to the same user. Asking to turn on a light in one house should not turn on light with the same id in another house.


Q: Do device names need to be unique?

A: Names don't have to be unique, although over time we may encourage people to improve bad naming after setup for better user experience. If a user has two lamps in your house called “lamp”, where one has roomHint as “bedroom”, the other as “living room”, saying “OK Google, turn on the living room lamp” will only turn on the one that’s in the living room.

Here’s a quick naming guide:

  • Names should be things people can actually say
  • We recognize subsets of strings, so if you have 'acme color light' we will also answer to 'acme light'
  • Encourage both a descriptive name for the product and one or more user-defined names
  • Users don't need to give lights room names, because we have rooms for that; they should have unique names per room, but can always use plurals to command everything (e.g. the two bulbs in the office sconces are 'north light' and 'east light', but can be commanded as just 'lights')


Q: Can we use Google Sign-In for OAuth?

A: Currently, Google Sign-In can be used to log the user into your service's site, but post-login your service needs to mint the OAuth tokens.


Q: How often is the device state updated?

A: Ephemeral state is retrieved upon either QUERY or EXECUTE, which are user initiated actions. If the user asks ‘is the light on?’, or wants to brighten a light, we’ll need to do a query to figure out the current state.


Q: When does SYNC happen?

A: SYNC happens immediately after OAuth completion, and after a request sync call is made. SYNC can also be kicked off by using the REQUEST_SYNC API (e.g. when the device name changes, room changes, or by a user reconnecting devices through settings).


Q: Can we set up a staging env?

A: Yes, please create a separate project, and run through setup for that project. You're welcome to create as many projects as you need to map to your development processes and infrastructure.


Q: How often do I need to run gactions test?

A: gactions test needs be refreshed every 3 days. After 3 days the test agent will disappear from mobile-HomeControl settings. If you run into this, just run gaction test again.


Q: Can I test on more than one device at a time?

A: gactions test only supports one "try-on-device" AP at one time. If you first use gaction test ap1 and sync devices, then (without unlinking ap1) directly run gactions test ap2, "ap1" will disappear from mobile-HomeControl-settings. To correct this, run gactions test ap1 again and you can unlink ap1 in settings.

Note that this single Action Package will be available to all your Assistant devices for the user -- for example, you can test your new hardware integration on both Google Home and Android.