Home IoT Link Google Assistant and Home Assistant

Link Google Assistant and Home Assistant

315 views

To link Google Assistant to the Home Assistant there are many ways: IFTTT, Google Cloud, Component. Each option will have its own advantages and disadvantages:

  • IFTTT is easy to customize according to your needs, commands and optional responses. Even the entities that Cloud does not accept, can still set up IFTTT. In return, due to the setup of each device, it will take time.
  • Home Assistant Cloud service will help you to easily synchronize devices. And an important point is that for Cloud, you don’t need any domain or SSL and still use it with Google Assistant. This is the difference.
  • Using component will be completely free but also use features like Home Assistant Cloud but setup is also lengthy.

While using a long component, it’s free, so let’s just use it. In the framework of this article, I will guide you to use google_assistant component to synchronize devices in your HASS. Let’s go !!!

Link Google Assistant and Home Assistant

PREPARE

Software:

  1. Hass was added the domain and enabled SSL
  2. App test link creation: https://console.actions.google.com/?pli=1
  3. API creation link: https://console.cloud.google.com/getting-started?pli=1
  4. Google Home App on the phone

Hardware:

  • Phone
  • PC

CREATE APP-TEST

Visit link: https://console.actions.google.com/?pli=1

You do it exactly in the order of the pictures!

Create a project

Terms of service – AGREE AND CONTINUE

Select Home control

Select Smart home

Select Add Action (s)

ADD YOUR FIRST ACTION

Enter ” https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant” and press DONE.

Select Overview to return

Select Setup account linking

Select No and click NEXT

OAuth => Authorization code =>  NEXT

Client id: https://oauth-redirect.googleusercontent.com/
Client secret:
Authorization URL: https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize
Token URL: https://[YOUR HOME ASSISTANT URL:PORT]/auth/token

=> ADD SCOPE => name => ADD SCOPE

What is the entry => SAVE

No => Test => Simulator

s

START TESTING

Select VERSION – Draft => DONE

This is the end of the APP TEST creation section.

LOSS API

Access Link: https://console.cloud.google.com/getting-started?pli=1

API Services => Library

Find Google cloud api console

ENABLE service

Select Credentials

Select API key

Congratulations on getting the API key !!!

LUY PROJECT ID

Jag icon => Project setting

Ta da project ID has appeared you save for use for the lower part!

EDIT CONFIG FILE IN HASS

Add the following code into your configuration.yaml file

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

Rate this post

Related Tips And Tricks

Leave a Comment

Tips and Tricks

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept