Chuyển đến nội dung chính

[HA] Hướng dẫn cài đặt Google Assistant vào Home assistant để điều khiển nhà từ điện thoại , loa google mini

Hướng dẫn cài đặt Google Assistant vào Home assistant để điều khiển nhà từ điện thoại , loa google mini

Manual setup :

A.  Tạo project tại google cloud
     truy cập vào link : https://console.actions.google.com/
 
 
  1. Create a new project in the Actions on Google console.
    1. Add/Import a project and give it a name.
    2. Click on the Smart Home card, select the Smart home recommendation.
    3. Click Build your Action, select Add Action(s). Add your Home Assistant URL: https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant in the Fulfillment URL box, replace the [YOUR HOME ASSISTANT URL:PORT] with the domain / IP address and the port under which your Home Assistant is reachable.
    4. Click Save. Then click on Overview, which will lead you back to the app details screen.
  2. Account linking is required for your app to interact with Home Assistant. Set this up under the Quick Setup section.
    1. Leave it at the default No, I only want to allow account creation on my website and select Next.
    2. For the Linking type select OAuth and Authorization Code. Click Next
    3. Client ID: https://oauth-redirect.googleusercontent.com/, the trailing slash is important.
    4. Client Secret: Anything you like, Home Assistant doesn’t need this field.
    5. Authorization URL (replace with your actual URL): https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize.
    6. Token URL (replace with your actual URL): https://[YOUR HOME ASSISTANT URL:PORT]/auth/token. Click Next
    7. Configure your client: Type email and click Add scope, then type name and click Add scope again.
    8. Do NOT check Google to transmit clientID and secret via HTTP basic auth header. Click Next
    9. Testing instructions: Enter anything. It doesn’t matter since you won’t submit this app. Click Save
    Screenshot: Account linking
  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.
  4. Add the google_assistant integration configuration to your configuration.yaml file and restart Home Assistant following the configuration guide below.
  5. (Note that app versions may be slightly different.) Open the Google Home app and go to Settings.
  6. Click Add...+ Set up or add+ Set up device, and click Have something already setup?. You should have [test] your app 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.
  1. Create a new project in the Actions on Google console.
    1. Add/Import a project and give it a name.
    2. Click on the Smart Home card, select the Smart home recommendation.
    3. Click Build your Action, select Add Action(s). Add your Home Assistant URL: https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant in the Fulfillment URL box, replace the [YOUR HOME ASSISTANT URL:PORT] with the domain / IP address and the port under which your Home Assistant is reachable.
    4. Click Save. Then click on Overview, which will lead you back to the app details screen.
  2. Account linking is required for your app to interact with Home Assistant. Set this up under the Quick Setup section.
    1. Leave it at the default No, I only want to allow account creation on my website and select Next.
    2. For the Linking type select OAuth and Authorization Code. Click Next
    3. Client ID: https://oauth-redirect.googleusercontent.com/, the trailing slash is important.
    4. Client Secret: Anything you like, Home Assistant doesn’t need this field.
    5. Authorization URL (replace with your actual URL): https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize.
    6. Token URL (replace with your actual URL): https://[YOUR HOME ASSISTANT URL:PORT]/auth/token. Click Next
    7. Configure your client: Type email and click Add scope, then type name and click Add scope again.
    8. Do NOT check Google to transmit clientID and secret via HTTP basic auth header. Click Next
    9. Testing instructions: Enter anything. It doesn’t matter since you won’t submit this app. Click Save
    Screenshot: Account linking
  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.
  4. Add the google_assistant integration configuration to your configuration.yaml file and restart Home Assistant following the configuration guide below.
  5. (Note that app versions may be slightly different.) Open the Google Home app and go to Settings.
  6. Click Add...+ Set up or add+ Set up device, and click Have something already setup?. You should have [test] your app 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.

Nhận xét

Bài đăng phổ biến từ blog này

[HA] Cài đặt armbian trên tivi box để chạy home assistant tháng 10/2020

