Motion Activated Security Camera based on raspberry pi.
Steps for PiTalk software installation -
-
Open Terminal and download the code by writing:
git clone https://github.com/sbcshop/Spi-Box.git
-
Your code will be downloaded to '/home/pi' directory. You can use 'ls' command to check the list of directories.
-
Go to 'Spi-Box' directory. Move 'SPi-Box' and 'SPi-Box Config' (shortcut icon) to Desktop
-
Install 'SSMTP' (SSMTP is for mail configuration) and 'MPACK' (MPACK is used for sending attachements) using commands:
sudo apt-get install ssmtp sudo apt-get install mpack
-
Install MP4Box with:
sudo apt-get install -y gpac
-
Edit SSMTP configuration file:
sudo nano /etc/ssmtp/ssmtp.conf
Add the following configuration and save it;
root=postmaster mailhub=smtp.gmail.com:465 hostname=raspberrypi [email protected] AuthPass=user_password FromLineOverride=YES UseTLS=YES
-
Send a test mail using command:
mpack -s "subject" file_path [email protected]
Example:
mpack -s "test mail" /home/pi/image.png [email protected]
-
Google will block your sign-in attempts. Check your mail Inbox and allow to less securing apps so that Raspberry can send Emails
-
Repeat Step 6 for sending a test mail
-
Double Click on 'SPi-Box Config' icon placed on desktop, and configure it:
- Tick on "turn on email"
- Enter the subject
- Enter the email recipient address
- Click on "Test Email" for checking configuration is correct
- Press "save and quit"
-
Connect the Camera with Raspberry pi and PIR sensor output to 'GPIO 4' i.e. Pin 7 of Raspberry Pi
-
Enable Camera in Raspberry Pi Configuration and Restart the Raspberry Pi
-
Double Click on "SPi-Box" icon on Desktop, to run the script and if motion is dectected it will click and image and email it