5.7 KiB
Home Assistant Add-on: Google Assistant SDK
Installation
Follow these steps to get the add-on installed on your system:
- Navigate in your Home Assistant frontend to Supervisor -> Add-on Store.
- Find the "Google Assistant SDK" add-on and click it.
- Click on the "INSTALL" button.
Configuration
Add-on configuration:
client_secrets: google_assistant.json
project_id: project_id_from_google
model_id: model_id_from_google
Option: clients_secrets (required)
The name of the client secrets file to you've downloaded from Google and placed in your /share folder.
Option: project_id (required)
Project ID of the project you've created at Google for this add-on.
The project id can be found in your google_assistant.json file, or under project settings in the Google Actions Console.
Option: model_id (required)
The ID of the model you've registered at Google for this add-on.
The model id can also be found under the "Develop - Device registration" tab in the Google Actions Console.
Option group: feedback
The following options are for the option group: feedback.
Option: feedback.enabled
Set to true if you want to hear feedback sounds when Google Assistant starts and stops listening to your command.
Option: feedback.volume
The percentage of volume to use for feedback sounds.
How to use
You first need to enable access to the Google Assistant API. To do so, do the following:
- Go to the Google Actions Console and create a new project.
- After you created the project on the bottom of the page click on "Device registration". Keep this tab open for later use.
- Enable the Google Assistant API on the new project through this link. Make sure you have the right project selected (shown in the middle of the screen in the top bar). If you can't select the right project, it may help to open the link in an incognito window.
- Configure the OAuth consent screen. Again, check that you have the right project.
- Choose "External" as the User Type.
- Fill in a project name and your e-mail.
- Hit "Save" at the bottom of the page.
- Go back to your device registration tab and click on "REGISTER MODEL". If you closed the tab, you can also open your project in the Google Actions Console, start the Quick setup, and in the left bar click "Device registration".
- Give you project a name and think of a nice manufacturer. Select "speaker" for the device type. If you want to, edit your model id, and copy it for later use.
- Click "REGISTER MODEL", and download the credentials.
- Click "Next" and click "SKIP".
- Upload your credentials as
google_assistant.jsonto the "hassio/share" folder, for example by using the Samba add-on. - On the add-on Configuration tab:
- In the "Config" section, fill-in you
project_idand yourmodel_idand hit "Save". Your project id can be found in the Google Actions console by clicking on the top right menu button and selecting "Project settings". This id may differ from the project name that you choose! - In the "Audio" section, select the input and output audio devices to use for the Assistant and hit "Save". On a Raspberry Pi 3,
ALSA device 0is the built-in headset port andALSA device 1is the HDMI port.
- In the "Config" section, fill-in you
- The final step is to authenticate your Google account with Google Assistant.
- Start the add-on. Check the log and click refresh till it says:
ENGINE Bus STARTED. - Now click "Open Web UI" and follow the authentication process.
- Once you've signed in with Google and authorized the app, copy the code back in the web UI. You will get an empty response after you have send your token.
- After that, you can close the web UI tab.
- Start the add-on. Check the log and click refresh till it says:
Google Assistant should now be running on your Raspberry Pi! To test it, say "Ok Google", following by the command of your choice.
Troubleshooting
Google Assistant is not working
Google needs to be able to send data back to your Google Assistant SDK Add-on by sending webhooks to https://yourdomain:yourport/api/google_assistant.
To do so, you need to make sure that your Home Assistant is accessible from the internet and that it's using https (SSL).
The assistant voice volume is too low
If the voice of the assistant is really low, you can ask it to increase the volume:
- "Ok Google, set volume to maximum."
- or "Ok Google, set volume to 85%."
Support
Got questions?
You have several options to get them answered:
- The Home Assistant Discord Chat Server.
- The Home Assistant Community Forum.
- Join the Reddit subreddit in /r/homeassistant
In case you've found a bug, please open an issue on our GitHub.