× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Support for Foscam FI8918W IP Camera

tiranor
Aspirant

Re: Support for Foscam FI8918W IP Camera

tiranor wrote:
rob230 wrote:
Is this product dead now? Would be nice if we could just add simple stream urls like IPADDRESS/videostream.cgi?user=admin&pwd=psd that we know work :?


As i have 2 Foscam ip cams, i don't want to spend so much money for something i'm not sure is supported.

ATM, i directly record the videostream on my NAS, via the curl function, and a cron job. The only downside is that it records everything, and not just when there is a movement.

Maybe i'll try later to create another cron job to erase all videos not linked to any snapshot done directly by the camera software.


Many things changed since then.

The constant recording using curl killed 2 HDD of ny NAS (2nd one 2 months after the first one). It was required that i review all my system. Now, what it does :
-I plugged a 16GB usb stick to my NAS.
-a cronjob with curl records constantly to the usb stick (completely rewritten with the new firmwares from foscam). The camera own softare records snapshots to the usb stick.
-Every 6 hours, a cronjob moves (and not copy) the videos linked to snapshots (comparison of timestamps) to a specific folder, and join the snapshots.
-Right after that, another cronjob moves the rest of the videos to another folder (the usb stick is empty after that)
-Finally a last cronjob deletes the oldest videos and snapshots daily (all videos are kept 5 days, the snapshots and videos linked are kept 25 days).

I seems to be working quite well since then.
Message 26 of 38
tiranor
Aspirant

Re: Support for Foscam FI8918W IP Camera

For the interested people out there, below is all the setuop i did to make this work :

DISCLAIMER :
-I'm an amateur with limited knowledge of linux, things could be more optimised, but it works for me, so who cares 🙂
-You need root ssh access, and you need to know what you are doing, i'm not responsible if you screw something because you didn't know what you were doing while being root.
-Before trying anything, you have to understand what each command does exactly, it's mandatory as you may have to tweak some commands to suit your NAS and needs.

1- This is my crontab, comments are below :

#! /bin/bash

*/5 * * * * /opt/recordfoscam.sh

0 */6 * * * /opt/trifoscam.sh

50 */6 * * * /opt/transfertfoscam.sh

0 3 * * * /opt/nettoyagefoscam.sh

@reboot /usr/bin/nohup /usr/bin/java -jar /opt/Skifta/Skifta.jar -start & > /dev/null


-recordfoscam.sh is my record command file, executed every 5 minutes (it records the videostreams, and stop the recording after 5 minutes)
-trifoscam.sh is the command file which sorts the video files (moves videos associated to snapshots, and join the snapshots), executed every 6 hours
-transferforscam.sh moves the rest of the videos to a short save directory, executed 50 minutes after trifoscam.
-nettoyagefoscam.sh deletes the oldest videos and snapshots, everyday at 3am.

