![]() |
|
[R-Pi] Make: IP Security Camera - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Whitehat • Blue Team • Defensive Security (https://hackforums.net/forumdisplay.php?fid=448) +---- Forum: IoT, Embedded Systems, Electronics, Gadgets, and DIY (https://hackforums.net/forumdisplay.php?fid=193) +---- Thread: [R-Pi] Make: IP Security Camera (/showthread.php?tid=5325597) Pages: Pages
1
2
|
Make: IP Security Camera - slober - Jul 2, 2016 A few days (2) ago they broke into our car.We don't know who did it we don't have security cameras so they will likely get away with it.
This thing gave me an idea what would happen if we had a camera and an early warning system in place? would it still happen or could we intervene in time? we would have those important evidence for the insurance company and the police. With a camera and software in place we could potentially stop them (Proud gun owner 🤝) Owkey what do we actually need?
I used a PSeye webcam from my old playstation 3 it's more then enough for this although it wouldn't provide 1080p quality (640x480 @30fps) it's still pretty decent for a security camera (if you have a better camera feel free to use it). First things first!
Get yourself a nice clean microSD card with a fresh rasbian os distro Code https://www.raspberrypi.org/downloads/raspbian/follow the installation steps here: Code https://www.raspberrypi.org/documentation/installation/installing-images/windows.mdLet's get the software!
Just get the software if you want to update the system first and do some other things feel free but this is just a security cam tutorial ✌ Code sudo apt-get install motionThis will install the motion software packet this is your security system at this point hook up the webcam if you haven't already and restart the motion service. Code sudo service motion restartThis are the basic POC steps. Let's get it to work better!
Owkey, you could take this a bit further and tune the system a bit more Let's open the motions.conf file Code sudo nano /etc/motion/motion.confYou could alter a few setting here and there. I did the following Code daemon onTry to read the file and replace edit the stuff you need appropriately Next.. To ensure the service starts when the pi starts Code sudo nano /etc/default/motionRestart the service. at this point everything should work if you have problems with crashes you should change the rights to the /var/lib/motion folder to 777 or equivalent Code sudo chmod -R 777 /var/lib/motionEverything should work now! Extra's!
I also installed Apache2 and made a virtual directory to the /var/lib/motion folder for easy access. Pictures!
Example:Spoiler (Click to View) Spoiler (Click to View) Code https://www.raspberrypi.org/downloads/raspbian/I've added a small update ✌ Phone notification:
It's pretty awesome 😅 reviewing the images on the go is much quicker then watching them all when you're back. That's why we should enable phone push notifications I'm not going to build a from scratch android application my internship was 3 months native android and I hated it xD This is the api we are going to use! Code https://instapush.im/and all that other basic steps next you should make an app you can do this in the dashboard Dashboard -> apps -> add application -> give it a name -> submit Dashboard -> apps -> click on your application -> add event -> give it a name , add all the information,.... -> submit Give the tracker a nice name and remember it you'll need it later also include the tracker inside the message {YOUR_TRACKER_NAME} Also check if your phone is in the devices list. For the code I chose this python code i found on the magic place called google Ideleted a few parts in it to make it run a bit smoother and make it work for my thing just a basic setup no fancy things... Code I can't upload the code here hackforums keeps blocking it xDYou can find your api and secret key on the basic info tab. Upload it to your pi give it execute permissions and your done now you just need to go into the config file /etc/motion/motion.conf find your event there are a few: Code on_motion_detectAs you can see you could add many things to it maybe do some ftp when the movie file has been written or simply save the pictures,... Well I'm just interested in the push notification so.. I added my script to the on_movie_end why? I don't wan't to slow down the frame rate when the cam is capturing the movements so I just call the script when everything is done and everything is saved... Code on_motion_detected python /var/lib/motion/test.pysource. Code http://videos.cctvcamerapros.com/digital-io-alarm-in-out/send-push-notifications-from-raspberry-pi.htmlIf you're having trouble setting this up please pm me everyone should have a security cam in these brutal and dark times!
* - webdev77 - Jul 2, 2016 Very nice post! I was expecting a question asking how to build this, but instead got a nice tutorial showing the process. I don't have a pi, but if anyone else does this, I'd love to see some pictures. * - Pillows - Jul 2, 2016 I've gotta say, nice job on tutorial. I was thinking of doing the same thing but my pi is currently acting as my test server and is enclosed in a weird case :p (Makes it hard to put near a window) * - TyrantKingBen - Jul 2, 2016 Nice post. I used a Raspberry Pi kit that came with a camera and WiFi adapter for a project before (albeit I didn't need either and just used the Ethernet port). It didn't come with an SD card, but nonetheless, the kit would be perfect for this project. Looking quickly on Amazon I found a bunch of kits with everything for ~$70. * - ᴴᴬᴺᴷᴷ ツ - Jul 3, 2016 Well this is a refreshing tutorial.. I've been thinking of how I could make a small security camera in my room for while I'm gone. Unfortunately, I have to yet pick up a Raspberry Pi :/ * - slober - Jul 3, 2016 (Jul 3, 2016 02:38 AM)ᴴᴬᴺᴷᴷ ツ Wrote: Well this is a refreshing tutorial.. you could also use your normal computer or vm running a debian based system Motion should run fine on it maybe even better/smoother ✌ I've also added a small update ✌ Phone notification:
Spoiler (Click to View)* - code20 - Jul 3, 2016 Very nice post keep it up man * - Mr. Robot - Jul 3, 2016 Thanks for the share man, I have a similar setup - Waiting on my rpi zero camera then will test this out. * - Ventriloquism - Jul 7, 2016 This looks like a fun project, nice share 🤝 * - Lit1 - Jul 8, 2016 awesome will be using this been trying to get my theif * - razvandc - Jul 19, 2016 Thanks a lot, i just start to do it. * - roissy - Aug 2, 2016 thank for effort, good issue (: * - datguy.dev - Aug 6, 2016 I made one using an FPV camera and a tilt/pan system. The only issue I had was when it would rain, motion would fill up the disk. Nice toot. * - Chief Mark - Aug 6, 2016 Looks very interesting, how much does this setup cost. Sorry for being lazy :D * - Stirate - Aug 7, 2016 Awesome that you made a tutorial rather than asking for help, as I expected. |