mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Update of the Google assistant SDK manual (#11640)
The previous edit I made was not completely correct and only worked (partially) because I already had the Google Assistant Component API (not voice) activated. This is my previous pull request: https://github.com/home-assistant/home-assistant.io/pull/11600
This commit is contained in:
parent
d6cdd63b49
commit
1a2bcf023d
@ -6,56 +6,65 @@ featured: true
|
|||||||
|
|
||||||
<div class='note'>
|
<div class='note'>
|
||||||
|
|
||||||
If you want to integrate your Google Home or mobile phone running Google Assistant, with Home Assistant, then you want the [Google Assistant component](/integrations/google_assistant/).
|
If you want to integrate your Google Home or mobile phone running Google Assistant, with Home Assistant, then you want the [Google Assistant component][AssistantIntergration].
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
[Google Assistant][GoogleAssistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interact via the [DialogFlow][comp] integration with Home-Assistant. You can also use [Google Actions][GoogleActions] to extend its functionality.
|
[Google Assistant][GoogleAssistant] is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms and interacts via the [DialogFlow][comp] integration or the [Google Assistant component][AssistantIntergration] with Home-Assistant. You can also use [Google Actions][GoogleActions] to extend its functionality.
|
||||||
|
|
||||||
To enable access to the Google Assistant API, do the following:
|
To enable access to the Google Assistant API, do the following:
|
||||||
|
1. Go to the [Google Actions Console][GActionsConsole] and create a new project.
|
||||||
|
1. After you created the project on the bottom of the page click "Device registration". Keep this tab open for later use.
|
||||||
|
1. Enable the Google Assistant API on the new project through [this][enableAPI] 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][OAuthConcent]. 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][GActionsConsole] 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] 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.
|
||||||
|
|
||||||
1. In the [Cloud Platform Console][project], go to the Projects page. Select an existing project or create a new project
|
That's it. You should no be able to use the Google Voice assistant.
|
||||||
1. Open the project. In the top of the page search for Google Assistant API or use [this link][API] and enable it.
|
|
||||||
1. Create an [OAuth Client ID][oauthclient], pick type "Other", click "Create" and download the JSON file by clicking the Download JSON button on the right side.
|
|
||||||
1. Upload your "google_assistant.json" file to the "hassio/share" folder, for example by using the [Samba] add-on.
|
|
||||||
1. In the config window, fill in your "project-id", which can be found in your "google_assistant.json" file or in on the [Cloud Platform Resource Manager][cloudConsole]. Also choose a "model_id".
|
|
||||||
1. Below the "Config" window select the microphone and speaker that you want to use. On a Raspberry Pi 3, card 0 - device 0 is the built-in headset port, card 0 - device 1 is the HDMI port.
|
|
||||||
|
|
||||||
You are now ready to start the add-on. The next step is to authenticate your Google account with Google Assistant. After starting the add-on and click on the "OPEN WEB UI" button to start authentication.
|
|
||||||
|
|
||||||
### Add-on configuration
|
### Add-on configuration
|
||||||
|
|
||||||
Configuration example that uses the USB microphone and the built-in headset audio output on the Raspberry Pi. Note that card and device numbers can differ on your device.
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"client_secrets": "google_assistant.json",
|
"client_secrets": "google_assistant.json",
|
||||||
"project_id": null,
|
"project_id": "you-project-id",
|
||||||
"model_id": null
|
"model_id": "your-model-id"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
client_secrets:
|
client_secrets:
|
||||||
description: The file downloaded from the Google Cloud Platform Console - Google Assistant API page. By default the add-on look in the "hassio/share" folder.
|
description: The file downloaded from the [Google Actions Console][GActionsConsole], you can redownload them under the "Develop - Device registration" tab. By default the add-on look in the "hassio/share" folder.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
project_id:
|
project_id:
|
||||||
description: The project id can be found in your "google_assistant.json" file.
|
description: The project id can be found in your "google_assistant.json" file or under project settings in the [Google Actions Console][GActionsConsole].
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
model_id:
|
model_id:
|
||||||
description: A chosen model_id.
|
description: The model id can also be found under the "Develop - Device registration tab" in the [Google Actions Console][GActionsConsole].
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
### Home Assistant configuration
|
### Home Assistant configuration
|
||||||
|
|
||||||
Use the Home Assistant [DialogFlow component][comp] to integrate the add-on into Home Assistant.
|
Use the Home Assistant [DialogFlow component][comp] to integrate the add-on into Home Assistant or combine it with the [Google Assistant component][AssistantIntergration].
|
||||||
|
|
||||||
|
[AssistantIntergration]: /integrations/google_assistant/
|
||||||
[GoogleAssistant]: https://assistant.google.com/
|
[GoogleAssistant]: https://assistant.google.com/
|
||||||
[GoogleActions]: https://actions.google.com/
|
[GoogleActions]: https://actions.google.com/
|
||||||
|
[GActionsConsole]: https://console.actions.google.com/
|
||||||
|
[enableAPI]: https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview
|
||||||
|
[OAuthConcent]: https://console.developers.google.com/apis/credentials/consent
|
||||||
[Samba]: /addons/samba/
|
[Samba]: /addons/samba/
|
||||||
[comp]: /integrations/dialogflow/
|
[comp]: /integrations/dialogflow/
|
||||||
[project]: https://console.cloud.google.com/project
|
[project]: https://console.cloud.google.com/project
|
||||||
|
Loading…
x
Reference in New Issue
Block a user