Casting images to Bravia chromecast broke

I had some scripts to cast music and images to a Sony Bravia TV via its in-built chromecast functionality. All was working perfectly until two days ago it just broke. I’m pretty sure this is an issue with an update to the built-in chromecast, as HA hadn’t been updated when it broke. The chromecast version on the Bravia is 1.52.246969, and googling that version it looks like it rolled out recently (within the last month maybe?)

So… I get these errors in my log now:

Logger: homeassistant.components.cast.media_player
Source: components/cast/media_player.py:322
Integration: Google Cast (documentation, issues)
First occurred: 8:54:28 (66 occurrences)
Last logged: 13:12:18

Failed to cast media http://192.168.X.X/slides/UHD_waves_on_seal_island.png. 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://192.168.X.X/music/Angus_and_Julia_Stone-Red_Berries/03.All_The_Colours.flac. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

Now, the really strange thing is I’m getting the same error for both the image and the music file - but the music file plays, whereas the image fails to display.
So this service call fails to produce an image:

service: media_player.play_media
target:
  entity_id: media_player.bravia_chromecast
data:
  media_content_id: "http://192.168.X.X/slides/UHD_waves_on_seal_island.png"
  media_content_type: "image/png"

But this one plays the music track, but still gives the error message:

service: media_player.play_media
target:
  entity_id: media_player.bravia_chromecast
data:
  media_content_id: "http://192.168.X.X/music/Angus_and_Julia_Stone-Red_Berries/03.All_The_Colours.flac/"
  media_content_type: "music"

Now, if I just change that media player entity to a 1st generation chromecast stick that I have, both those service calls work perfectly and produce no errors.

I’m posting this not really expecting there to be any answers other than “google broke something, just live in hope that they fix it” … but on the off chance someone can think of a work-around I’d be very appreciative. In the meantime I guess I’ll switch to using an external chromecast.

I am having the same problem with my Google Displays and my Bravia TV trying to use the media_player.play_media and cast a live stream from HA. The camera.play_stream works but is too laggy.

1 Like

Have you noticed so far if any other cast functionality has stopped working on your Bravia? If we could identify a broader pattern it might be possible to submit some feedback to Sony or Google to see if this can be fixed, but I fear that if Home Assistant is the only thing not working nothing will happen.

Interestingly, casting images to my Google Home Hub also broke since a few days. Casting audio (TTS) still works fine :man_shrugging:

So this might not only be an issue with your Bravia, but a bigger Cast issue

2 Likes

I have the same issue with casting MotionEye video streams to Google Nest Hub.
It was working fine about 2 weeks ago and than broke suddenly.

2021-04-26 11:57:42 ERROR (Thread-14) [homeassistant.components.cast.media_player] Failed to cast media http://192.168.1.208:8088. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

Interestingly, casting to Nvidia Shield Chromecast still works fine.

Any help would be appreciated.
Thanks!

1 Like

I forgot to mention in my original post that one of my first thoughts - based on the wording of the error message - was that maybe a change wasn’t allowing content be cast from locations that aren’t reachable from outside the local network - or perhaps blocking non-HTTPS sources. But I tried casting an image from my business website, which uses HTTPS, and that failed, too.

I raised an issue for it @ github.

Oh, and @Interloping and @fmarkf and @olddawgpowers: what HA version are you on? I’m on 2021.4.6 - maybe we can pin it down to “it started from that and that version onwards”

1 Like

Sorry, I forgot to mention that I’m currently on 2021.4.5

I tried to link this problem to a specific version of HA by restoring even very old snapshots (Sept 2020) and still have the same issue.

Maybe the problem is in the Google Nest Hubs Chromecast itself that (may be?) got updated silently at some point and now requires something special to support streams from HA… ?

Just in case:
Google Nest Hubs:
System firmware version: 241809
Cast firmware version is 1.52.241809

As I mentioned in my initial post, the problem started while I was using a version of HA that HAD been working - not 100% sure which version that was as I didn’t think to make a note before upgrading to 2021.4.6 to see if it would fix it. But I only update manually, so the problem definitely did not start after an upgrade. But maybe HA has been doing something not quite to spec that worked until google changed firmware on some of their devices.

Your cast firmware might be the clue: for me it is working on a chromecast that is still on 1.49.xx, while the two devices on 1.52.xx are broken.

@Interloping What cast firmware is your device using? You can find that in the Google Home app

I have Chromecasts (various generations) on various firmwares and have just now tested sending an mjpeg stream from Blue Iris.

Casting the mjpeg stream used to work perfectly on all devices, now on most devices it produces the same error in the logs that the OP mentioned and a blue cast symbol in center of an otherwise blank screen. :frowning:

no longer working:
fw 1.49.x - Chromecast Gen 2
fw 1.50.x - Chromecast Ultra
fw 1.52.x - Chromecast with Google TV

still works perfectly:
fw 1.54.x - Nest Hub Max

2 Likes

Could you possibly try sending a jpg or png to these devices?

Sure, I tested both internal (http) and external (https) files.

Internal files:
served from a temporary test directory created inside the ‘config/www’ directory.

External files:
https://file-examples-com.github.io/uploads/2017/10/file_example_JPG_500kB.jpg
https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_1MG.mp3

jpeg (internal - http)
worked on nest hub max
failed on all other cast devices

jpeg (external - https)
worked on nest hub max
failed on all other cast devices

mp3 (internal - http)
worked on all devices

mp3 (external - https)
worked on all devices

I’m having the same issue casting a camera image to my Google Nest Hub. Used to work just fine

The firmware is 1.52.xx

I got it working again with the workaround mentioned here: Cast isn't casting images anymore · Issue #49758 · home-assistant/core · GitHub

1 Like

Yeah, Erik and I tried to figure out what was happening over Discord. The side effect is preventing me to use this, as it doesn’t solve my problem (I was casting an image of (i.e.) a washing machine as a reminder that washing is done. If the image disappears after 30sec, it doesn’t do much as a reminder :wink: )

Let’s hope google fixes this soon

Yes, I can also confirm that BubbleUPNP workaround worked for me as well.
However (as other mentioned) it stops streaming after 30 seconds.

While the BubbleUPNP workaround, as shown in the example on GitHub, does OK when run as a script inside Home Assistant, it seems to fall flat on its face if attempted through Node-RED.

After converting it to JSON and creating a call-service node it fails with: value should be a string for dictionary value @ data['media_content_id'] presumably since in the workaround media_content_id: is an array instead of a string/URL as would normally be there.

If anyone can figure out how to make it work in Node-RED it would be greatly appreciated.

Don’t know what is going on, but normal casting started to work again. :slight_smile:

The same Google Nest Hub firmware and Chromecast version.
The only thing updated is HACS.
Go figure…

System firmware version: 241809
Cast firmware version is 1.52.241809