However, when I ask Google Assistant to show me Camera 1 on my TV it looks like it is about to stream the camera but then I just get a black background and white centered text on top saying Smart Home Camera. Same thing happens on both my Chromecast and my Google Hub.
In Home Assistant front-end, all cameras show up and work just fine. So I wonder now has anyone else got this or a similar setup with an Android camera working? I’m aware that I can get the camera to stream to my TV using a script that gets invoked through either Google Assistant or IFTTT but it would be nice to make use of what’s given for free by Google Assistant and its camera entity
From my research above I’ve found that even though all five cameras should be exposed as camera entities, only camera 1, 2 and 4 appear in Google Home. But they all just show “Smart Home Camera” and there’s nothing relevant in the logs either.
Running Home Assistant 0.97.0 in a Docker container on a Synology DS718+
Lovely! I added https before my base url and now it works
The buffering and the lag though Do you have a good experience using this setup?
Thanks for helping me solve this setup but in the end I’ll think I use a script like below as the performance of the stream gets way better, almost flawless.
entity_id: media_player.chromecast_ultra in the script code above chooses the target display to stream to.
if you want to use google assistant integration then:
add stream: to your configuraiton yaml (see stream component help page)
then make sure you have exposed the camera to google assistant (see google assistant component help page)
then if you have a hub you can say “hey google show me the xxx camera” and it will stream on to the hub.
To get my script working with voice I exposed a switch to Google Home which runs my script above when turned on and stops the casting when turned off. This way I can say “Hey Google, activate/turn on the security camera” to get my camera on my TV. However if I want to choose another screen then I would have to create another switch, for example named “security camera on kitchen display”.
configuration.yaml
# Switches
switch:
- platform: template
switches:
# Hallway Camera switch to stream to tv
security_camera:
value_template: "{{ is_state_attr('media_player.chromecast_ultra', 'media_content_id', 'http://192.168.1.163:8080/video') }}"
turn_on:
service: script.cast_device_camera
data:
media_player: media_player.chromecast_ultra
turn_off:
service: media_player.turn_off
data:
entity_id: media_player.chromecast_ultra
# Google Assistant
google_assistant:
project_id: !secret ga_project_id
api_key: !secret ga_homegraph_api_key
expose_by_default: false
entity_config:
switch.security_camera:
name: Security camera
room: Hallway
aliases:
- Hallway camera
expose: true
I also updated the script a little bit so I don’t need one script per screen I want to cast to.
what cameras do you have? i also had the black screen issue, while in lovelace it was working
i have cheap foscams thats maybe why
i tried component types: foscam/generic/ffmpeg/rtsp/onvif … it was always working in Lovelace, but never in google hub, or with a HUUUUge lag sometimes i saw like 1 frame
i also have a virtual synology with surveillance system on it, so used that rtsp stream from there, and it worked, although with a delay like 10 seconds, but it works
I have a similar problem – some cameras setup in BlueIris, streaming fine in Lovelace, google assistant integrated, and google home ios app showing the cameras. I can ask the google home hub “show baby camera”, and it says “ok, showing”, but the feed never comes up. I do have
http:
base_url: https://<mydomain>.duckdns.org
in my configuration.yaml, but it does not appear to help.
It would be great if somebody could point out how to troubleshoot this – how does this whole setup even work? (Does home hub pull the stream directly from BlueIris? Or does it use HomeAssistant as a proxy? Are the streams staying in my network, or do they go through google’s cloud?) Are there some logs I could look at? Run tcpdump somewhere? The whole thing seems rather opaque.
i disabled the stream: component, i just exposed switches with native feed to google assistant
so i say ; hey google, turn camera x on/off , works better with cast function
example :
as for my secret, you can define what you want, an stream url offcourse
Fabio, I am sorry, but I am a novice at homeassistant, and don’t understand your config without more context. Also, I am trying to see the video feed, not a series of jpegs…
On a somewhat different note, after enabling the debug logging I see following records when I ask google to show me a camera:
So it looks like the media_player.office_display goes from idle to playing, which makes sense. What seems wrong though is that media_content_id is empty… Does anybody know if it’s supposed to be populated? And if so, how do I go about doing that?