Foscam R2(M)/R4(M) with HomeAssistant

Hi all,

I’ve been trying to setup my Foscam R4M for a while. Using the webinterface from this IP camera i get a fluent and very high quality image. My internal network is 1gbit/s using all Ubiquiti Unifi hardware (switches, usg & ap’s for the ones wondering).

The issue i’m facing is that I can’t seem to get a fluent image in Home Assistant. It keeps being stuttery.

My configuration is like this:

camera:
  - platform: foscam
    name: mycam
    ip: 192.168.10.x
    port: 88
    rtsp_port: 88
    username: username
    password: mypassword

I’m running my Home Assistant in a docker container on a ubuntu vm (on ESXi) which has a Ryzen 9 3900X with 128GB memory. So it can’t be performance issues. I already tried setting it up on multiple pieces of hardware (running a home assistant container on different machines) but they give the same result.

Any help would be great!

Thank you in advance.

Kind regards,
Rob Hofmann

EDIT1: I also tried setting it up using the generic platform using the RTSP stream. No avail. This doesnt give me any result (video won’t load at all).

Hi,

Look at that comment to enhance your video rate:

It was on a previous version of onvif component but i describe some optimisations to do on the Foscam web admin side.

This doesnt solve my issue. Its still lagging behind 30 seconds and updating like once every 2 seconds or so (making the lag even bigger).

I also added this to my configuration.yaml:

ffmpeg:
stream:

Im not sure what i’m doing wrong. A colleague of mine has the exact same camera and uses the same configuration and DOES have a smooth image. Its really mindbreaking…

For people running into the same issue. In the end the problem was at the camera side of things. Somehow if you click “Get latest firmware” inside the camera portal, it will NOT download the latest version, but the secondlatest. In this version there seems to be an issue with the livestream between homeassistant & de camera.

After downloading the true latest firmware (In my case 2.91.2.52) the videostream became butterysmooth!

Topic closed!

2 Likes