Can someone help me with Google Home

I walked through the instructions on a couple of google searches, and I’m just about there I think.
But it’s failing.
I have the google side of things set up, but after much poking around, it seems I now have 4 errors in 4 languarges. ha. UK english, Canadian English, American English and just plain English.

I can’t seem to get the configuration.yaml to accept the google home thing.
I’m sort of lost. I have Home Assistant running in a python virtual thing in an Ubuntu server virtual thing on FreeNAS. It is accessible through a duckdns.org page, with dehydrated for a signed page, so https link.
So I got that far.

google_assistant:
  project_id: appname-xxxb6
  client_id: hugecrazyrandomnumber
  access_token: anotherhugecrazyrandomnumber
  agent_user_id: 
  api_key:
  exposed_domains:
    - switch
    - light
    - group
    - media_player
    - group
    - scene
    - script
    - climate

I am not following where to start fixing things. Even a nudge in where I should look would be appreciated.

so that it doesnt seem like I’m not getting any part of it, I am able to follow my home devices with the unifi section, can control my Nest with it’s thing, as well as the Hue lights. Using the 0.60 version, I used the latest rendition of hue control, not the initial control sections.

hi billyprefect.

here is my config.

google_assistant:
project_id: homeassistant-##redacted##
client_id: ##redacted##
access_token: ##redacted##
agent_user_id: ##redacted##
api_key: ##redacted##
expose_by_default: false

I then expose each device individually as follows in customize.yaml as follows:

switch.app_lounge_lamp_switch:
friendly_name: Standard Lamp

google_assistant: true
google_assistant_type: light

switch.app_christmas_switch:
friendly_name: Christmas Lights

google_assistant: true
google_assistant_type: light

switch.lights_entrykitchen_entry:
friendly_name: Entry Lights

google_assistant: true
google_assistant_type: light

I found that

  1. you need to be able to get to the following address without any prompt for username and password (i.e.no authentication) - https://your_dns_name/api/google_assistant

in a browser you should receive a - 405: Method Not Allowed
2) the address needs to resolve and work both from outside your network (i.e. the public internet) and inside your lan. I was running split DNS and only the name resolve externally and this caused problems.

Feel free to ask any more questions.

Cheers,
Nichol

p.s. please ignore the indenting. I am a bit shaky after new years eve and the paste didnt work properly.

what about the port number ? Or do I forward port 8123 to somewhere ?

Google will try and connect on port 443, so if your home assitant interface is running on 8123 you will need to forward 443 to 8123 - however for this to work you must ensure that home assitant is set up to to usen https (ie. is encrypted) - as google does not work if it is not.

basically if you can go to https://your_dns_name/api/google_assistant and get the 405: Method Not Allowed reply google should work. If you dont get this it will not.

I can not help with setting up HA to be encretpted as I use a reverse proxy for this, however there are instructions at https://home-assistant.io/components/http/ (note that encreption is based on SSL and certificates so you need to have that set up as per the instructions)

I can get the home assistant page using https://(mydomain).duckdns.org <- I did follow the dehydrated setup, and have been using duckdns for a while for other purposes. I’ve forwarded 443 to 8123 so now it’s just the home assistant front page without porting required. I removed the password for now so there is no prompts.
I get 404 page not found for all references to the api/google_assistant
I’m missing on why that isn’t running for me.

what do you see if you try to get to the page directly from a machine on your local network. Try both

http://11.22.33.44:8123/api/google_assistant
and
https://11.22.33.44:8123/api/google_assistant
where 11.22.33.44 is the ip address of your ha machine.

Or you can just tell Google that your server isn’t on port 443. That’s what I did, and it works perfectly.

I’m only ever getting 404 Page Not Found
I’m missing something with this set up, what else is needed to get this working? Is there a component that was needed or modification or some files or anything ?

I do have the Wink controller going as well now, so some calls are going where they need to go. I just must have missed a step in the google assistant setup. I’m rereading it word for word and going to write it down in the order that makes sense to me, and see if I’ve skipped a step.

I did the setup as described on https://home-assistant.io/components/google_assistant/ and got everything running.

On the json file I used my Hass duckdns url and at “Account Linking” in my Google Project https://console.actions.google.com/ I use my Hass IP

That sounds like you didn’t enable the component yet.

No. I don’t think I did.
The machine is an Ubuntu vm, and HASS is running in a python vm in that.
I don’t see any instructions for my setup, but if someone could just nudge me in the right direction I will do the reading required.

You need to follow the instructions exactly. This; “going to write it down in the order that makes sense to me” is not a good idea. Do what is written, do it in the correct order and it should work.

1 Like

It is not working as the directions bounce.
Starts showing the configuration.yaml lines, which I have, says to include random numbers, which are a paragraph below, goes to adding devices and customizing the entry, then to the files and how to use them.
Counter intuitive.

Step 1. Create 2 random long strings this way. Copy to text file to grab them later as required.
Step 2. On google actions page, create a project. Start with a name, google then assigns a project id based on that name. Next, Actions SDK, build. This give you a command line to use with a file you need to download.
Step 3. Back into the machine where HASS lives. Make a new directory just for cleanliness.
Step 4. wget (pick the gaction version that suits the machine) to download that file. chmod +x gaction to use it.
Step 5. create a file called “project.json” using nano or other editor, use your own machine address in the space shown, typically a duckdns.org address…
Step 6. run the gaction command against project.json - this will cause the app to acknowledge the request, allowing you to further edit the api on the google console page.
Step 7. fill in as many blanks as they demand in section 2. all of them. including the banner and icon files, as well as an online document for privacy, it seems. section 3 is optional.
Step 8. In section 4, set the type to implicit, client ID is the first super long random number, then under configure the client, set for “email” in top square, “name” in second square.
Step 9. Click on Test, which will lead to an online simulator, which is of no use at the moment.
Step 10. back to the machine. edit configuration.yaml to include the google assistant segment, header is google_assistant: with data definitions of project_id which is given by google, see above, client_id, long random string used in the client id above, access token, second random long string, and then some optional fields. also make sure that any listing of # api_password: is commented out for a direct connection.
Step 11. restart home assistant. this should, in a perfect world, start the setup portion.
Step 12. sync the system using your google assistant instance on your phone or device, open it, go to google assistant, click the menu top right, then again for the settings top right, go into settings, scroll down to home control, click +, then look for [test] my test app.
Step 13. success.

It is step 13 that eludes me thus far.

AHAHAHA

it was the last API key.
I ran through the check configuration over and over.
I finally attached the HomeGraph API key to this project. I’ve created and destroyed so many I missed this one.
It finally took.

Step 13. attach homegraph api to current project. copy api key from homegraph to google assistant segment, api_key:
Step 14. repeat step 12.
Step 15. success. finally.

@BillyPrefect Well Billy… it seems you’re not that perfect in following instructions :wink:

That bad boy command was on the bottom and even marked as Optional. I found it less than optional. LOL. Now on to more things to connect.
I didn’t think to ask, but I assume that now that it’s connected I am able to uncomment the password line so that the front page is password protected again ?

Not sure which instrunctions you’ve been trying to follow but the officail one only contains 10 steps and non of them are optional.

api_key (Optional): An API Key generated for the project from Google Console which allows you to update devices without unlinking and relinking an account (see setup below). If not provided then the request_sync service is not exposed.

As well, step 10 says “IF”