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

Anyone still having this issue? The external/internal URL interface seems buggy on 2024.5. Sometimes when you enter an external URL, the internal URL goes blank, and vice versaā€¦

At any rate, populating both URLs with my external URL still results in a

* Failed to cast media http://[externalURL]/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en-us_71d80e3cc3_google_cloud.mp3 from internal_url ([externalURL]). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

My external URL is definitely accessible internally and externally from my network. Going to the URL itself manually brings up a audio clip but it never plays. Changing the toggle button to automatic also doesnā€™t fix this.

I have the same issue but only on one (of a pair, both same firmware) Google Home speakers - a full device reset doesnā€™t resolve itā€¦

Itā€™s been running fine playing an mp3 to the speaker pair overnight for years until yesterday.

Logger: homeassistant.components.cast.media_player
Source: components/cast/media_player.py:405
integration: Google Cast (documentation, issues)
First occurred: 10:40:46 (1 occurrences)
Last logged: 10:40:46

Failed to cast media http://192.168.86.50:8123/local/country_night_long.mp3?authSig=xxxxxxxx from internal_url (http://192.168.86.50:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

Also tried external:

Failed to cast media https://mywebsite.com/local/country_night_long.mp3?authSig=xxxxxxx from external_url (https://mywebsite.com). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
2 Likes

I have the exact same issue. Two Nest Audioā€™s same firmware, same triggering YAML/URLā€™s one starts playing the other fails.

I have:

*Reset the Nest audio
*Removed/reinstalled the cast integration
*Assigned different IP address to the Nest Audio
*Tried with the Nabu Casa URL (instead on internal IP)

Casting directly to the device from my phone still works through. This issue arose yesterday

1 Like

I just experienced the exact same thing after upgrading to 2024.9.2. And just like you, itā€™s only some of my Google nest minis that have the problemā€¦

1 Like

Same exact problem only on one speaker, since a few hours. I have another exact model (Nest Mini) with same firmware and itā€™s working fine!

1 Like

Urgh same here after 2024.9.2 - music assistant seized to work. Also around this time, I deployed a new WiFi AP - so Iā€™ve spent days and days on trying to solve it.