How to Make a Smart Security Camera with a Raspberry Pi Zero

  Переглядів 1,053,463

Hacker Shack

Hacker Shack

6 років тому

In this video, we use a Raspberry Pi Zero W and a Raspberry Pi camera to make a smart security camera! The camera uses object detection (with OpenCV) to send you an email whenever it sees an intruder. It also runs a webcam so you can view live video from the camera when you are away.
See how we built it, including our materials, code, and supplemental instructions, on Hackster.io: www.hackster.io/hackershack/s...
Make sure to look out for our behind the scenes video! • Behind the Scenes: Sma...
USEFUL LINKS:
Follow Hacker Shack on Instagram:
/ hackershackofficial
Subscribe to Hacker Shack: goo.gl/qHjz4j
Visit our website for parts and project updates: www.thehackershack.com/
View our code on Github: github.com/HackerShackOfficia...
OpenCV Install Guide: www.pyimagesearch.com/2016/04/...
Get our 3D printer: robo3d.myshopify.com?rfsn=1004615.c5abe
MATERIALS:
Raspberry Pi Zero Wireless × 1
Amazon Affiliate Link - goo.gl/Zsxm7k
Raspberry Pi Camera module × 1
Amazon Affiliate Link - goo.gl/4kR632
Check out the NoIR camera for night surveillance
Amazon Affiliate Link - goo.gl/fT7oL9
Raspberry Pi Zero Camera Cable x 1
Amazon Affiliate Link - goo.gl/pBVZb1
Micro-USB to USB Cable × 1
1/4" MDF Board × 1
90 Degree Angle Bracket × 1
Outdoor Mounting Tape × 1
M4 X 20mm Long Machine Screws × 2
M4 Hex Nuts × 2
M2.5 Machine Screws × 4
#8 X 3/4" Long Machine Screws × 1
#8 Hex Nut × 1
#8 Wing Nut × 1
MUSIC:
/ joakimkarud
Disclaimer
The methods shown in this video should be used
as a guide only.
HACKER SHACK ACCEPTS NO RESPONSIBILITY FOR
ACCIDENTS OR INCIDENTS ARISING FROM INDIVIDUALS
UNDERTAKING ANY OF THE TASKS DESCRIBED. IN
PARTICULAR, IF UNSURE YOU SHOULD ALWAYS CONTACT
A QUALIFIED TRADESMAN BEFORE PROCEEDING.

