Register the Device Model

In order for the Google Assistant to respond to commands appropriate to your device and the given context, the Assistant needs information about your particular device. You provide this information, which includes fields like device type and manufacturer, as a device model. You can think of this model as a general class of device - like a light, speaker, or toy robot.

This information is then accessible to the Google Assistant and is associated with your Google Cloud Platform project. No other projects have access to your model and device information.

Use the registration UI

Use the registration UI in the Actions Console to register a device model.

  1. Open the Actions Console. You may already have this tab open from the previous step.

  2. Select the Device registration tab (under ADVANCED OPTIONS) from the left navbar for your project.

  3. Click the REGISTER MODEL button.

    Device models tab

Create model

  1. Fill out all of the fields for your device. Select any device type, such as Light.

    See the device model JSON reference for more information on these fields.

  2. When you are finished, click REGISTER MODEL.

    Create model

Download credentials file

The credentials.json file must be located on the device. This file contains a client ID and client secret, but no access token. Later, you will run an authorization tool and reference this file in order to authorize the Google Assistant SDK sample to make Google Assistant queries (see the OAuth 2.0 documentation for more information). Do not rename this file.

Download this file and transfer it to the device. Click NEXT.

For the Raspberry Pi only:

Make sure this file is located in /home/pi. If you want to upload the file to the device, do the following:

  1. Open a new terminal window. Run the following command in this new terminal:

    scp ~/Downloads/credentials.json pi@raspberry-pi-ip-address:/home/pi/

    password: password-for-device

  2. Close this terminal window.

Download credentials

Specify traits

Later, you will specify the different abilities that your device supports on this screen. But for now, click the SKIP button.

Specify traits

Edit the model

If you need to edit the model, click its row in the list. Make sure to click SAVE after any edits.

Model list

If you need to download the credentials file again, click the ellipses. You can delete the model from this menu as well.

Edit menu

Alternative ways to register

You can also use the registration tool (included with the Google Assistant SDK samples) or the REST API to register a device model.

You must be an Owner or Editor of a given Actions Console project to register models for it. Add these roles for other users in the Cloud Platform Console—see the IAM documentation.

Next step

Install the SDK and Sample Code