Foscam C1 HD live stream not working

I have just installed hass.io to an old RPI 2 B and I am very excited so far. My problem for now is that I am trying to connect a Foscam C1 to the lovelace UI and I am unable to get it streaming.

So it works fine If I refresh the page (as a screenshot) or If I click on the image and view the separate modal stream.

Also, I have no audio in both cases.

I tried to test it via RSTP and vlc, everything works fine including the audio,
This is my config:

camera:
- platform: foscam
  ip: 192.168.1.4
  username: *******
  password: ********

And the lovelace module:

type: picture-entity 
entity: camera.foscam_camera
camera_view: live

Has anyone made it work to stream on the UI ?

try this and replace with your ip it took me ages to find the correct urls for my cameras

configuration.yaml

stream:
ffmpeg:
camera:
  - platform: generic
    name: Rear
    still_image_url: http://local ip/web/cgi-bin/hi3510/snap.cgi?&-getpic
    stream_source: rtsp://local ip:554/11
    verify_ssl: false

  - platform: generic
    name: Front
    still_image_url: http://local ip/jpgmulreq/1/image.jpg?key=1561029927281&lq
    stream_source: rtsp://local ip:554/1/h264major
    verify_ssl: false

card 1

camera_view: live
entity: camera.rear
type: picture-entity

card 2

camera_view: live
entity: camera.front
type: picture-entity

Well it works with rtsp but after a refresh stops. The bar under the stream shows “Idle” always. Also when I edit the UI it just streams fine. Refresh the page, stops. Tried with Brave, Firefox and Chrome.

mine shows idle also stream will stop if not if browser not at maximum

make sure you have stream: and ffmpeg: in your config and ffmpeg is installed

I replied to your Reddit post as well…

My C1 streams good using the Foscam component. I don’t believe Home Assistant supports audio though. Here is my config. The only real difference between mine and yours is that I call out port 88.

cameras.yaml

- platform: foscam
  ip: '1.2.3.4'
  port: 88
  username: !secret camera_username
  password: !secret camera_password
  name: "C1 Camera"`

Lovelace

cards:
  - camera_view: live
    entity: camera.c1_camera
    type: picture-entity
type: vertical-stack

EDIT: I should add that I’m using a Celeron NUC. Maybe your RPi doesn’t have the power to stream it?

i using a 2x cpu 16 core server with docker so i have no problem with streaming it could be the pi2 might not have enough bandwidth and power

hmmm it makes sense, I am planning to upgrade.

What about audio? Any ideas?

I have HA running within Proxmox lxc container on a NUC i5, but with Foscam enable i get a delay of ~5 sec and only get some frame, no live feed. live feed seems not to work.

Via the Foscam app it is working fine.

I never got it too work with foscam/generic component…

I now have them connected with Synology surveillance , and use that exposed stream, that’s better…

But still without the stream: component, that doesn’t work well…

So tips are welcome…

Are these urls for foscam? I don’t think so, not for C1 model

I had the same problems with a foscam 9902, stream did not work, but freeze image was fine. As soon as i changed in the Lovelace Picture card from “auto” to “live” I lost the picture of the camera. For me the solution was to add the rtsp_port:xx command into the settings in configuration.yaml.
camera:

  • platform: foscam
    ip: 192.168.200.58
    port: 88
    rtsp_port: 88
    username: xxxxx
    password: xxxxxxx
    name: xxxxx