I am trying to get the Lovelace cast integration set up. Just to set the stage, here are a few assumptions:
My instance is publicly available (with https)
My Google Assistant integration is working as expected
My iOS app is working as expected (over LTE, not local wifi)
I have the LinuxServer letsencrypt nginx proxy sitting in front of HA using their default configs.
I am unable to get the Lovelace cast integration to work properly:
Locally using the cast.show_lovelace_view service: Nothing happens on the display (other Media services work, like TTS)
Externally using https://cast.home-assistant.io: I get a “unable to connect to the home assistant websocket api” error
Unsure if these 2 issues are related, however one thing I have noticed, when initiating from the https://cast.home-assistant.io URL, I see no activity on my proxy. Whereas from my app or web interface, nginx logs are very busy.
For what it’s worth, I have the same issue right now. Did you ever fix this?
I think it might be related to the fact that if you query my external HASS domain, my DNS server returns the internal IP of my HASS box. This is so that I can use the same URL regardless of if i’m home or not. So when my Google Display tries to query the external URL it gets served an internal one which it can’t serve.
Maybe one suggestion: I just tried accessing https://cast.home-assistant.io/ from my phone without local wifi connection. I also figured, that the external_url/internal_url might have sth to do with it, since they’re using different ports.
I have never been able to cast my dashboards and have always got the “Not Connected, unable to connect to the home assistant websocket api” message on my cast device. I thought that the new media option to cast lovelace would solve my problem but sadly it doesn’t . however i have always been able to cast using https://cast.home-assistant.io/ no problem. anyone have any ideas?
i saw this elsewhere and just tried it and it worked for me - try adding the below to configuration.yaml. if you don’t use ddns i think just your nabucasa link would work, but really i have no idea what i’m talking about so maybe not. in any event - this worked for me using my no-ip ddns and port forwarding to my rpi.
Your solution just works great for me.
I was loosing my mind trying to make it work and now it is working perfectly.
in case it helps others , I’m using nabu casa cloud and I have included in the configuration.yaml the internal url and in the external url the nabu casa url.