Connect a Google Home to Home Assistant behind a Cloudflare Tunnel

I have a technical question on the integration of a Google Home with Home Assistant.

Until now, I was able to display a dashboard on my Google Home but I have just secured my network by switching from a reverse proxy on Synology to a more secure Cloudflare tunnel.

Only problem, when I want to connect the Google Home dashboard, I find myself with an error: I arrive at the display with the HA logo, a heart and NABU CASA and below: Not Connected Error: Unable to connect to the Home Assistant websocket API.

I also tried via https://cast.home-assistant.io/ I enter my URL, I log in and it tells me Unknown error (SyntaxError: Unexpected token ā€˜<ā€™, "<!DOCTYPE ". ā€¦ is not valid JSON).

I followed this tutorial https://www.reddit.com/r/homeassistant/comments/v0xea8/comment/iakgsgq/?utm_source=share&utm_medium=web2x&context=3&rdt=39407 to add a WAF rule for Google IPs but without any change as also deleted temporary rules for limited countries to access my apps in the tunnel.

Also added in configuration.yaml :

  base_url: https://myhassio.mydomain.com
  cors_allowed_origins:
  - https://myhassio.mydomain.com
  - http://192.168.1.222:8123
  - http://300.400.500.1
  - http://300.400.500.1:8123
  - https://cast.home-assistant.io

not working either

Do you have any idea how to get out of this? THANKS !

2 Likes

I know this is a very old thread, but Iā€™m facing the same issue here in 2024. Did anyone find a solution for this?