-last command is the launch of skifta at startup (the skifta addon doesn't work, i had to install the linux version, for more info, see the skifta official forum)



2-recordfoscam.sh (i have 2 cameras, one in my garage, one in my appartment)

#!/bin/bash

DOSS1="/USB/USB_FLASH_1/appart/"
NEW_NAME="appart"$(date +%d)"."$(date +%m)"."$(date +%y)"-hour"$(date +%H)"-"$(date +%M)".avi"
/usr/local/bin/curl -s -m 301 -o $DOSS1$NEW_NAME http://192.168.XXX.XXX:XXX/videostream.asf?user=XXXX\&pwd=XXXX & sleep 1

DOSS2="/USB/USB_FLASH_1/garage/"
NEW_SAME="garage"$(date +%d)"."$(date +%m)"."$(date +%y)"-hour"$(date +%H)"-"$(date +%M)".avi"
/usr/local/bin/curl -s -m 301 -o $DOSS2$NEW_SAME http://192.168.XXX.XXX:XXX/videostream.asf?user=XXXX\&pwd=XXXX & sleep 1


As you can see :
-i record in my USB stick in 2 separate folders.
-the XXX have to be replaced with your camera IP adress and port
-the XXXX have to be replaced with your camera login and password
-the curl command records exactly 301 seconds of video from each camera
-The url was changed when i updated the camera firmware, befor it was something like http://login:pass@ip:port/videostream.asf
-the video files names are something like : garage28.08.14-hour12-05 (variables NEW_NAME and NEW_SAME)


3-trifoscam.sh :

#!/bin/bash

DOSS10="/USB/USB_FLASH_1/garage/"
DOSS20="/c/Foscam/garage-tri/"
DOSS30="/c/Foscam/8910garage/"
NUMPIC=0

cd "$DOSS30" ; for y in *.* ; do NUMPIC=$((NUMPIC+1)) ; mv "$y" "$NUMPIC".jpg ; done
for y in *.* ; do mv "$y" "$y"-8910.jpg ; done

for x in "$DOSS10"*.* ; do temps1=$(stat -c %Y $x) ; for y in "$DOSS30"*.* ; do temps2=$(stat -c %Y $y) ; age=$((temps2-temps1)) ; age=${age#-} ; if [ $age -lt 700 ] ; then mv $x "$DOSS20" ; break ; fi ; done ; done


DOSS10="/USB/USB_FLASH_1/appart/"
DOSS20="/c/Foscam/appart-tri/"
DOSS30="/c/Foscam/8916appart/"
NUMPIC=0

cd "$DOSS30" ; for y in *.* ; do NUMPIC=$((NUMPIC+1)) ; mv "$y" "$NUMPIC".jpg ; done
for y in *.* ; do mv "$y" "$y"-8916.jpg ; done

for x in "$DOSS10"*.* ; do temps1=$(stat -c %Y $x) ; for y in "$DOSS30"*.* ; do temps2=$(stat -c %Y $y) ; age=$((temps2-temps1)) ; age=${age#-} ; if [ $age -lt 700 ] ; then mv $x "$DOSS20" ; break ; fi ; done ; done



As you can see :
-the snapshots orignial name length is too long, i have to rename them before issuing the comparison command, it's a bit bothersome, but i hadn't found a way around.
-in this example, i keep all videos which timestamp is within 700 seconds of the snapshots (as i have the video recording, my camera setting is one snapshot every 150 seconds when there is movement, to reduce the numbers of snapshots)


4-tranfertfoscam.sh :

#!/bin/bash

DOSS11="/USB/USB_FLASH_1/garage/"
DOSS21="/c/Foscam/garage/"

for x in "$DOSS11"*.* ; do temps1=$(stat -c %Y $x) ; temps2=$(date +%s) ; age=$((temps2-temps1)) ; if [ $age -gt 3600 ] ; then mv $x "$DOSS21" ; fi ; done


DOSS11="/USB/USB_FLASH_1/appart/"
DOSS21="/c/Foscam/appart/"

for x in "$DOSS11"*.* ; do temps1=$(stat -c %Y $x) ; temps2=$(date +%s) ; age=$((temps2-temps1)) ; if [ $age -gt 3600 ] ; then mv $x "$DOSS21" ; fi ; done



As you can see :
-There is another timestamp comparison (this time only the file age, greater than 1 hour), this is to process only the file that have been processed by the previous commands (remember this cronjob is executed 50 minutes after the sorting)
-I merely move those file to another folder, but if you don't want to keep them at all, you can just delete them.


5-nettoyagefoscam.sh :


#!/bin/bash

cd /c/Foscam/

DOSS111="/c/Foscam/appart/"
DOSS121="/c/Foscam/garage/"

cd "$DOSS111" ; for x in *.* ; do temps1=$(stat -c %Y $x) ; temps2=$(date +%s) ; age=$((temps2-temps1)) ; if [ $age -gt 432000 ] ; then rm -f $x ; fi ; done
cd "$DOSS121" ; for x in *.* ; do temps1=$(stat -c %Y $x) ; temps2=$(date +%s) ; age=$((temps2-temps1)) ; if [ $age -gt 432000 ] ; then rm -f $x ; fi ; done


DOSS111="/c/Foscam/appart-tri/"
DOSS121="/c/Foscam/garage-tri/"
DOSS131="/c/Foscam/8916appart/"
DOSS141="/c/Foscam/8910garage/"

cd "$DOSS111" ; for x in *.* ; do temps1=$(stat -c %Y $x) ; temps2=$(date +%s) ; age=$((temps2-temps1)) ; if [ $age -gt 2160000 ] ; then rm -f $x ; fi ; done
cd "$DOSS121" ; for x in *.* ; do temps1=$(stat -c %Y $x) ; temps2=$(date +%s) ; age=$((temps2-temps1)) ; if [ $age -gt 2160000 ] ; then rm -f $x ; fi ; done
cd "$DOSS131" ; for x in *.* ; do temps1=$(stat -c %Y $x) ; temps2=$(date +%s) ; age=$((temps2-temps1)) ; if [ $age -gt 2160000 ] ; then rm -f $x ; fi ; done
cd "$DOSS141" ; for x in *.* ; do temps1=$(stat -c %Y $x) ; temps2=$(date +%s) ; age=$((temps2-temps1)) ; if [ $age -gt 2160000 ] ; then rm -f $x ; fi ; done




-First block is the generic video streams kept 5 days (432000 seconds)
-Second block is the interesting videos kept 25 days (2160000 seconds)
-WARNING : make sure that you're in the good folder before using rm -f (the other remove commands prompt for a confirmation when deleting several files in a loop, so only rm -f seemed to work for me, but i made sure i was in the videos folder before using the loop full power)



If you have questions, feel free to ask.
Message 27 of 38
chrispeachey
Aspirant

Re: Support for Foscam FI8918W IP Camera

need some support for this? so many other no-name cameras supported but not foscam? bit confused.

Message 28 of 38
jjames1
Tutor

Re: Support for Foscam FI8918W IP Camera

was trying the 30 days free, looks like no support for Foscam , means mays as well uninstall.....

Message 29 of 38
copymaster1
Initiate

Re: Support for Foscam FI8918W IP Camera

netgear wake up Support for Foscam

Message 30 of 38
DaneA
NETGEAR Employee Retired

Re: Support for Foscam FI8918W IP Camera

Hi copymaster1,

 

Welcome to the community! 🙂

 

I recommend that you kindly post your concern in the Idea Exchange for ReadyNAS Network Storage board here .  Be reminded to add kudos to the ideas because this will help as the development team will be reviewing the post that has the most kudos and it might be considered to be added on the future functionality of the product.

 

 

Regards,

 

DaneA
NETGEAR Community Team

Message 31 of 38
savek
Star

Re: Support for Foscam FI8918W IP Camera

When we could expect Foscam support? Could you pelase just reply with - soon, never or something simple, I see lots of people are pushing you for sometime now to enable Foscam support. It will make our lives easier. 

 

Thanks

Vlad

Message 32 of 38
BrianL2
NETGEAR Employee Retired

Re: Support for Foscam FI8918W IP Camera

Hi savek,

 

Welcome to the community!

 

Haven't seen a post in the Idea Exchange board about Foscam support for Surveillance. Kindly make a thread so other members who are pushing for the same request can share their ideas and suggestions. More importantly the more kudos it gets the more attention it can get from NETGEAR.

 

 

Kind regards,

 

BrianL
NETGEAR Community Team

Message 33 of 38
PandaNL
Tutor

Re: Support for Foscam FI8918W IP Camera

If everyone can vote this idea up please: https://community.netgear.com/t5/Idea-Exchange-for-ReadyNAS/ReadyNAS-Surveillance-Foscam-Support

 

If I knew this beforehand I would have bought a Synology, they seem to take their surveillance station seriously instead of 4 years without support for one of the most sold camera brands.

Message 34 of 38
BrianL2
NETGEAR Employee Retired

Re: Support for Foscam FI8918W IP Camera

Hi PandaNL,

 

Just gave the thread posted by savek a Kudos. I hope it will get more 🙂

 

Kind regards,

 

BrianL
NETGEAR Community Team

Message 35 of 38
ronlaws
Aspirant

Re: Support for Foscam FI8918W IP Camera

Still no support for foscam devices, which is really quite ignnorant of the developers maintaining support of ReadyNAS servaliance..

 

 

For anybodies reference, the Foscam firmware is quite standard across models, you can often find the stream on http://ip_of_cam/videostream.cgi?user=***&pwd=***

similalry, replace videostream.cgi with videostream.asf if the model used supports sound.

 

I really don't understand why netgear thinks these cameras are not wide spread enough, they are literally everywhere, Ebuyer sells Xenta camers extremely cheaply, which are actually just re-badged FOSCAMs with a badly translated Web interface! same URLS and Resoruces are still there and available, among the 100's of other cheap clones. 

 

Forgive me for bing a bit upset but somebody inside netgear needs a very hard slap across the face! just dropping in a "Custom" camera that lets you set your own video stream paramiters would solve the issue. or at the very least with this information add a Generic Foscam option!!!. 😠

Message 36 of 38
savek
Star

Re: Support for Foscam FI8918W IP Camera

I know this is old post but you all can give KUDOS here !! !

 

https://community.netgear.com/t5/Idea-Exchange-for-ReadyNAS/ReadyNAS-Surveillance-Foscam-Support/idi...

 

NETGEAR ENABLE FOSCAM SUPPORT !! 

Message 37 of 38
bizmate
Tutor

Re: Support for Foscam FI8918W IP Camera

Could you share  your curl script, maybe on github or something public, and how do you detect the stream address? I have a very cheap chinese PAN camera. I want to buy a better HD IP cam but I am always interested in alternative approaches to integrate directly as you are doing at the moment

Message 38 of 38
Top Contributors
Discussion stats
Announcements