Jul 2, 2016 05:09 PM
(This post was last modified: Jul 3, 2016 03:12 PM by slober.)
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 🤝)
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?
- Raspberry-pi b+ (or better)
- Supported webcam (PSeye from a playstation3)
- Internet cable or wifi dongle
- All the basic stuff required for the pi (sd card, rasbian os, power adapter,...)
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 on
logfile /tmp/motion.log
width 640
height 480
framerate 27
threshold 1750
post_capture 5
stream_maxrate 20
stream_localhost off
webcontrol_localhost offTry 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/
https://www.raspberrypi.org/documentation/installation/installing-images/README.md
https://rbnrpi.wordpress.com/project-list/setting-up-wireless-motion-detect-cam/
http://www.instructables.com/id/Raspberry-Pi-as-low-cost-HD-surveillance-camera/step7/Installing-the-motion-detection-software/
https://www.raspberrypi.org/forums/viewtopic.php?t=18314
https://www.raspberrypi.org/blog/turn-your-pi-into-a-low-cost-hd-surveillance-cam/
http://raspberrypi.stackexchange.com/questions/41342/how-to-start-motion-in-daemon-mode-on-rpi-running-raspbian-jessie
https://www.raspberrypi.org/forums/viewtopic.php?t=36009&p=302814
https://pimylifeup.com/raspberry-pi-webcam-server/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 xD
http://pastebin.com/cU7X1GXaYou 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_detect
on_movie_end
on_movie_start
on_area_detected
on_picture_save
.....As 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!
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ
Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan



![[Image: wOdD4yf.gif]](https://i.imgur.com/wOdD4yf.gif)