КОМЕНТАРІ: 724
@circuitmasters5258
@circuitmasters5258 5 років тому
Man Finally this project I have been trying to create for a minute...i need it LOL!
@mgtowmapmaker8741
@mgtowmapmaker8741 6 років тому
Always test your electronic components to make sure they function properly before mounting them in a "permanent" way. Great video.
@tannerlane9669
@tannerlane9669 2 роки тому
How do you know he didn’t ?
@theapricotbambino
@theapricotbambino 6 років тому
why am I just finding this youtube channel now!? I love you guys!
@lleo9791
@lleo9791 4 роки тому
This project is great, thank you for sharing!
@christopherbillington8965
@christopherbillington8965 4 роки тому
rather than dealing with MDF, I think I would mount it in an electrical box. The steel ones are modular, cheap and durable. Plus, you can mound an unwired outlet in it, which isn't the sort of thing most people would think twice about seeing.
@narpat007
@narpat007 4 роки тому
Excellent ! In the event of image detected, have you given thought to consider switching a light bulb via I/O pins in conjunction with a optoisolator or something like that ?
@niler3019
@niler3019 6 років тому
You could easily become a teacher! Thanks for the video!
@cri8tor
@cri8tor 5 років тому
Great tutorial and appreciate the time and effort it takes to record, edit and upload. It's already been done, but please consider an updated version using Raspberry Pi 3 B+. Wyze data mines it's customers, can't be used with iPhone 4S and has no customer service number, so your hack is a great alternative. Cheers
@paannnnnnnnnnnnnnnnnnnnnnnn
@paannnnnnnnnnnnnnnnnnnnnnnn 6 років тому
thanks for the tutorial!
@fabulousasia9848
@fabulousasia9848 4 роки тому
This is a great project. One of my students built something similar, except she used the project to feed her cat by sending emails to the DIY cat feeder! :)
@imben77
@imben77 6 років тому
You have no idea now we'll timed this video is! I just got a pi zero camera kit (with suction cups for a window) and was researching the code when I found your video :)
@PeterMaloy
@PeterMaloy 6 років тому
Inkscape is awesome for drawing up templates. Free, runs on Windows, Mac, Linux. I use it for laying out all my laser cutter designs. Probably would have saved some time on this project.
@anamikamishra552
@anamikamishra552 5 років тому
That ruler used to draw the line was so precise & appropriate. By the way nice video
@jkamagie
@jkamagie 6 років тому
Nice work, thx for the tutorial
@nanakeyks
@nanakeyks 4 роки тому
I love the use of multiple skills to get the job done.
@RT-eb6vo
@RT-eb6vo 6 років тому
Well done guys, as always.
@DanielJohnHowTo
@DanielJohnHowTo 6 років тому
The wood needs sealing and priming otherwise it will swell up and come loose etc , in case anybody is thinking of building this.
@sebifisio
@sebifisio 6 років тому
Hey @HackerHouse, awesome project as always. I have a question, does this work with the NoIR camera board as well?? Would love to make this for the baby room... Cheers
@mnbvcxzzxcvbnm
@mnbvcxzzxcvbnm 6 років тому
I'm going to do it. Excited. Thank you guys.
@arielomc
@arielomc 6 років тому
Excelent project guys!! I imagine the v2.0 where you install night vision to this security camera.
@roid1510
@roid1510 5 років тому
This is cool. Is it possible to setup a record function that saves the footage somewhere secure? And make a remote you use to switch on the camera when youre going out?
@dheerajs2838
@dheerajs2838 6 років тому
accidentally stumble upon your channel .. you guys are doing amazing job :)
@Ricraftsla
@Ricraftsla 4 роки тому
Thank you so much for the tutorial... How to fix "error sending email?"
@GeniusFormat
@GeniusFormat 3 роки тому
The error that I am getting is "Error sending email: "
@lukaszgudewicz6442
@lukaszgudewicz6442 6 років тому
Awesome project. Will definitely give it a try.
@Malcolmstuartcole
@Malcolmstuartcole 6 років тому
Very user friendly vid..well done
@cxosposync9937
@cxosposync9937 2 роки тому
Awesome Prj!!!
@pointer5698
@pointer5698 6 років тому
amazing...i should definitely try this dude
@alphawolf9371
@alphawolf9371 4 роки тому
I am using elements of this tutorial for my own robot. I am using a Raspberry Pi Model B, a Raspberry Pi camera for face recognition, and some small servos to move parts of the robot.
@GadgetAddict
@GadgetAddict 6 років тому
Pretty cool. Useful for those who just want something that basically works out of the box.
@Chris_t0
@Chris_t0 3 роки тому
This is 2 years old but its worth point out... This is the complete opposite of "works out of the box".... Literally you even have to MAKE the box...
@viertausend87
@viertausend87 3 роки тому
@@Chris_t0 I scrolled through the internet in the office and suddenly I had to start laughing out loud. Best comment I read in a while!
@ParodieHecker-mobile
@ParodieHecker-mobile 3 роки тому
@@Chris_t0 Well, I think... That was the joke :D
@fernandox1298
@fernandox1298 6 років тому
muito bom , parabéns!
@joshhagen4182
@joshhagen4182 6 років тому
I wonder if you could have a Bluetooth connection or something and have multiple cameras 🤔 awesome video! Airsoft turret!!! That's sweet I wanted to build one of those In seventh grade. That was in 2010, makes me think I should try building one now!
@AtenTetsu
@AtenTetsu 2 роки тому
HI thanks for this great tutorial. But, may I know can I add alarm function when it detect the person?
@murderdoggg
@murderdoggg 6 років тому
Nice work with the jigsaw dude. I am surprised you don't have one with a shop-vac attachment.
@mikepage3379
@mikepage3379 3 роки тому
First off, great video. Can this work with a 3B+? Do you have an .stl for the case and not one out of mdf?
@Music-lv8xf
@Music-lv8xf 5 років тому
how about visual studio app and not in the browser?? do you have any tutorial on how can i get the video coming from raspberry pi to windows app build in vs c#?
@angelicaibay3268
@angelicaibay3268 5 років тому
Your genius bro
@nottelling2976
@nottelling2976 6 років тому
Will this integrate with Camera apps on phones such as IPWebcam? I've set up my Pi2's as cameras using WebEyeOS but I wasn't too happy with the performance.
@najawarus5693
@najawarus5693 6 років тому
Best Tutorial for home made security cams
@Ree1981
@Ree1981 6 років тому
Top 10 anime security cam tutorials
@iamParvezKhan25
@iamParvezKhan25 5 років тому
Thanks gor share entire project.. I will tty to make this. For home security. Thanks again! Love. 😍😘
@joseabrahamkuqueb6639
@joseabrahamkuqueb6639 6 років тому
Hi, i have a question. i gonna make this proyect but i need to know if I can use a raspberry pi 3?
@DjLight.
@DjLight. 5 років тому
Hello sir this is awsome video💜
@aman.takher
@aman.takher 4 роки тому
Hi there, Excellent video. One question is this setup is capable with Raspi 4 B?
@rocko0028
@rocko0028 6 років тому
Im coming from the wood building/car diy side of the youtubes but am I missing something? How or where does it get power from? And how is it connected to the home network? Does the raspi have a battery? Or WiFi? Can you get different camera sensors for different resolutions? Or some night vision sensors?
@SheltonDCruz
@SheltonDCruz 2 роки тому
Thanks Davis!
@michaelashitey7930
@michaelashitey7930 6 років тому
Good work done
@ntc490
@ntc490 5 років тому
What sort of frame rates are you getting? I was thinking the Pi Zero W would be tool slow for this application. The form factor and price are nice, though.
@joybuendia6742
@joybuendia6742 6 років тому
It works, it's better if you read the instructions of the GitHub page, cause have many differences for python 3 or 2 , in my case I needed to changed the route because was different, in my case was: Smart-Security-Camera-Master/. Also I needed to download the VIM, just sudo apt-get install vim, and that's it
@lorensiuswlt
@lorensiuswlt 6 років тому
Nice tutorial...i have a plan to make security camera using raspberry pi like this. Can we take picture/snapshoot while the camera detecting motion so we can upload itu via http to server or send it along with the email attachment?
@novechotango5033
@novechotango5033 6 років тому
Good day, Is it possible to merge or connect this project to another project which is Smartphone Connected Home Door Lock as one project? Does the raspberry pi 3 can run them simultaneously? Thank you
@kennedymwangi60
@kennedymwangi60 5 років тому
nice one i loved it
@blakelong6149
@blakelong6149 6 років тому
Any suggestions on how to save short video files or images to a usb or sd card once motion has been detected? Also suggestion on using a usb camera instead of a raspberry pi camera?
@chihoeliew5970
@chihoeliew5970 5 років тому
Is the code you provided only suitable for pi camera? Can I use other webcam instead?
@santoshceg
@santoshceg 6 років тому
Thanks a ton, guys! This is one project I've been working on recently. Next steps could be to detect the face on the camera and match with the voice and commands of the visitor to unlock the door if authorized. If you guys plan on doing something like this, it will be of great help.
@rajatharry
@rajatharry 4 роки тому
Hello bro
@rajatharry
@rajatharry 4 роки тому
I am planning to do the Same. Can You Please contact me
@mccc4559
@mccc4559 6 років тому
YOU ARE AWESOME!!!
@andreamitchell4758
@andreamitchell4758 5 років тому
but why do this instead of using motion eye OS? are there any advantages over motion eye O? whcih is the better way to go what the pros and cons of each method and are there any better OS solution in the same vein as motion eye OS?
@kehindea
@kehindea 4 роки тому
Brilliant video
@yuvarajvelumani7760
@yuvarajvelumani7760 4 роки тому
Nice video. Will it work with RPi-B+ and night vision camera during daytime and night?
@smilelagoonOfficial
@smilelagoonOfficial 6 років тому
Hey for booting should we need Ethernet or Wi-Fi will work please reply
@riffrafftracey
@riffrafftracey Рік тому
Hi great vid how about a vid on the esp32 from start to finish thank you Ha
@lukerohl2266
@lukerohl2266 6 років тому
How would I edit the webpage for the camera server?
@michaelanastasakis7760
@michaelanastasakis7760 6 років тому
Great video
@mfr8471
@mfr8471 4 роки тому
What other kinds of Raspberries are supported / useable? How low can you go? Can you use a Raspberry 1 Mod. B as well? I have a Camera Rev 1.3. Will this be accurate enough?
@amaremahtsentu8467
@amaremahtsentu8467 5 років тому
Hi this is nice bro....I made a counting and detecting code ( ssd mobilenet model). but if i have imutils, flask,picamera[array],Flask-BasicAuth==0.2.0 all installed ,I am not expected to install requirement.txt? and one more thing can i use the mail.py script for my own detection and count result?
@CodeDynamo
@CodeDynamo 6 років тому
Awesome! Video
@ashishkumar-gr9hk
@ashishkumar-gr9hk 6 років тому
the browser takes long time to fetch the video feed, is it an internet speed problem or frame rate prob?
@bradwilliams5290
@bradwilliams5290 6 років тому
was all of the raspberry pi stuff done on the pi zero?? if so how did you plug in the keyboard and mouse?
@oldguardshouse1821
@oldguardshouse1821 5 років тому
Use a temporary usb OTG adapter
@datdoesthings9652
@datdoesthings9652 3 роки тому
Which OS should I install for my Raspberry Pi 3? Before I get into configuring the Camera when the code starts in the video. Thanks!
@cbaymac
@cbaymac 5 років тому
Nice job
@voodoochili12
@voodoochili12 6 років тому
Can multiple cameras be used on the same network? Any tutorials or resources available for that?
@danielrivera275
@danielrivera275 4 роки тому
how did you open the code? what program did you use? Can somebody help please😥
@lyssalud6781
@lyssalud6781 4 роки тому
how much light does the camera need though to produce sufficient images
@mnasriwajdi6282
@mnasriwajdi6282 2 роки тому
hey can i use node.js for the back end part
@prafullsharma4296
@prafullsharma4296 6 років тому
Hi, I followed all of your instructions and I can clearly view livestream form my pi on the server, however the openCV doesn't seem to be working (I downloaded that too) and no green rectangles are drawn around any moving objects. Is there something I missed? It throws an error: Sending mail... Error sending email:
@prafullsharma4296
@prafullsharma4296 6 років тому
kaz Kaif yeh turns out I had 2 factor authentication on my email so I made another one specifically for this project. Cheers!
@saikumarreddy9182
@saikumarreddy9182 4 роки тому
@@prafullsharma4296 Will you pls tell me what user name and password I should enter after running falsk server on browser?? Pls do reply yarr
@Rahulus_
@Rahulus_ 4 роки тому
can this be done on the raspberry pi b+ 1st gen
@mr-nonsense
@mr-nonsense 5 років тому
That's a great "precision" ruler
@its_lexy_here712
@its_lexy_here712 6 років тому
Will the coding for the raspberry pi zero be the same for raspberry pi 3??
@Darkwell0071
@Darkwell0071 4 роки тому
May I suggest a parts list with prices. Source if available.
@syafiqazainal1691
@syafiqazainal1691 2 роки тому
hi can you help pls me why mine has sign in and it said your connection to this site is not private? i m using raspberry pi 4b
@snidelywhiplash
@snidelywhiplash 6 років тому
Tool suggestion: For drilling the recess for the lens, a Forstner bit would be useful. They're capable of drilling flat-bottomed holes.
@bobliao1665
@bobliao1665 6 років тому
Hi,can i reforward this video for another site without commercial purpose?
@aldifachrurrozi4822
@aldifachrurrozi4822 4 роки тому
what sensors do you use?
@engineeringtechniques6179
@engineeringtechniques6179 6 років тому
3d printing camera housing would be a great idea.
@areebansari583
@areebansari583 5 років тому
Hey, can you help making an app that can stream the video ? any hint would help
@baronlemewproductions2787
@baronlemewproductions2787 6 років тому
pretty dam cool
@TheDragonAzz
@TheDragonAzz 4 роки тому
With 4 out, can I run an os and then sight hound?
@d.sundeep6304
@d.sundeep6304 5 років тому
Please tell how to view that source footage not only in local machine but also in remote machine or in any mobile app
@MorneBooysen
@MorneBooysen 6 років тому
This is awesome, would like to see PC and Android tablet version of AI setup
@somnath7mukherjee
@somnath7mukherjee 6 років тому
hi, I am not able to get execute first function in main.py...tht is get_object...its throwing an error
@mariancostinzamfir9357
@mariancostinzamfir9357 2 роки тому
Smart guys !
@jakeb8
@jakeb8 5 років тому
How do you make this more secure network wise and do you know the code to arm and disarm this so that way I am not getting an alert every time someone passes by it when I am at home???
@ChristophPuetz
@ChristophPuetz 6 років тому
Can you run this on solar + powerbank the way it is?
@TheAnthonywildman
@TheAnthonywildman 6 років тому
Christoph Puetz Yes, as long as it can supply 2 Amps you're good.
@juniorharvell
@juniorharvell 6 років тому
I have no working knowledge of the raspberry pi 3 only some PC I want to add a cam to the machine being played so i can see whos playing it along with....... I have 2 (5-12 volt) meters or counters, one goes up for each dollar that's put in the machine and the other goes up as each dollar is taken out of the machine. I'm looking for a way to record the 2 inputs to a database that I can access over the internet using the raspberry pi 3 I also need to know where to get the Ras PI 3 Thank you
@gemix3858
@gemix3858 3 роки тому
Awesome
@hxdx6950
@hxdx6950 3 роки тому
What all componets and how much would it cost! Haven't watched the video yet please reply
@kf8876
@kf8876 5 років тому
Does this work with the new version of rasberian
@vinkand6393
@vinkand6393 5 років тому
Thank you guys I works for me but how to access cam for a different network from anywhere. Pls help me...
@halilcnar6029
@halilcnar6029 4 роки тому
Hello, You should edit your routers routing table. An example below Public IP x.y.z.t internal IP a.b.c.d You should route your public ip's some port to internal ip's some port x.y.z.t:9999 -> a.b.c.d:8888 then on a public WiFi, if you write your xyzt:9999 to the browser's address bar, you will see your camera. But it is not secure. Anyone that knows your routing table(camera port?) and public IP(may be static or dynamic ip) can see your house:)
@g.vsrinivasreddy3198
@g.vsrinivasreddy3198 5 років тому
can we do it in rasp 3 i mean is it same process or not
@aniruddhamulay2932
@aniruddhamulay2932 5 років тому
Loved the tutorial. Can anybody please tell me how can I add a SMS functionality to send a message when it detects a object. Thank You
@Sthasn
@Sthasn 5 років тому
aniruddha mulay short fix is to configure the destination email address to be forwarded to your cellular provider it’ll look something like xxxxxxxxxx@tmobile.com that’s not the exact formatting but you get the idea
@Jlitechy
@Jlitechy 6 років тому
hello, how can i connect it a servo motor to be able to open door for the right person?
@travis8753
@travis8753 6 років тому
Or you could just buy a piece of PVC pipe, two end caps mount it in that and have a waterproof security camera.
@SllyRbbtTrxR4Kids
@SllyRbbtTrxR4Kids 6 років тому
Travis lol, true, but to each their own. But i like your style better.
@hellrazor35
@hellrazor35 6 років тому
Personally I'd just get a plastic project box and drill a hole for the wires / camera. It would be flat and alot more water proof than MDF. This could be done alot easier.
@Skyefuego
@Skyefuego 6 років тому
that would look sleek. will definitely look better.
@KapnKerfuffle
@KapnKerfuffle 6 років тому
Or by a hollow plastic skull or gargoyle or statue of a poster of Big Brother with a plastic electrical gang box behind the eyes.
@axsdeny6692
@axsdeny6692 6 років тому
Wouldn't there be the potential for excess humidity to condense on the inside of the pipe thereby endangering the electronics? The MDF is more porous and wouldn't do this as much. Of course, if left outside, the MDF will fall apart eventually because it's garbage.
I Spy, with my Little Pi...
23:46
Jeff Geerling
Переглядів 253 тис.
Сакура із свічки
00:35
Afinka
Переглядів 153 тис.
Vasiliy Lomachenko vs George Kambosos | INTERNATIONAL LIVE STREAM
3:10:05
Top Rank Boxing
Переглядів 1,1 млн
Making the most EQUIPPED DIY Security Camera with ESP32-CAM
26:36
Max Imagination
Переглядів 325 тис.
Control ANY COMPUTER with these Pi KVMs!
17:46
Jeff Geerling
Переглядів 792 тис.
Raspberry Pi Zero is a PRO HQ webcam for less than $100!
11:59
Jeff Geerling
Переглядів 255 тис.
3 HACKING gadgets you have to TRY!!
19:34
NetworkChuck
Переглядів 1,4 млн
How to Make Your Own Affordable HomeKit Security Camera
10:07
AppleInsider
Переглядів 298 тис.
3D Prints Outside for 7 years: What happened? RMRRF2024
29:36
CNC Kitchen
Переглядів 105 тис.
Where People Go When They Want to Hack You
34:40
CyberNews
Переглядів 63 тис.
How much charging is in your phone right now? 📱➡️ 🔋VS 🪫
0:11
Купите ЭТОТ БЮДЖЕТНИК вместо флагманов от Samsung, Xiaomi и Apple!
13:03
Thebox - о технике и гаджетах
Переглядів 33 тис.
Samsung UE40D5520RU перезагружается, замена nand памяти
0:46
Слава 100пудово!
Переглядів 3,8 млн