Raspberry Pi Surveillance Camera + Dropbox Upload

This tutorial will show you how to setup your Raspberry Pi Surveillance Camera for home security or to watch your fish tank while you’re away. I am going to use the Raspberry Pi Camera Module and Motion software.

1. Install motion, turning motion on by default

Now set start_motion_daemon=yes

Raspberry Pi Surveillance Camera

Raspberry Pi Surveillance Camera

 

 2. Change permissions of locations where default motion images are stored.

 

3. Download Pi Cam Driver

 

4. Unpack and Move the Downloaded Files

 

5. Turn on Motion Daemon by default

ctrl-x, Y and enter to save

6. Create storages for images

 

To Modify motion.conf File

Make these changes to the motion.conf file:

The following commands create file locations, A folder per day, per camera, per capture type. File names show camera number, image number, date & time
.

ctrl-x, Y and enter to save

Access Stream

http://IP-ADDRESS-OF-RASPBERRY:8081

Dropbox Uploader

First, clone the repository using git (recommended):

Then give the execution permission to the script and run it:

The first time you run

, you’ll be guided through a wizard in order to configure access to your Dropbox. This configuration will be stored in

.

Using the Scripts

The syntax is quite simple:

After this you can create scripts to upload and use any images. I use this script to move all of my snapshots to a tmp folder to upload and remove afterwards.

 

Purchase the Hardware

Links to purchase some of the Raspberry Pi hardware used can be found on Amazon here.

Raspberry PI 5MP Camera Board Module (Accessory)


List Price: $34.99 USD
New From: $11.71 USD In Stock
Used from: $256.21 USD In Stock

References

[1] Setting up Wireless motion-detect cam http://rbnrpi.wordpress.com/project-list/setting-up-wireless-motion-detect-cam/
[2] Raspberry Pi Camera Module Information http://www.raspberrypi.org/products/camera-module/
[3] How to use Dropbox with Raspberry Pi http://raspi.tv/2013/how-to-use-dropbox-with-raspberry-pi
[4] Github Dropbox Uploading Documentation https://github.com/andreafabrizi/Dropbox-Uploader
[5] Official IFTTT (If This Then That) Website https://ifttt.com/dashboard
[6] Information Regarding IFTTT (If This Then That) http://mitchtech.net/connect-raspberry-pi-to-gmail-facebook-twitter-more/
[7] MMAL Motion – Tuning & Optimizations http://www.raspberrypi.org/forums/viewtopic.php?t=75240&p=546758
[8] Cron Tasks to Update and Upgrade Raspberry Pi Packages http://www.techrepublic.com/article/automatically-update-your-ubuntu-system-with-cron-apt/

You may also like...

3 Responses

  1. Jarod says:

    I had a question about the images being saved. What directory will they be saved once they are taken? The /img directory?

    • Michael says:

      My motion.conf file has them being saved to /home/pi/img/ and then the MoveAndUpload.sh script moves them from there to the /home/pi/tmp/ directory for upload. After they are uploaded the files will be removed to save space on your Pi!

    • Michael says:

      So in your motion.conf file there is a parameter called ‘target_dir’ where the default value is the current working directory. If you want to change it to something like /home/pi/img/ it would save to the img folder. Let me know if you have any other questions!

Leave a Reply

Your email address will not be published. Required fields are marked *