Can't stream camera feed to Google Nest devices through the Google Assistant integration

I have several camera entities exposed to Google Assistant set up through Home Assistant cloud (the “automatic” method), but anytime I tell my Google Nest hub to stream a camera, it shows the Home Assistant loading screen, but then fails after about 10-15 seconds.

The Home Assistant Core log shows the following error when that happens:

[homeassistant.components.cast.media_player] Failed to cast media http://<Home Assistant Internal URL>/api/hls/<camera access_token>/master_playlist.m3u8 from internal_url (<Home Assistant Internal URL>). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

The internal URL is using Home Assistant’s LAN IP address and is reachable from the Nest hub, which is on the same network.

If I use the Media menu in Home Assistant to cast a camera to the Nest Hub, it works as expected.

I compared the entity states of the Google Nest hub while trying both methods of streaming, and there is one difference I found:

When I try asking the Nest Hub to stream the camera, the Nest Hub’s media_content_id state attribute shows the same URL in the error message:
media_content_id: http://<Internal URL>/api/hls/<camera access_token>/master_playlist.m3u8

However, when I cast the camera feed from Home Assistant (successfully), the Nest Hub’s media_content_id state attribute shows the same URL in the error message, but with a query parameter called authSig:
media_content_id: http://<Internal URL>/api/hls/<camera access_token>/master_playlist.m3u8?authsig=<long alphanumeric string>

It looks like the Google Assistant integration is missing that authentication token in the URLs, unless it’s authenticating some other way.

Has anyone gotten this to work?

My hip pocket guess, you might need to use the enternal URL or a fully qualified domain address and no self signed stuff.
Google probably doesn’t like that address. (A guess)

I tried changing the URL to my external one, which has a valid SSL cert and it failed the same way. Error message showed the new URL so it seems like it tried it.

Hi Andrew. I am also having this issue. As far as I can tell (thanks to packet capture), the Google Nest Hub makes a connection to Home Assistant, downloads the .m3u8 playlist and starts to download the video segments. However, it seems like it does not like the format of the HA-provided stream.

But it is very puzzling because I have this (the Googe Nest Hub playing a stream from the same camera) working with another home automation platform and I don’t see a big difference in the streams – I can play the stream with a player on my laptop and both, the HA-provided stream and the stream provided by the other home automation platform (which is just a stream provided by Shinobi, an open source Network Video Recorder), play fine.

Below is the command output after playing both streams on my desktop; still trying to understand what causes the Google Nest Hub to not like the HA-provided stream.

=======================

Working (stream not from HA):

shell$ mpv http://a.b.c.d:8080/xxxxxxxxxxxx/hls/xxxxxx/xxxxxxx/s.m3u8
● Video  --vid=1  (h264 1920x1080 20 fps)
● Audio  --aid=1  (aac 1ch 8000 Hz)
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:834: FINISHME: support more multi-planar formats with DRM modifiers
[ffmpeg/video] h264: Device does not support the VK_KHR_video_decode_queue extension!
[ffmpeg/video] h264: decode_slice_header error
[ffmpeg/video] h264: no frame!
Error while decoding frame (hardware decoding)!
Using hardware decoding (vaapi).
AO: [pulse] 8000Hz mono 1ch float
VO: [gpu-next] 1920x1080 vaapi[nv12]
AV: 00:00:03 / 00:00:09 (40%) A-V:  0.073 Cache: 5.5s/2MB
Exiting... (Quit)

Non-working (stream from HA):

shell$ mpv http://a.b.c.d:8123/api/hls/xxxxxxxxxxxxx/master_playlist.m3u8
[ffmpeg/demuxer] hls: Estimating duration from bitrate, this may be inaccurate
● Video  --vid=1  (h264 1920x1080 20 fps 5163 kbps) [default]
● Audio  --aid=1  (aac 1ch 8000 Hz 8 kbps) [default]
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:834: FINISHME: support more multi-planar formats with DRM modifiers
[ffmpeg/video] h264: Device does not support the VK_KHR_video_decode_queue extension!
[ffmpeg/video] h264: decode_slice_header error
[ffmpeg/video] h264: no frame!
Error while decoding frame (hardware decoding)!
Using hardware decoding (vaapi).
AO: [pulse] 8000Hz mono 1ch float
VO: [gpu-next] 1920x1080 vaapi[nv12]
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it
AV: 00:00:35 / 00:00:39 (88%) A-V:  0.009 Cache: 4.3s/1MB
Exiting... (Quit)

Andrew, BTW, I don’t think it is that “authsig” missing query string because I can play the same stream from my desktop using the URL that does not have the “authsig” query parameter, and in a packet capture I also see the Google Nest Hub going to HA and successfully downloading the playlist (.m3u8 file) and the video segments referenced in the playlist.

Question – when you say “I cast the camera feed from Home Assistant (successfully)”, do you mean telling HA to cast the camera to the Nest Hub, or just watched the feed in the HA UI? If the former, can you share how to do that so I can test that on my side?

Cheers!