Streaming foscam to google home hub issues

Hi guys,

I picked up a google home hub on the weekend and figured I’d get straight into using it with HA. We have a foscam camera in the toddlers room which i figured would be a good test for us.

We’ve always had the foscam in HA so a simple script or automation was added but i get very inconstant streaming:

camera:
  - platform: foscam
    ip: 192.168.1.165
    username: ha
    password: !secret foscampass

scripts:

  cast_camera:
    sequence:
      - service: camera.play_stream
        data_template:
          entity_id: camera.foscam_camera
          media_player: media_player.kitchen_2

When activating it, the stream takes a while to start (10 seconds or more). However if I have the same video streaming to my phone or web interface, the streaming starts instantly on the home hub.

Regardless - the main issue is the stopping and starting:

I ended up with these settings on the foscam as a lot of other settings didn’t stream at all:

I’ve got the log set to warning only, and if i turn on debug - it’s too much info to look through. I tried the following but it didn’t give me anything:

logger:
  default: warning
  logs:
  homeassistant.components.media_player.cast: debug

Any help would be greatly appreciated! Thanks :slight_smile:

Did you ever get this working properly?

I’m having the same issue, but the stream won’t even start!

nah couldn’t work it out and no one could help on here so just gave up

did you ever figure it out? its way slow on my hubs/cast devices, allthough, when i stream from HA frontend, it works

Hi Fabio,

I have tried unsuccessfully for months to get this to work, using all sorts of different ways.

Last night I saw that a firmware update was available for my C2, and this added the option to stream the cameras directly to Google Home Hub. I’ve added Foscam as a provider for smart home services in the Google Home app and it actually works! Bit laggy at times, but actually getting a stream is 1,000 times better than what I did have, which was just a black screen.

ah, interesting , didnt now about firmware, maybe also for my C1 models
although i was able to get it to work though, but extreme laggy , constant buffering, tried foscam/generic/rtsp/onvif

but i also have a synology, for my surveillance system, i grab the RTSP link from there
that works much better, no lag anymore , but it takes like 5-10 sec before the video is displayed, but afterwards , when watching, it doesnt buffer anymore

1 problem though, there is an extreme delay on my video, also in Home Assistant itself, the video is like 20 seconds behind, strange though, also in lovelace, but if i open the direct stream in VLC, its without a delay

also , i run HA on a Xeon Processor HP Microserver, so cpu should not be the issue also :slight_smile:

but anyway, that firmware looks interesting

do you mean this firmware for your C2 ? i dont see google integration there in rls notes, only alexa?

https://www.foscam.com/downloads/firmware_details.html?id=11

or where do you have it from ?

also, last question? how did you set this up ? your cam is actually connected to www.myfoscam.com ? and you are adding in google home app, “@foscam camera” as a service?

si it means that your stream goes out to internet (foscam) and comes back? so its not only internal

I can’t access the stream now so can’t show you, but on my phone (with the latest firmware) there is also an option to share to Google Home.

I’ve added the cameras to the Foscam app, and only my C2 seems to have the sharing option, I have 3 C1s, but none of them do.

Yes, I’m adding ‘@Foscam Camera’ in the Google Home app, then it is appearing on my list of cameras on my Google Home Hub. The lag is about 5 seconds, which I can deal with! Not sure if it is going out to Foscam servers and back, I will see if Pi-Hole is reporting this.

Ok thnx for info… Seems firmware c1 is outdated indeed… Maybe I will come…
Not tested app yet, I tried myfoscam.com … Is that the same?

btw, do you have exposed your cameras to internet by opening an port on your firewall or using upnp?

The app on my android phone is just called ‘Foscam’. It’s the one I used to add the cameras to my wifi.

I do have the port exposed for this camera, but that’s for another reason, not sure if blocking the port would block the connection.

yeah, i think it will block the camera
the google home app is linked with foscam app, so foscam app is cloud, probaly no able to see streams if you dont have a port open