OK Google (Could not reach [test])

Hi, I would like some help setting up “OK Google” in my Home Assistant.

I’ve tried several tutorials and I always get stuck after the login screen.

ha_login

“Could not reach [test]. Please try again”
ha_error

Setup:
Home Assistant OS 6.6
rpi 4
I’m using IPV6 for external access as my provider uses CGNat, but external access works normally.

  project_id: zzzzzzzzzzz
  service_account: !include SERVICE_ACCOUNT.json
  report_state: true
  #expose_by_default: true
  exposed_domains:
    - switch
    - light

I tried it with and without “/” at the end, as I saw that some people had a problem with that.

https://oauth-redirect.googleusercontent.com/r/zzzzzzz/
https://oauth-redirect.googleusercontent.com/r/zzzzzzz

ha_config

ha_config2

HomeGraph API is enable

If I go to:

https://zzzzzzzzzzzzzzzz:1111/api/google_assistant

I get:

405: Method Not Allowed

As described in the integration manual:

Verify that the Google Assistant is available on 
https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant 
If it is working it should return 405: Method Not Allowed when opened in a browser or via curl.

What am I missing or doing wrong?

1 Like

I’ve made it this far as well, only on ipv4. I don’t see anything in the logs for google actions / console.cloud.google.com. I think there must be something missing in the official docs.

OK, I got mine to work. This whole time I’ve been able to resolve my HA address from my network, but didn’t think to try and resolve externally (I don’t have cell service at home, so used widely-available ping test websites to check). Of course, it didn’t resolve, but other hosts/subdomains would. I checked my domain provider to double check my DNS entries. I used acme.sh to get a cert to expose HA to the WWW using the DNS method. It seems it didn’t remove the _acme-challenge.f.q.d.n TXT record, which might’ve screwed up my wild carded subdomain. I deleted that through my provider’s portal, and a little while later, it worked.

HAHA!! I just got mine to work! There is several things I had to do.
@walberjunior

  1. Just as you, I’m using ipv6. I had the same error, that I could see the login screen, where the connection failed. Wrong credentials did throw an error, so that wasn’t the problem.
    As far as I know, duckdns has trouble with ipv6, at least it never worked for me. So I wrote a small automation which pulls my ip (only ipv6) from a rest api and pushes it to duckdns. Lately I came to the realization, that duckdns is acutally useless (in my case) so I deactivated it AND deleted the stored ipv4. As a result my ipv4 is not stored anymore, null or empty string or something.
  2. For some reason, some networks, such as my workplace won’t let me connect. Then again mobile data worked. So after step one, I could disable wifi, use mobile data on my phone. This time the connection worked.
    Now the best part: When I tried it on my google home mini – conected via wifi, of course – it actually worked. Also, my phones google assistant can now access home assistant via mobile and wifi.

Sorry, if I’m missing some details. I’m just happy and wanted to share my success. I hope it helps.

diagnosis update 2 : Solution
issue with ip and dns resolution
yes duck dns , no ip like other services can help you to get access over internet but if you using ipv6 only then your google home app show error "could not reach [test] all

solution you need ipv4 as well to resolve ipv4 if you don’t have ipv4 like me here is solution for that as well

buy domain or if you have domain configure with cloud flare it will resolve your ipv4 queries and transfer to you on you over tunnel

before you setup cloud flare make sure you turned of reverse proxy like nginx and duck dns or no ip or what ever you are using

setup Cloudflare in home assistant

then google home and Alexa will work without any error