Follow the following tutorial to install SURVEILLANCE CAMERA WITH MOTION CAPTURE :
OpenCV must be installed to get detection of motion
Adding Email Alerts
Start by installing the tools you’ll be using to send emails:
sudo apt-get install ssmtp
sudo apt-get install mailutils
sudo apt-get install mpack
Then Run :
sudo nano /etc/ssmtp/ssmtp.conf
Check file must contains the following configuration parameters
#FromLineOverride=YES
root=yuvirpr@gmail.com
mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
AuthUser=yuvirpr@gmail.com
AuthPass=********
FromLineOverride=YES
UseTLS=YES
UseSTARTTLS=YES
TLS_CA_File=/etc/ssl/certs/ca-certificates.crt
Configuring Motion to send Email
Make a small change to your Motion configuration file.
sudo nano /etc/motion/motion.conf
You’ll be updating the on_picture_save parameter. Uncomment it and change it’s value as follows (updating the recipientEmailAddress to the email at which you want to receive alerts):
mpack -s "Your Security Camera has detected Motion!" %f [recipientEmailAddress]
If you got error like from email.mimemultipart import mimemultipart then you need to install send mail. Follow the tutorial :
http://unixetc.co.uk/2014/11/04/enable-outgoing-mail-on-raspberry-pi/
To check system log
tail /var/log/syslog
That’s It !!!
You receive mails as motion detected by SURVEILLANCE CAMERA