Board logo

subject: How To Setup Axis 207mw Ip Camera To Send Snapshot Over A Period [print this page]


Hello,
Hello,

In this article I want to share how we can set up AXIS 207MW ip camera to send pictures to ftp server in a given period, whether a motion detect or change the status of digital inputs. Because the user interface there is no chance we will use the crontab to perform our command over our chosen time. Should prepare a script that needs to upload the camera. Here is the code:

#!/bin/sh

# Start a buffer handler with a pre-alarm and

# a post-alarm buffer of 5 images each

buffer_handler -a 1 -F -i my_buf &

# Sleep for 3 seconds to make sure the pre-images are taken

sleep 3

# Get the process id of buffer_handler

PID='cat /var/run/buffer_handler/my_buf.pid'

# Stop the buffer to make it save the pre-images and

# start taking the post-images

kill -USR1 $PID

# FTP server info

SERVER=(input server ip)

USER=(input your ftp username)

PASS=(input your ftp password)

UPLOADPATH=(input your upload path)

# Uploaded files will be named using this format

FORMAT=image%y%m%d_%H%M%S%f.jpg

# Files to be uploaded will be read from this FIFO

FIFO=/var/run/buffer_handler/my_buf.fifo

# Go to working directory

cd /var/run/buffer_handler/buffers/my_buf

# Use the LD_PRELOAD macro to replace the unlink function

# in glibc with the one in libcache_unlink.so

export LD_PRELOAD=libcache_unlink.so:$LD_PRELOAD

# Launch sftpclient

# sftpclient continues uploading until an empty name # is encountered

sftpclient -M $SERVER -u $USER -w $PASS -c $UPLOADPATH -d $FORMAT -D -f $FIFO

# Terminate buffer_handler when done

kill $PID

2. go to: setup> system options> advanced> plain text config> open user.task and enter the following command:

time(h(7-19)m(0,10,20,30,40,50)) once % /etc/get_snapshot;

By this command, the ip camera sends snapshot every 10 minutes between 7 am to 7 pm.

I hope I was helpful

Greetings all!

by: P.K.




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0