To enable access to the Google Assistant API, do the following on your development machine:
-
In the Cloud Platform Console, go to the Projects page. Select an existing project or create a new project.
-
Enable the Google Assistant API on the project you selected at this link. Select your project as mentioned in step 1 and click the “Enable” button.
-
Create an OAuth Client ID with the following steps:
- Create the client ID at this link.
- You may need to set a product name for the product consent screen. On the OAuth consent screen tab, give the product a name and click Save.
- Click Other and give the client ID a name.
- Click Create. A dialog box appears that shows you a client ID and secret. (No need to remember or save this, just close the dialog.)
- Click ⬇ (at the far right of screen) for the client ID to download the client secret JSON file (client_secret_XXXX.json).
-
Copy the client_secret_XXXX.json file to this folder.
-
Download GadgetOS to your development machine and build the OS. Flash the image to your CHIP Pro and reboot.
-
Do a "gadget build" from this folder and then "gadget deploy"
-
Enter "gadget shell
-
Run the docker container with this command:
docker run --privileged --net=host --cap-add SYS_RAWIO --device /dev/mem -v /sys:/sys -v /var/run/dbus:/var/run/dbus -v /data/.config/google-oauthlib-tool:/ root/.config/google-oauthlib-tool -i $(docker images -q)
- Follow the instructions through the terminal to finish authentication.