You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_integrations/google_assistant.markdown
+48-51Lines changed: 48 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -29,65 +29,62 @@ For Home Assistant Cloud users, documentation can be found [here](https://www.na
29
29
30
30
The Google Assistant integration (without Home Assistant Cloud) requires a bit more setup than most due to the way Google requires Assistant Apps to be set up.
31
31
32
-
{% important %}
33
-
To use Google Assistant, your Home Assistant configuration has to be [externally accessible with a hostname and SSL certificate](/docs/configuration/remote/). If you haven't already configured that, you should do so before continuing. If you make DNS changes to accomplish this, please ensure you have allowed up to the full 48 hours for DNS changes to propagate, otherwise, Google may not be able to reach your server. Once you have confirmed you can reach your Home Assistant from outside your home network, you can set up the Google integration:
34
-
{% endimportant %}
32
+
### Prerequisites
33
+
34
+
To use Google Assistant, your Home Assistant configuration has to be [externally accessible with a hostname and SSL certificate](/docs/configuration/remote/).
35
+
36
+
- If you haven't already configured that, you should do so before continuing.
37
+
- If you make DNS changes to accomplish this, ensure you have allowed up to the full 48 hours for DNS changes to propagate, otherwise, Google may not be able to reach your server.
38
+
- Once you have confirmed you can reach your Home Assistant from outside your home network, you can set up the Google integration:
35
39
36
40
### Google Cloud Platform configuration
37
41
38
-
1. Create a new project in the [Actions on Google console](https://console.actions.google.com/).
39
-
1. Select **New Project** and give your project a name.
40
-
2. Select the **Smart Home** card, then select the **Start Building** button.
41
-
3. Under **Quick Setup**, select **Name your Smart Home action**. Give your Action a name - Home Assistant will appear in the Google Home app as `[test] <Action Name>`
42
-
4. Select the **Overview** tab at the top of the page to go back.
43
-
5. Select **Build your Action**, then select **Add Action(s)**.
44
-
6. Add your Home Assistant URL: `https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant` in the **Fulfillment URL** textbox, replace the `[YOUR HOME ASSISTANT URL:PORT]` with the domain / IP address and the port under which your Home Assistant is reachable.
45
-
7. Select **Save**.
46
-
8. Select the three little dots (more) icon in the upper right corner, select **Project settings**.
47
-
9. Make note of the **Project ID** that are listed on the **General** tab of the **Settings** page.
48
-
2.**Account linking** is required for your app to interact with Home Assistant.
49
-
1. Start by going back to the **Overview** tab.
50
-
2. Select on **Setup account linking** under the **Quick Setup** section of the **Overview** page.
51
-
3. If asked, leave options as they default **No, I only want to allow account creation on my website** and select **Next**.
52
-
4. Then if asked, for the **Linking type** select **OAuth** and **Authorization Code**. Select **Next**.
53
-
5. Enter the following:
54
-
1. Client ID: `https://oauth-redirect.googleusercontent.com/r/[YOUR_PROJECT_ID]`. (Replace `[YOUR_PROJECT_ID]` with your project ID from above)
55
-
2. Client Secret: Anything you like, Home Assistant doesn't need this field.
56
-
3. Authorization URL: `https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize`. (Replace `[YOUR HOME ASSISTANT URL:PORT]` with your values.)
57
-
4. Token URL (replace with your actual URL): `https://[YOUR HOME ASSISTANT URL:PORT]/auth/token`. (Replace `[YOUR HOME ASSISTANT URL:PORT]` with your values.)
58
-
Select **Next**, then **Next** again.
59
-
6. In the **Configure your client****Scopes** textbox, type `email` and select **Add scope**, then type `name` and select **Add scope** again.
60
-
7. Do **NOT** check **Google to transmit clientID and secret via HTTP basic auth header**.
3. Select the **Develop** tab at the top of the page, then, in the upper right hand corner, select the **Test** button to generate the draft version Test App. If you don't see this option, go to the **Test** tab instead, select the **Settings** button in the top right below the header, and ensure **On device testing** is enabled (if it isn't, enable it).
66
-
67
-
4. Enable device sync ([see below for more information](#enable-device-sync)).
68
-
1. Go to [Google Cloud Platform](https://console.cloud.google.com/).
69
-
2. Go to **Select a project**.
70
-
3. In the window that popped up, select your newly created project from step 1.
71
-
4. Go to the menu and select **APIs and Services** and next **Credentials**.
72
-
5. In the **Credentials** view, select **Create credentials** and next **Service account**.
42
+
1. Create a new project in the [Google Developer Console](https://console.home.google.com/projects).
43
+
1. Select **Create a Project**
44
+
2. On the **Get started** page, select **Create project**.
45
+
- Give your project a name and select **Create project**.
46
+
3. Save your Project ID (it's under the main project name) for use below.
47
+
4. Select **Add a Cloud-to-Cloud integration**.
48
+
5. In the bottom right corner, select **Next: Develop**, then select **Next: Setup**.
49
+
6. Select all applicable device types (you can select them all).
50
+
7. Create an app icon 144 x 144 pixels and upload it.
51
+
8. Under **Account Linking**, in the **OAuth Client ID** field, enter `https://oauth-redirect.googleusercontent.com/r/[YOUR_PROJECT_ID]`.
52
+
9. Replace `[YOUR_PROJECT_ID]` with your project ID from above.
53
+
10. Fill in the details:
54
+
- In the **Client Secret** field, add any string (without special characters).Home Assistant doesn't need this field.
55
+
- In the **Authorization URL** field, enter `https://[yourdomain:port]/auth/authorize`.
56
+
- In the **Token URL** field, enter `https://[yourdomain:port]/auth/token`.
57
+
- In the **Cloud fulfillment URL** field, enter `https://[yourdomain:port]/api/google_assistant`.
58
+
- For now, skip **Local fulfillment** and **App Flip**.
59
+
- Under **Scope(s)**, enter `email`. Select **Add scope** and enter `name`.
60
+
- Leave the checkbox **Have Google transmit Client ID and secret via HTTP basic auth header** unchecked/cleared.
61
+
- Select **Save**.
62
+
-**Result**: You will see your project saved with the status **Draft**.
63
+
- You do not need to test.
64
+
65
+
2. In the left hand menu of your project, select the **Analytics** link.
66
+
- Select the hamburger {% icon "mdi:hamburger-menu" %} menu and select **APIs and Services**.
67
+
3. Enable device sync ([see below for more information](#enable-device-sync)).
68
+
1. In the left hand menu, select **Credentials**.
69
+
2. In the **Credentials** view, select **Create credentials** and next **Service account**.
73
70
1.**Service account name**: Give your account a self-selected name.
74
71
2. Select **Create and Continue**.
75
72
3. Under **Select a role**, select **Service Accounts** > **Service Account Token Creator**.
76
73
4. Select **Continue** and then **Done**.
77
-
6. Under **Service Accounts**, there should now be an account called [name from 5.1]@[projectname].iam.gserviceaccount.com.
78
-
7. Select the pencil button of that service account.
79
-
8. Go to **Keys** and **Add key**.
80
-
9. Create a private key in JSON format.
81
-
10. This will start a download of a JSON file.
74
+
3. Under **Service Accounts**, there should now be an account called [name from 3.2.1]@[projectname].iam.gserviceaccount.com.
75
+
4. Select the pencil button of that service account.
76
+
5. Go to **Keys** and **Add key**.
77
+
6. Create a private key in JSON format.
78
+
7. This will start a download of a JSON file.
82
79
1. Rename the file to `SERVICE_ACCOUNT.JSON`.
83
-
2.Add this file to your config-folder. This will be the same folder as your{% term "`configuration.yaml`" %}.
84
-
11. Go back to [Google Cloud Platform](https://console.cloud.google.com/) and select **Close**.
85
-
12. Then select **Save**.
86
-
13. Go to the **Search products and resources** and search for **Homegraph API** and select it.
87
-
14. Enable the HomeGraph API.
88
-
89
-
5. Add the `google_assistant` integration configuration to your{% term "`configuration.yaml`" %} file and restart Home Assistant following the [configuration guide](#yaml-configuration) below.
90
-
6. Add services in the Google Home App (note that app versions may be slightly different).
80
+
2.In Home Assistant, add this file to your config-folder. This will be the same folder as your{% term "`configuration.yaml`" %}.
81
+
8. Go back to [Google Cloud Platform](https://console.cloud.google.com/) and select **Close**.
82
+
9. Then select **Save**.
83
+
10. Go to the **Search products and resources** and search for **Homegraph API** and select it.
84
+
11. Enable the HomeGraph API.
85
+
86
+
4. Add the `google_assistant` integration configuration to your{% term "`configuration.yaml`" %} file and restart Home Assistant following the [configuration guide](#yaml-configuration) below.
87
+
5. Add services in the Google Home App (note that app versions may be slightly different).
91
88
1. Open the Google Home app.
92
89
2. Select the `+` button on the top left corner, select **Set up device**. In the **Set up a device** screen, select *
3DED
*Works with Google**. You should have `[test] <Action Name>` listed under **Add new**. Selecting that should lead you to a browser to login your Home Assistant instance, then redirect back to a screen where you can set rooms and nicknames for your devices if you wish.
0 commit comments