Cameras to show up Google Hub

I’m trying to find away to get my cameras to show up on the google home hub.

I can setup automations to get them to display on the screen, but I would like to create a “room” and have all my cameras listed there to select and view.

Is there a way I can create a switch in HA and have it show up on my home hub, that way I can link it to an automation to turn on a camera when switched on.

Hi can you share what you have done so far? I have a home hub and would love to see what you have done with your cameras in HA.

I have 7 cameras, are yours being displayed when triggered?

Right now I have my front door camera display on my home hub when the doorbell is rung. But any trigger will work, motion…

It seams the hub works just like any chromecast device, so you can follow the same examples to cast to a chromecast for the hub. It also has the same limitations on what video types it accepts.

I did mine in nodered but the service call to do the cast is:

      - service: media_player.play_media     # call media player service
        entity_id: media_player.living_room    # Your google cast TV/ chromecast
          media_content_id: [http://.....]    #your camera feed
          media_content_type: image/jpg   # even though you are streaming video, this works

credit to this post for helping me get that service call right LINK

I am using the hassio addon motioneye for my camera and used motioneye’s streaming link in the service call above for media_content_id. I couldn’t get the link directly from my camera to work, I assume it wasnt a compatible video type.

What I want to do is setup a switch in HA and expose that to the Hub, so i can say “OK Google turn on…whatever” and the turning of of that switch will be my trigger to stream that camera to my Hub.

I got something to work, but its not perfect.

I created an input boolean which gives me a switch, that I can see in hub.
I set that switch when turned on, to trigger an automation which sends the stream to my hub display. When the switch is turned off, its stops the stream.

It works by voice or the hub’s ui.

Two issues:

If I get another hub in the future (hub2), the switch is hard coded to stream to hub1. So turning the switch on hub2 would trigger the stream to show on hub1, not ideal.

If I turn the switch on, to view the camera, then navigate away from the switch, then come back to it, the switch is still in the ON position, so pressing ON doesn’t do anything. I have to press OFF then ON to trigger the stream automation.

hi silfa718
trying to get this to work as you describe (unsuccessfully) i am also using hassio and motioneye,
can you clarify where you get your “medcia_content_id” from is this one of [
Snapshot URL
Streaming URL
Embed URL
many thanks

I used the Streaming URL.

What model of home google hub are you using? I have set this up as you described however when I call the service to play on my google home hub I hear a tone, and get a blanks screen with an icon in the centre that looks like a rectangle with the wireless symbol in the lower left corner. This screen eventually times out.

I no longer do it the way I had described since the camera steam service was released.
Try this:

After selecting camera.play_stream for the service call you should see your camera in the entity drop down list.
Add the line for what media player to play the stream on and replace “GOOGLEHUBNAME” with the name of your hub in home assistant.

I have the original hub display, but this should work for any google device that is “cast” compliant with a screen.

This looks much easier. Unfortunately it is not working for me. When I try this I get a black screen on my Google Home Hub with the message “Playing Default Media Receiver” above the video slide bar and a Pause button ( || ). I can click pause and play to no effect.
Here is my camera definition from my configuration.yaml file.

    ffmpeg_bin: /usr/bin/ffmpeg


   - platform: ffmpeg
    name: Camera_1
    input: -rtsp_transport tcp -i rtsp://dvruser:[email protected]:554/ch01/0

and my service call is:

rtsp://dvruser:[email protected]:554/ch01/0 streams correctly when viewed with VLC player and in motionEye.

I am hoping that you may have seen this behaviour before and may know the solution.

1 Like

I haven’t.

I don’t use the ffmpeg platform, maybe that’s causing an issue with a steam not compatible with google hub/cast protocol. Originally that is why I had to use the stream link from motioneye, it put out a stream that was compatible.

Can you get the camera to stream/display in HA frontend/UI?

Yes, I can get the camera to stream in Lovelace using a Picture Glance card.
Motioneye connects directly to the RTSP stream and doesn’t use a HA camera entity.
What platform do you use to define your camera in configuration.yaml if not ffmpeg?

Looking into it, my cameras connects to HA using a custom component, that uses ffmpeg.

Is there a way to change the output of the rtsp to a lower resolution?

Yes and at your suggestion I tried this:

    #ffmpeg_bin: /usr/bin/ffmpeg


  - platform: ffmpeg
    name: Camera_1
    input: -rtsp_transport tcp -i rtsp://admin:[email protected]:554/ch01/0
    extra_arguments: -pred 1 -q:v 2 -s 1024x600
  - platform: ffmpeg
    name: Camera_1 LowRes
    input: -rtsp_transport tcp -i rtsp://admin:[email protected]:554/ch01/1
    extra_arguments: -pred 1 -q:v 2 -s 1024x600

ie setting the resolution to match the resolution on the Google Hub and also using the low resolution stream provided by the DVR/Camera. Neither worked.
I am currently trying to work out how to access ffmpeg from the command line in HassOS. It is supposed to be a built-in integration so I assume that it is running in the HA container but can’t work out how to access this. You will also note that I have commented out the second line of the the ffmpeg: section in configuration.yaml. I believe that this is only needed if HA is running in Rasbian or some other Linux platform.

Have you setup an internal url? With local ip? I needed to remove it, since my hub wss not able to find it, since it uses cloud…
So I have setup for my internal url, also my nabucasa url, and stream showed up… Still verry slow with a lid of buffering…