Hướng đẫn cài armbian mới nhất "Việc cài có thê gây hỏng tivi box , tự chịu trách nhiệm cho việc mình làm "  Bạn không cần xem nữa nếu mua sản phẩm cài sẵn tại đây .(.) https://shopee.vn/vipk31?smtt=0.0.9 Chuẩn bị : +  Tivi box x96 mini (hoặc loại khác có sử dụng chip Amolic S905W) + Thẻ nhớ 32GB + File img armbian (https://yadi.sk/d/_rQgn_FosYuW0g/20.09) + Dây nối máy tính với box (cứu box khi cài vào emmc bị hỏng box ) Step 1 : Flash file image vào thẻ nhớ + Dùng phần mềm (https://www.balena.io/etcher/) để thực hiện flash vào thẻ nhớ Quá trình flash rất nhanh khoảng 5 phút là xong Step 2 : Mở thẻ nhớ đã flash xong  Thực hiện config để box nhận thẻ nhớ và vào armbian file cần chỉnh sửa : extlinux.conf Chú ý chọn đúng file dbt cùng với loại box  ********************************************************************************************************************************* Pay attention. Starting from version  20.08 (20200814) , the configuration order for the used  DTB  chan

[HA] API tính điện tiêu thụ hằng ngày evncpc miền trung cho home assistant

Thông tin được lấy từ nguồn dữ liệu tại trang  https://cskh.cpc.vn/  với user/pass các bạn cung cấp . Chúng tôi chỉ lấy thông tin này và chuyển đổi dạng để phù hợp sử dụng trên Home Assistant . Chúng tôi sẽ không chiụ trách nhiệm về độ chính xác của dữ liệu này Sử dụng Rest sensor bạn cần kết nối internet , đôi khi do đường truyền / hoặc trang web EVN bị lỗi sẽ không lấy được data. Update : 2020.07.01 EVN không cho truy cập trang web từ ip nước ngoài nên api này cài trên web nước ngoài sẽ không hoạt động nữa. Ae nào cần code chạy local thì inbox Dạo này lướt face thấy mọi người  ai cũng bảo sao điện tăng nhiều vậy , có ngừoi nghi ngờ EVN ghi gian dối số điện . Mình không làm ở EVN nên không biết có gian dối thật không nhưng EVn hiện tại đo chữ số điện từ xa , 1 ngày đo khoảng 2 -3 lần , như vậy khách hàng sẽ quản lý được ngày tiêu thụ bao nhiêu kwh .cuối tháng có thể dối chiếu xem đúng không . Hình ảnh của EVn cung cấp do hằng ngày số kwh Dựa vào thông tin EVN cung cấp trên trang web ,

[HA] Lấy chỉ số đo điện từ công tơ điện lực miễn phí

Note: cái này đang hương dẫn cho điện lực miền trung , các miền khác chắc cũng tương tự  EVN không cho truy cập từ IP nước ngoài Anh em xem các cách khác trong blog để lấy thông tin điện lực add vào home assistant bài mới đơn giản hơn : https://vnhass.blogspot.com/2020/06/ha-api-tinh-ien-tieu-thu-hang-ngay.html?fbclid=IwAR10n1hURu1Gs4mjeAHG6RYukbdcLt-KpZB3J7GpUKhzGfjHQK4M4pOZjOI Đây là bài viết hướng dẫn lấy chỉ số điện thời gian thực từ công tơ của điện lực để đưa vào HA Sẽ có 2 cách lấy Cách 1 : lấy từ website , cách này đơn giản nhưng phụ thuộc vào bên thứ 3 . cách này dễ ai cũng thực hiện được Cách 2 : Debug app của điện lực , lấy api và token cách này phức tạp , cần nhiều "chất xám" hơn Sau đây mình sẽ hướng dẫn làm cách thứ 1 . Cách 2 sẽ hướng dẫn sau Đầu tiên các bạn phải login được vào trang cskh của điện lực bằng tài khoản và mật khẩu bên điện lực cung cấp , ai không biết thì call tổng đài nhờ hộ hỗ trợ https://cskh.cpc.vn/Default.aspx Trong này sẽ có n