Home Smart Home Home Assistant lesson 12 – Home Assistant link with Google Assistant

Home Assistant lesson 12 – Home Assistant link with Google Assistant

0 comment 171 views
Link Google Assistant and Home Assistant
  • 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

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!

s1200

Create a project

s1200

Terms of service – AGREE AND CONTINUE

s1200

Select Home control

s1200

Select Smart home

s1200

Select Add Action (s)

s1200

Chọn ADD YOUR FIRST ACTION

s1200

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

s1200

Select Overview to return

s1200

Select Setup account linking

s1200

Select No and click NEXT

s1200

Chon OAuth => Authorization code =>  NEXT

s1200

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

s1200

Nhập email => ADD SCOPE => name => ADD SCOPE

s1200

What is the entry => SAVE

s1200

No => Test => Simulator

s1200

START TESTING

s1200

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

s1200

API Services => Library

s1200

Find Google cloud api console

s1200

ENABLE service

s1200

Select Credentials

s1200

Select API key

s1200

Congratulations on getting the API key !!!

LUY PROJECT ID

s1200

Jag icon => Project setting

s1200

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

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 Read More