In this tutorial we will learn, how to make your own webcam as a motion detection camera, which will not only stream live video but also send you motion captured video and images on Google drive as well as alert on gmail. If you want, it can also record video/ Images to local drive. So lets get started.
This project can be used in,
- Home Security System,
- Burglar Alert System,
- CCTV Monitoring System,
Thanks to motioneyeos, with the help of motioneyeos you can make complete home security system with raspberry pi by no time.
We can connect two cameras or more if you want.
Select motioneyeos raspberry pi version, In my case I am using raspberry pi 4. Download motioneyeos.
Formatting SD Card:
We will need to format our SD card with the help of SD card formatter.
Select Image, Select SD card and click on Flash. Etcher will Flash motioneyeos image into SD card. After flashing complete, remove SD card and insert it in the raspberry pi.
Connect Camera either webcam or picam or Both. In this tutorial I am connecting both the camera & plug the power.
Connecting Raspberry pi with LAN Cable:
First time setup, you will need LAN cable for connecting raspberry pi and your router. After first time setup we will change connection type to wifi, so next time you don’t need LAN cable.
Waiting for motioneyeos boot:
Wait for at least two minutes this is very important step.
Angry IP Scanner:
After powering raspberry pi wait for two mintues then open Angry IP scanner, For finding IP address we will need IP scanner, but you can also see IP address on your router admin page. Click on Test. It will show you all the IP addresses which are connected to your router, search for MEYE-XXXX, copy IP address.
If Angry IP scanner shows you error while opening or give you a message download OpenJDK. Then you will need to download and install this software.
Streaming Live Video & Setup:
Paste that IP address you copied earlier in angry IP scanner or router admin page. Now you will be able to see one camera on screen.
Below image is final output.
Click on add camera and select camera type and camera. Click on apply.
Turn on Wireless network and enter your WiFi Credential and Click on Apply and wait for it to restart.
After it restart, go to power click on shutdown.
Now you can remove your LAN cable, plug the raspberry pi power again, search for IP address with IP scanner. If you don’t to find IP address every time you can set static IP address.
If you are unable to see options in menu, click on profile icon and USERNAME: admin and leave blank for password, click Login.
You can change text & text size which is appearing left and right bottom side of camera.
In video device, enable automatic brightness. Change resolution, camera angle & frame rate according to your need.
Enable video streaming, Set streaming frame rate and streaming quality. Streaming URL for this camera is available at IP_address:8081 eg. 192.168.0.103:8081, Similarly you can take snapshot using snapshot URL.
If you want to capture motion detected images, Enable Still Images. In capture mode select motion trigger.
we want to record video when motion detection happen, so enable movies.
Increase value of “frame change threshold” to anywhere between 2 to 20%. 0 is for more sensitive, which is also lead to false detection.
If you want to receive notification via email when motion detected, you can enable motion notification. Also fill the information for sending an email.
If you want to store motion detected videos/Images on google drive or drop box, Enable “upload media files”. Select google drive in upload service. In location create folder name. Click on obtain key, give permission to motioneyeos and you will get Authorization Key. Paste here in Authorization Key. Click on Test Service, if nothing happen just wait for few minutes and click on apply.
You can also set schedule for motion detection.
Access Motion Detected Videos / Images:
There are two ways you can access video and images
1) You can play or watch images on camera itself, just move cursor to the camera, click on play icon button for video and image icon for images.
2) If you enable google drive upload, you can get directly access to the videos and images there.