Hello there! I’m trying to connect Google Home app with HA manually.
My setup:
Raspi 2 (192.168.0.7) with:
Nginx reverse proxy managing SSL for mydomain.com proxying to upstream 192.168.0.7:8123
Docker instance of HA (2022.4.0) in host network mode, responds to 192.168.0.7
Cloudflare managing mydomain.com with a CNAME to my ddns, no firewall rules, no bots blocked
My config:
# Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:
- platform: google_translate
homeassistant:
external_url: https://mydomain.com
internal_url: https://mydomain.com
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.0.0/24
- 192.168.1.0/24
- 127.0.0.1
google_assistant:
project_id: "MYPROJECTID"
service_account: !include service_account.json
report_state: true
exposed_domains:
- switch
My Nginx config:
server {
server_name mydomain.com;
location / {
proxy_pass http://192.168.0.7:8123;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
listen 443 ssl http2; # managed by Certbot
#listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/mydomain.com-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mydomain.com-0001/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server_name mydomain.com;
if ($host = mydomain.com) {
return 301 https://$host$request_uri;
}
listen 80;
return 404;
}
Also I followed all the steps on Google Actions configuring urls as https://mydomain.com/api/google_assistant, https://mydomain.com/auth/authorize and https://mydomain.com/auth/token, all responding through the internet, the GA endpoint and the token endpoint gives me a 405 Method Not Allowed so they are reachable. I created the key, downloaded the json and put it in HA config folder. Also I enabled HomeGraph.
I can login through any browser, being in my home or away so internet, routing, websockets and DNS resolution may not be the problem. But when I try to link my HA in Google Home, the only message that I get is that of the title Could not reach [test] myapp. Please try again.. No login screen, also no logs in GCP or Nginx. I tried configuring Cloudflare to not proxy that domain and just resolves to my external IP but without success.
I found this similar topic but in their case the problem were dns resolution and IPv6, which is different from this
Google needs some kind of special access? Any help is apreciated, thanks!
Same issue for me too since 04/07/2022. I’ve seen several other reports on the forums. It would appear that either 2022.4 or something on Google’s end has broken manual Google Assistant integrations.
Hi all,
same issue for me when trying in the app to link HA to GH. The HA login page is never displayed and I’m only getting the same message than you.
I’m using core 2022.4.1 and NGinx proxy.
Regards
I started having this problem last week.
Before that it worked flawlessly for me and I haven’t set up those configurations before so i’m pretty sure it’s not that.
I added those anyway and haven’t had any luck.
Did someone find a solution?
For me Google Assistant linking to Home Assistant also stops working. The story is that I have used Google Assistant in my HA for about 2 years without bigger problems. In case of bigger trouble I have simply unlink and link my integration in Google Home app (it happens maybe 2-3 times), but it always starts working again, until… Two weeks ago I have had problem with syncing devices, so I have decided to make quick unlink/link and since then I cannot make it work again.
My [test] app is properly listed, it starts linking properly - splash screen “Link an account to control app on any device” appears, but after “Continue” it ends always with “Could not reach [test] app. Please try again” (linking done from external network). I have made dozens of tries with different configurations of my Google Action and Home Assistant configuration file. Unfortunately no success…
My configuration:
Home Assistant Core 2022.6.7
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.2
configuration.yaml (current version, cropped to minimum - previously I have used expose_by_default: true and disabling entities using entity_config:):
HA is accessible from outside as well as from local network.
I will appreciate any help with this problem.
edit 05.07.2022:
Today as every day I have made a try to link account and… it passed (from local network)! I do not know how it is happened because yesterday with exactly the same configuration did not work. Yesterday evening I have made one additional step - configuration (only mandatory fields and adding users for testing) of OAuth consent screen here: Google Cloud Platform . I do not know if it helped, but I am planning to not touch anything again
Ok. I’m not crazy then. I’ve been reading about it and people have been using nginx instead of duckdns and it works. Like someone else already said, it’s a duckdns issue. We either wait it out or change the way we access HA, some people have purchased domains.
Good morning from Spain, there is not and never was a problem with Duckdns, neither certificates nor lets encrypt
The problem is in Google Cloud
I have tried:
– Change duckdns for godaddy, dynu etc, the problem still exists.
– Create a new project , renew credentials , the problem still exists .
– Remove IPV6 from homeassistant , remove my nginx proxy manager and do it with duckdns + letsencrypt plugins . the problem still exists
– remove 2FA from my homeassistant , the problem still exists
The solution?? : it was the most stupid and logical at the same time… google cloud allows us to create test projects… and they expire… we simply “must re-enable” it on google platform
I hope it helps a lot, it’s my first post and just thinking that it will save time for many people, gives me satisfaction, how beautiful it is HA! and what a war!
After encountering a persistent problem, I eventually deduced its source. Surprisingly, it had nothing to do with either Google or my home assistant. Rather, it was a result of my ISP’s implementation of CG-NAT, which assigned me an IP address starting with 100. Due to my ISP’s proprietary DNS service, my home assistant was accessible from certain IP addresses but not from Google’s. Upon realizing this, I restarted my router several times until I obtained a different IP address not subject to CG-NAT, which now begins with 5.