Unable to cast media to Chromecast

I use to be able to cast camera streams to my Google Hubs and to my Chromecast device. Now I am not able to. But I can cast a lovelace dashboard. Here is the log.

I have 4 nest cameras and a Onvif camera. I believe this started after I signed up with Nuba Casa. Any clues?

Logger: homeassistant.components.cast.media_player
Source: components/cast/media_player.py:387
Integration: Google Cast (documentation, issues)
First occurred: 2:26:36 PM (31 occurrences)
Last logged: 2:34:05 PM

Failed to cast media http://homeassistant.local:8123/api/hls/ab821204dcdfcc2a4c4af9a09dexxxxxxxxxxa1d2196922edcb6dea89dc6cfcea/master_playlist.m3u8?authSig=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJxxxxxxxxxxxxxxxNGE3ZjgzODg3ZGI0ZmI1OTQ0YjI2ZTkzNDA2Mzk2MiIsInBhdGgiOiIvYXBpL2hscy9hYjgyMTIwNGRjZGZjYzJhNGM0YWY5YTA5ZGU5MDI3NTBmMGJhMWQyMTk2OTIyZWRjYjZkZWE4OWRjNmNmY2VhL21hc3Rlcl9wbGF5bGlzdC5tM3U4IiwiaWF0IjoxNjQ4MTUwNDI1LCJleHAiOjE2NDgyMzY4MjV9.ue53nsLFwy5ug_Mz2BAZkmr7W91UDNgQa78Zvwwwl0E from internal_url (http://homeassistant.local:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
Failed to cast media http://homeassistant.local:8123/api/hls/135046a9e4be46847766c2cefd0352c3420c96600xxxxxxxxxx339a4ebca0afa/master_playlist.m3u8?authSig=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmNGE3ZjgzODg3ZGI0ZmI1OTQ0YjI2ZTkzNDA2Mzk2MiIsInBhdGgiOiIvYXBpL2hscy8xMzUwNDZhOWU0YmU0Njg0Nzc2NmMyY2VmZDAzNTJjMzQyMGM5NjYwMDA4ZmUwNzk3OWEzMzlhNGViY2EwYWZhL21hc3Rlcl9wbGF5bGlzdC5tM3U4IiwiaWF0IjoxNjQ4MTUwNDMyLCJleHAiOjE2NDgyMzY4MzJ9xxxxxxxxxxxxxxxBAEmt5KOGncWMCB9sWiqalu2I37Gw from internal_url (http://homeassistant.local:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
Failed to cast media http://homeassistant.local:8123/api/hls/b195cfc185993cd1df2e3bbff3c64c2664b1ad6c79bxxxxxxxxxxa04099f09033/master_playlist.m3u8?authSig=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmNGE3ZjgzODg3ZGI0ZmI1OTQ0YjI2ZTkzNDA2Mzk2MiIsInBhdGgiOiIvYXBpL2hscy9iMTk1Y2ZjMTg1OTkzY2QxZGYyZTNiYmZmM2M2NGMyNjY0YjFhZDZjNzliYjQ3YzlhYzJjYTA0MDk5ZjA5MDMzL21hc3RlxxxxxxxxxxxxxxxtM3U4IiwiaWF0IjoxNjQ4MTUwNDM3LCJleHAiOjE2NDgyMzY4Mzd9.3IqZmkoifjmLFk8Wzu2T9I07RSVS2X7aQY_TVNPFPMQ from internal_url (http://homeassistant.local:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
Failed to cast media http://homeassistant.local:8123/api/hls/9c912bc69d165402a8ff0d4dca7a3143637d3xxxxxxxxxxeb717b538ffcfc47e/master_playlist.m3u8?authSig=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmNGE3ZjgzODg3ZGI0ZmI1OTQ0YjI2ZTkzNDA2Mzk2MiIsInBhdGgiOiIvYXBpL2hscy85YzkxMmJjNjlkMTY1NDAyYThmZjBkNGRjYTdhMzE0MzYzN2QzN2RlNTEwZTg3ZGViNzE3YjUzOGZmY2ZjNDdlL21hc3RlcxxxxxxxxxxxxxxxM3U4IiwiaWF0IjoxNjQ4MTUwNDQzLCJleHAiOjE2NDgyMzY4NDN9.-5OZZWg87lVwW3Cy72e9Hi87gTME8dXq-aybUUEvQtI from internal_url (http://homeassistant.local:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address```

With this info I have no clue how you setup your system and not even sure if i can provide any help…add details !
My situation, cam / amp / cast / mini’s are all local and when having internal/external url pointing to sth like duckdns it would not work. Only solution for me was a reverse proxy and local casting works like a dream

I don’t use Nabu Casa, however cast devices use HTTPS not HTTP, and as the error says ‘Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address’, and your URL of ‘http://homeassistant.local:8123’ is neither. the http:// needs to be https:// and the rest of the URL must either be an IP address, or publicly accessible URL.

Can you currently access your HA install remotely over HTTPS ?

my int/ext show with the ip address of HA… devices use that url to connect and if they cannot resolve homeassisant.local (how would they?)…then they would not know where they connect to. Try ip:8123

I can connect with the address nuba casa has givin me. It is a https address . On my General tab it shows my external URL as a https, and the internal as http://home assistant.local:8123.

I am using a mini PC with supervisor installed. I am using the native Onvif integration to add cameras. I linked my Yahoo account with the Google integration inside of the Home Assistant Cloud integration

I went to Home Assistant Cloud>Google Assistant > Manage Entities and found 2 sections (exposed entities and not exposed entities). All the cameras/video streams are under the not exposed entities.

Are these the entities that google can see and control?

Has the op read this in the docs?

Yes I have. I took it that all of the information in the article had to due if you was writing YMAL code and /or using some type of remote video source.

All the video I am trying to cast can be seen and played under the media tab of the sidebar. I will open the media section>select where I want to cast to>open the camera box>select the camera stream I want to cast. This process worked fine until I signed up for Nuba Casa.

Try to go back one step (without NC) or setup a separate clean HA next to it and add only those parts you need…again, I got mine to work only with local ip in the int/ext addresses …which does not mean there are other options.

I believe I have solved the problem. At least I can cast video again that is. Under Configuration>General I had my External URL as the Nuba Casa URL. Under Internal URL I had the homeassistant.local:8123. I changed the Internal URL to the Nuba Casa URL and I can cast again.

Thanks for the help and patience.

url

Unfortunately though, this breaks other functionality such as Google Local Fullfillment. The cast should always just use the enternal url. I think this should be a bug. Or it should be selectable at cast time.

In fact, the docs mention it should:

This is important when casting TTS or local media sources; the cast integration will cast such media from the external_url if configured, otherwise from the Home Assistant Cloud if configured, otherwise from the internal_url.

I just want to say that I was having the same issue as OP, and have spent hours searching forums to find a solution that worked - to no avail.

BUT!

I did find a solution after tinkering. Mine was to turn off “Automatic” for the local network URL in the Settings/System/Network/Home Assistant URL.

For us Nabu Casa users, this feels like a bug, since A) automatic doesn’t seem to work for this use case, and B) I haven’t found any documentation telling us to do this exact step.

I hope this helps OP and anyone else!

3 Likes

@travisrulez ’ solution also worked for me: I set the Local network address to my local host name (i.e. not the IP) but with http instead of https - I normally access HA via a reverse proxy and https, using a (kind of local) domain name with a valid Let’s Encrypt wildcard certificate.

Thank you so much, I just got started on this journey of home assistant and this helped a lot