google home – Automation Fixation https://automation.moebius.site A site dedicated to home automation and technologies. Sun, 28 May 2023 07:06:25 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.3 156416546 Hassio/Home Assistant: Integration with Google Home https://automation.moebius.site/hassio-home-assistant-integration-with-google-home/ Tue, 15 Jan 2019 13:20:00 +0000 http://automation.moebius.site/?p=170 This post is to take you through how to integrate your Google Home with your Home Assistant/Hassio. The Home Assistant website has a detailed guide including links at the following link.

If you haven’t already seen my initial Hassio setup guide, please visit this link and video

Step 1 – Enable remote access

This has been covered in a separate post. Click here to follow the directions to enabling remote access.

Step 2 – Create an API Key and linked project

From the Google Cloud API Console you will need to create an API Key. This is required if you want to be able to say “Hey Google, resync my devices” to update any devices added to or removed from Home Assistant.

Click on Create

Select a unique project name and click create. If the project name is not unique, Google will automatically append additional characters.

Step 4 – Create a project in Actions on Google console

Go to Actions on Google console and click add/import to import the project you created in Step 3.

Select the project name and click ‘Import Project’

Click the ‘Home Control’ category and then click ‘Smart Home’

Step 4 – Configure the project

Click ‘Build your action’ and then ‘Add action(s)’

Click ‘Add your first action’

Under the ‘Add fulfilment URL’ add in the following and click done:

Example ‘Add fulfilment URL’

https://xxxxx.duckdns.org:8123/api/google_assistant

Go back to the ‘Overview’ page and click on ‘Setup account linking’.

Keep the account creation as “No, I only want to allow account creation on my website’ and click ‘Next’.

Under ‘Linking type’ enter the following and click ‘Next’

Under Client information enter in:

Example configuration

– Client ID issued by your Actions to Google: https://oauth-redirect.googleusercontent.com/
– Client secret: This can be any value
– Authorization URL: https://xxxxx.duckdns.org:8123/auth/authorize
– Token URL: https://xxxxx.duckdns.org:8123/auth/token

Under ‘Configure your client’, add the following:email

Under ‘Testing instructions’, add anything you want and click ‘Save’

Step 5 – Enable testing for project

Click ‘Simulator’ on the left navigation panel

Click ‘Start testing’ and then click ‘Done’.

The device will now be visible in the Google Home app when attempting to add devices. Do not add the device yet.

Step 6 – Add configuration details into your Home Assistant configuration file

Open up your configuration.yaml file and insert the following configuration:

Example Configuration.yaml entry

google_assistant:
project_id: YOUR_PROJECT_ID
api_key: YOUR_API_KEY
exposed_domains:
– switch
– light
– group

Project_id: You should reconfirm the project_id in Actions on Google under Settings cog > Project settings > Project ID. This may be different to the original name you selected as Google will add additional characters if it is not unique.

api_key: Back in the Google Cloud API Console, click on the Overview page and then click ‘Enable’ for HomeGraph API

Under ‘Credentials’, click ‘Create credentials’, ‘API key’

Copy and paste the API key generated into your configuration.yaml file (or secrets.yaml file if you are using this).

Rename the key to something logical so you know what it is for e.g. Hassio Key. Then click ‘Save’.

Save your configuration.yaml file and then restart the Home Assistant server from Configuration > General > Restart

Step 7 – Link your Google Home to your Hassio test project

From within the Google Home App, add a new device by click on the “+” symbol for ‘Add’, ‘Set up a device’, then ‘Have something already set up?’.

Your app should now be visible (e.g. [test] my test app)

After clicking on the device, you will be redirected to your Home Assistant login screen. You will need to enter in your user name and password.

If all goes well, you will be automatically returned to the device management screen and your app should now be linked. A message will appear noting ‘[app name] is linked.

You will automatically be redirected to assign rooms to all the newly added devices from hassio.

The device will now show as being linked in the manage accounts section.

You should now be able to control your devices with your Google home app or google home speaker.

]]>
170