Custom component for old FOSCAM cameras

Download foscamsd.py and follow the instructions on file.

1 Like

Cool!

It works good so far.

I have one old Foscam camera that I had to set up using the generic mjpeg camera component using cgi commands to pull the image. Not anymore!

Thanks!

With recent versions of HA 0.70+, it is better to use these cameras as generic ip cameras!
Use as:

still_image_url: http://YOUR_CAM_IP:88/snapshot.cgi?user=USER&pwd=PASSWORD

TIP: You can record locally by using the following shell command:

timeout 120 wget http://YOUR_CAM_IP:88/videostream.asf?user=USER\&pwd=PASSWORD -O cam1_$(date +%F_%T).asf

it records 120 seconds of video.

The .asf format is a Windows Media Player format and can be played by almost every media player. Use VLC or ffmpeg to transform it into another format, e.g., .mp4.

I’m not sure why you say that.

I’ve been using this custom component since october and it’s been working great.

Am I missing something?

It continues to work well, however just replicates what is now the default behavior of generic ip cameras in Home-assistant!

By the way, did you saw the TIP above?

For us lowly HASSIO users :stuck_out_tongue_closed_eyes:, command timeout is not available.
Instead use :

wget “http://camera_ip:88/videostream.asf?user=USER&pwd=PASSWORD” -O /path/to/folder/file_name$(date +%F_%T).asf & sleep 120s ; kill $!

Change the 120s after sleep to your required recording time in seconds.

I like the fact that you don’t need to use a URL and have the user and pw in it. I was using the generic IP camera component before and it needed the URL also. It seemed redundant to have the user and password in the URL and in the component set up too.

Yes, but I don’t really need to record locally. I use Blue Iris for my IP Cam recordings.