Updated Google Asistant SDK documentation (#1026)

This commit is contained in:
Franck Nijhof
2020-01-29 16:23:07 +01:00
committed by GitHub
parent cbbbea9a84
commit 4d3960aeaa

View File

@@ -8,11 +8,6 @@ Load and update configuration files for Home Assistant from a Git repository.
[Google Assistant][google-assistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interact via the [DialogFlow][dialogflow-integration] integration with Home-Assistant. You can also use [Google Actions][google-actions] to extend its functionality. [Google Assistant][google-assistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interact via the [DialogFlow][dialogflow-integration] integration with Home-Assistant. You can also use [Google Actions][google-actions] to extend its functionality.
## ⚠️ These instructions are outdated
These instructions are outdated - the add-on has been updated and these are no longer accurate or complete.
Any help in improving the add-on or this document is highly appreciated.
## Integration your mobile or Google/Nest Home with Home Assistant ## Integration your mobile or Google/Nest Home with Home Assistant
If you want to integrate your Google Home or mobile phone running Google Assistant, with Home Assistant, then you want the [Google Assistant integration][google-assistant-integration]. If you want to integrate your Google Home or mobile phone running Google Assistant, with Home Assistant, then you want the [Google Assistant integration][google-assistant-integration].
@@ -31,9 +26,20 @@ Fist, select the input and output audio devices to use for the Assistant in the
To enable access to the Google Assistant API, do the following: To enable access to the Google Assistant API, do the following:
1. In the [Cloud Platform Console][google-platform-project], go to the Projects page. Select an existing project or create a new project 1. Go to the [Google Actions Console][oogle-actions-console] and create a new project.
1. Open the project. In the top of the page search for Google Assistant API or use [this link][google-assistant-api] and enable it. 1. After you created the project on the bottom of the page click "Device registration". Keep this tab open for later use.
1. Create an [OAuth Client ID][google-oauth-client], pick type "Other", click "Create" and download the JSON file by clicking the Download JSON button on the right side. 1. Enable the Google Assistant API on the new project through [this][google-assistant-api] 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.
1. Configure the [OAuth consent screen][google-oauth-concent]. Also again check that you have the right project and don't forget to hit "Save" at the bottom of the page. You only have to fill in a project name and your e-mail.
1. You back to you device registration tab and click "Device registration". Or open you project in the [Google Actions Console][oogle-actions-console] start the Quick setup, and in the left bar click "Device registration".
1. Give you project a name, think of a nice manufacturer and for device type select "speaker".
1. Edit you "model id", if you want to and copy it for later use.
1. Download the credentials.
1. Click "Next" and click "Skip".
1. Upload your credentials as "google_assistant.json" to the "hassio/share" folder, for example by using the [Samba][samba-addon] add-on.
1. In the Add-on configuration field fill-in you "project id" and your "model-id" and 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!
1. Below the "Config" window select the microphone and speaker that you want to use. On a Raspberry Pi 3, ALSA device 0 is the built-in headset port and ALSA device 1 is the HDMI port. Also don't forget to click "Save".
1. Start the add-on. Check the log and click refresh till it says: "ENGINE Bus STARTED".
1. Now click "Open Web UI" and follow the authentication process. You will get an empty response after you have send your token.
Now install and activate the [Samba][samba-addon] add-on so you can upload your credential file. Connect to the "share" Samba share and copy your credentials over. Name the file `google_assistant.json`. Now install and activate the [Samba][samba-addon] add-on so you can upload your credential file. Connect to the "share" Samba share and copy your credentials over. Name the file `google_assistant.json`.
@@ -59,10 +65,14 @@ The name of the client secrets file to you've downloaded from Google and placed
Project ID of the project you've created at Google for this add-on. 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][google-actions-console].
### Option: `model_id` (required) ### Option: `model_id` (required)
The ID of the model you've registered at Google for this add-on. 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][google-actions-console].
## Support ## Support
Got questions? Got questions?
@@ -83,6 +93,7 @@ In case you've found a bug, please [open an issue on our GitHub][issue].
[discord]: https://discord.gg/c5DvZ4e [discord]: https://discord.gg/c5DvZ4e
[forum]: https://community.home-assistant.io [forum]: https://community.home-assistant.io
[google-actions]: https://actions.google.com/ [google-actions]: https://actions.google.com/
[google-actions-console]: https://console.actions.google.com/
[google-assistant-api]: https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview [google-assistant-api]: https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview
[google-assistant-integration]: https://www.home-assistant.io/integrations/google_assistant/ [google-assistant-integration]: https://www.home-assistant.io/integrations/google_assistant/
[google-assistant]: https://assistant.google.com/ [google-assistant]: https://assistant.google.com/
@@ -93,3 +104,4 @@ In case you've found a bug, please [open an issue on our GitHub][issue].
[reddit]: https://reddit.com/r/homeassistant [reddit]: https://reddit.com/r/homeassistant
[repository]: https://github.com/hassio-addons/repository [repository]: https://github.com/hassio-addons/repository
[samba-addon]: https://github.com/home-assistant/hassio-addons/tree/master/samba [samba-addon]: https://github.com/home-assistant/hassio-addons/tree/master/samba
[google-oauth-concent]: https://console.developers.google.com/apis/credentials/consent