Get a Free Estimate on your installation
Blog categories
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!
| < Prev | Next > |
|---|
Latest news
- QNAP VS-2004 Pro - New model from QNAP added to our product line!
- New models from Vivotek - FD8133V and FD8134V already on the market!
- Axis strengthens the patent portfolio
- Brazilian department store makes VIVOTEK cameras part of its renewal
- Important museum in Chile revamps surveillance with variety of VIVOTEK cameras








