Google Assistant Keeps losing connection with Home Assistant

Hello, same problem here (Italy)
My configuration has been good for a couple of years but yesterday I started to lose connection from google assistant.
I tried to

  1. check again the configuration - was good
  2. Start a new setting from scratch - Issue remains
  3. Try to delete my domain from duckdns and reconfigure it. - nothing changes
  4. Check my ssl certificate but it is still valid.
  • I am able to connect from HA app or browser, but sometimes I lose the connection for 10-30 seconds to

  • Sometimes, I try to “sync my devices” and 9 times on 10 it fails

  • Trying to connect to https://xxxxxxx.duckdns.org:8123/auth/authorize, I figure a page “access with home assistant local” and an error “Errore: Message format incorrect: required key not provided @ data[client_id]”

  • If i try to reconnect my test app from home app, it asks my HA user and pass but then it fails. (but… should’t use the token created on the google service account page?!)

I wasted a night on it and I hope that I don’t create a mess on my configuration (HA, router, SSL certificate, duckdns, and so on) :slight_smile:

2 Likes

Same issue. Also using DuckDNS. Started Saturday morning (US time) and is ongoing? I tried several fixes, including removing the Google Assistant integration. Interestingly once I removed it I couldn’t find it again to reinstall, and restored an earlier backup to undo all my testing. Perhaps some disconnect with the integration and current version of HA?

1 Like

@vanster I had the same issue with the with the google assistant instillation not be listed to reinstall. Found it odd but once i rebooted the instillation showed back up as if i never uninstalled it. It’s still not showing up in the list of integrations.

Can confirm with reasonable assurance that this issue is/was caused by DuckDNS, maybe some system at google flagging their DNS due to nameserver crashes.

After reconfiguring Google Assistant services to use my own(paid) domain using a paid DNS service, it works just fine.

1 Like

@Appelflap is there an article you can direct us to so we can follow your steps here? Or some bullet points you’re able to share? I’m sure I could figure it out given enough time but since you’ve just fixed the issue for yourself would be grateful if you’re willing to share how you accomplished it. Thanks!

If the root problem is indeed because of Google not playing nicely with DuckDNS any longer (for whatever reason), then there are plenty of other dynamic DNS services out there. Your home router likely has a feature built into which you can use. In my case, I have had a personal domain for years which I can configure the DNS records for. In my case, I created a “homeassistant.domainxxx.com” CNAME record on my domain registrar’s DNS servers which points to the dynamic DNS record of whichever dynamic dns provider you setup. My Let’s Encrypt add-on is configured with the “homeassistant.domainxxx.com” CN (CommonName).

But you needn’t have your own domain name for this to work. For example, if you are using a Netgear router, you may setup “xxxx.mynetgear.com” as your home assistant URL. You would then remove the DuckDNS add on and separately configure the Let’s Encrypt add-on with this same name.

1 Like

Yeah. chiming in here so i can follow this. I am also on duckdns and experiencing the same issue everyone else here is seemingly having. Looking forward to an answer when someone can find one. I am also digging around some myself.

I used let’s encrypt and nginx addon to use DNS from my Asus Router and now it works fine. Duckdns addon is turned off. Only thing is my external url changed for now

I had the same until I remembered that I had to remove the lines from the config.yaml file, and then I was able to remove it. Not that it helped fix the problem, but at least you now know what was causing that.

Can also confirm with my own paid domain it works fine now. Had the same issues with DuckDNS over the past couple of days.

Same problem since a couple of days, works intermittently. I created new project with the same results, none are stable. I use duckdns and the home assistant is reach from internet. My internet provider is DIGI(spain), the public IP is located in Spain or Romania, depending on pool availability.

I am exactly in the same situation. With the exception is, I am in Romania. Your description matches exactly the behaviour I am experiencing. Not sure this is an ISP thing or something else though. Very stramge.

just switched from DuckDNS to personal domain, and no difference - have created an A record for Home Assistant which I’ll let percolate through the Interwebz before testing again later

Same problem here with my set up with duckdns as well. Out of nowhere it stopped working correctly 2 days ago.
For some reason I could turn on lights but not turn off lights with google home.
Thinking it was something with my set up I redid the entire setup process but now I cannot link Home Assistant with Google Assistant at all.
I can enter my credentials but then it indicates that “Something went wrong. Try again later”.

@mhendu This video seems to be a pretty good example of what you can do: Free Cloudflare Tunnel To Home Assistant: Full Tutorial! - YouTube

The main essence is to just not use duckdns anymore, because several of their name servers were down atleast yesterday. The video shows most of it, I think they use a free domain provider, but idk how reliable that domain will be after the reservation expires. So what i’d recommend you do is to buy a domain for like 5-10 dollars/euros a year, migrate it over to cloudflare’s DNS, install the tunnel addon for HA and then replace your google assistant console’s HA domain links that are currently example.duckdns.org with your own (sub)domain.

Now people might not like this, since it costs money, but it’s still a hell of a lot cheaper than 5 bucks a month for nabu casa(no hate to HA team, they do great work and support if you can afford it.), plus you get your own domain as bonus, you can maybe use to make a website in the future, or host your own private file server, w/e you like. Also you get the benefit of cloudflare’s speed as a DNS provider and all their other services too. Pick a good domain name.

Alternatively @levercrafts posted a different DNS solution a few comments above mine: Google Assistant Keeps losing connection with Home Assistant - #59 by levercrafts

Although i’d still prefer cloudflare so long as it stays free, since it offers alot more options and some routers may not have a local DNS.

I am having the exact same issue. I can reach my HA instance remotely though duck DNS but google side of things has broken.

Same here. I used google for a long time without any problems. I also use DuckDNS. I restarted configuring google assistant, but same issue. Google says can not connect. Also Google Calendars integration stopt working. Tried to re-add integration but same issue can not connect.

Thought I was going nuts until I finally found this thread…everything I found online yesterday was from a few years back.
For me it has been intermittent for the last 24 hours. It’s offline most of the time but looking at the Google home app, I can see it going online once in a while but only for a few seconds and then going back offline. Also using duckdns but as everyone said, have no issue reaching home assistant using duckdns myself.

If you’re running in Docker, you don’t have Supervisor or those add-ons readily available. Is there a solution for the Docker HA variant? Traffic for HA and a few other containers is behind NGINX reverse proxy. I’ve got lazy and forgotten how I set it all up because it just worked for 2+ years and I haven’t had to touch it. I’m sure it will come back to me once I start tinkering.

Mine configuration is working at this moment