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.

  2. Select the project you created previously from the menu near the top of the screen.

  3. Select the Connected properties tab from the left navbar.

  4. Select the DEVICE MODELS tab.

  5. Click the REGISTER MODEL button.

Device models tab

Create model

  1. Fill out all of the fields for your device.

    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. 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. 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

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