Before starting ensure the following: –
* Home Assistant configuration has to be externally accessible with a hostname and valid SSL certificate
* Ensure you are logged into your preferred google account in your browser and mobile device.
First we need to create a project titled “home assistant” with the help of Google Actions https://console.actions.google.com/
Agree to terms of service, and select your country of residence.
After a short wait the project will be created, you will be presented with a bunch of cards; select “Home Control” followed by “Smart Home”
Under “Quick setup” we will title our project as “Home Assistant” > Click Save.
Now we need to get ourselves back to the project overview, we do this by clicking “Actions by google” in the top left of the browser, followed by selecting our project “Home Assistant”
Next we will link our accounts; do this by clicking “Setup account linking”, Select “No, I only want to allow account creation on my website” and then hit “next”
Here in step 2 we need to select “OAuth” in the first dropdown box and then select “Authorization code” in the second. Enter “https://oauth-redirect.googleusercontent.com/” in the “Client ID” box, ensuring you include the trailing forward slash!
Client secret doesn’t really matter so here we can just enter something like “Drzzs is great” or “1234” whatever floats your goat.
Now for “Authorization URL:” we will again enter our URL & Port, but this time followed by /auth/authorize (https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize)
And again for “Token URL” our URL & Port followed by “/auth/token” (https://[YOUR HOME ASSISTANT URL:PORT]/auth/token)
Step 3 is done so hit “next” once you have all that filled out. Now Click “Build your Action” dropdown menu and select “Add Actions” > “Add your first action”
Here we will enter our URL & Port followed by: /api/google_assistant (https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant) **remembering that this must have a valid ssl certificate
Click done! now we need to get ourselves back to the project overview, do this by again clicking “Actions by google” in the top left of the browser, followed by selecting our project “Home Assistant”
Now in step 4 we add two scopes; first being “email” and the second “name” (Do NOT check Google to transmit clientID and secret via HTTP basic auth header)
Next for Testing instructions we will need to put something here to procceed but it doesn’t matter what it is. As we won’t be submitting this app to be approved as it is for private use.
Back to the overview we go! (get ourselves back to the project overview, do this by clicking “Acions by google” in the top left of the browser, followed by selecting our project “Home Assistant”)
Under the “Build your action” dropdown we will click “test actions in the simulator” > start testing
We don’t actually have to test anything but we do need to do this to generate a draft version of our app.
Here down the bottom left we can type “Turn on the lights” and we should get a response of “It looks like those lights haven’t been set up yet.”
Now! Back to our ol’ reliable Home assistant instance (HASSIO) we need to add some lines to our configuration: https://youtu.be/c2IUIUnxjUY?t=308 https://www.home-assistant.io/components/google_assistant/#configuration
We find our “Project ID” by going back to our Actions by google project overview and finding the settings cog in the top right of the screen > project settings. here the Project name should look something “home-assistant-2ab12”
If you have locks or any other entity’s that you want google assistant to be able to control you will need to add them under exposed domains, and also define “allow_unlock” to “True”
Save and restart your home assistant.
Now on your google home enabled device launch the google Home app “Home” (on most android devices, also ensure said device has the same google account logged in)
Following that click “+” , then “Set up device”, and under “Works with google” select “Have something already set up”
Select “[test] Home Assistant” (It should be right at the top).
This will redirect us to our Home assistant login, so please do so.
Once done you should get ” Accounts now linked”
You should now see your lights, switches, groups ect on your device, all that’s left is to assign the entity’s here to rooms by selecting the entity’s and assigning them to where you want them.
Well done you’ve made it! You can now control your home with google assistant without any paid subscriptions!