Unable to link Home Assistant to Google Assistant

Ok!

So, trying to describe my whole reconfigure process, maybe what could help on the other users, who have the same problem what we explain earlier, and what already solved for me by the reconfiguring process, where I simply do not know yet, what was the main difference what helped.

  1. I deleted the whole GCP project.
    • (With it the of course deleted the already given token (in the corresponding JSON), and the API graph config also.)
  2. I separated my google_assistant config in/from my configuration.yaml as @DavidFW1960 showed to make this config lines a little bit more transparent for me. Until this splitting action I used the whole google_assistant config in the configuration.yaml.
    • I made the following Google Assistant.yaml with later filled references of 2 required personal data:
# Google Assistant

project_id: {GCP project ID}
service_account: !include {file name of the token downloaded from GCP console as xyz.JSON (the file is in the root of the HA config folder, near the configuration.yaml)}
report_state: true
exposed_domains:
- switch
- light

For use this separated Google Assistant.yaml config I referenced this from the configuration.yaml as:

# Manual Google Assistant integration
google_assistant: !include "Google Assistant.yaml"
  1. I made a new GCP project started from ‘Actions Console’ (https://console.actions.google.com) as in the HA manual.
    • (With random custom name, and correct language settings.)
  2. I gave a name for the action (at ‘Invocations’ menu point):
  3. I gave the proper webhook URL of my HA instance (at ‘Actions’ menu point):

    Where the missing part is the domain pointing to your instance with the proper port what you use for reach it, so for example: https://xyz.com:1234/api/google_assistant
  4. And almost finally I gave the proper OAuth settings (at ‘Account linking’ menu point):

    With the following examples:
    https://oauth-redirect.googleusercontent.com/r/xyz/ - Where xyz is your GCP project ID (not the name but the ID!) and please note the line ending ‘/’. On the screenshot you do not see the whole URL!!!
    https://xyz.com:1234/auth/authorize - With the same domain and port what I mentioned at the point 5.
    https://xyz.com:1234/auth/token - With the same domain and port what I mentioned at the point 5.
    And of course the 2 scope at the bottom (‘email’ and ‘name’).
  5. After it I just configured and downloaded the proper token JSON from ‘IAM>Service accounts’ at ‘GCP Console’ (https://console.cloud.google.com/iam-admin/serviceaccounts):
    • [Create service account] etc. as in the HA manual.
  6. Filled the Google Assistant.yaml with the already got GCP project ID, and the token JSON.
  7. Restarted my HA instance.
  8. And from the ‘Actions Console’ I started it with the [Test] button.

From that point I could configure it from Google Home without the earlier mentioned problems.

I can not see the difference what solve my problems but maybe you can with comparing it to your settings:)

7 Likes