ECE434 Project - Intruder Cam
Embedded Linux Class by Mark A. Yoder
Team members: Abel Keeley
Contents
Grading Template
I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!
Add Extras 09 Executive Summary 09 Packaging 09 Installation Instructions 09 User Instructions 09 Highlights 09 Theory of Operation 09 Work Breakdown 09 Future Work/Conclusions 09 Hackster.io 09 Demo/Poster 00 Not Late Score: 90/100
Executive Summary
The idea behind this project is to build a DIY intruder cam, with various connected features. The system should be capable of remotely alerting the owner.
Currently, motion detection is working (using motion) and can fire off arbitrary scripts. I've integrated with IFTTT to send mobile notifications when a motion event starts. Captured footage can be reviewed (and, if desired, saved) via a webserver interface. More work could be done in polishing the UI, and integrating more ways to notify the owner of motion events.
Packaging
For this project I used a BeagleBone Black (a small single board computer) to host the webserver and interface with a USB webcam (I used a Logitech C270, but just about any webcam should work).
Installation Instructions
See [1]
User Instructions
First-time setup is a bit involved (see the GitHub repo linked above) but after it is done, the project should be running on bootup.
Highlights
Theory of Operation
This project consists of three main components - motion detection, user notification, and user interface. The motion detection part of this project, as mentioned previously, uses the motion package to detect, store, and respond to motion events from a webcam. Captured footage is stored temporarily and served on an Nginx webserver. The response to motion event consists of launching a python script and passing it details about the triggering event. The python script then fetches a link to a remote ngrok tunnel(which allows for remote access without requiring port forwarding) and modifies the link to point to the webserver folder containing the corresponding footage, logs debug info to a google sheet, and then finally triggers an IFTTT notification with that link. Upon receiving the notification, a user can then follow the link, log into the webserver and review the captured footage. The user can then use a basic UI to navigate, save, or delete footage. Saving and deletion are implemented via a shell script.
Work Breakdown
- Configure Motion to recognize webcam, detect motion, and launch an arbitrary script - Abel
- Write a script to trigger an IFTTT notification - Abel
- Setup basic Nginx webserver - Abel
- Configure ngrok tunnel to the webserver, set it up a service that launches on startup - Abel
- Modify script to get ngrok link, modify to point to correct folder on server, and integrate link in IFTTT notification - Abel
- Modify Nginx setup to enable PHP - Abel
- Move to PHP-based directory indexer to allow better navigation and dynamic webpages, add support to recognize button presses - Abel
- Connect button presses to shell script for saving/deleting footage - Abel
- Prettify the HTML for the webpage - Abel
Future Work
- Better UI, with additional functionality (maybe allow user to remotely email footage/exfiltrate data)
- Integrate additional ways to notify the user beyond just IFTTT
Conclusions
All in all, this was a fun project for learning about developing embedded systems using Linux. I am by no means an expert at Nginx webservers or PHP - so use this at your own risk! I adopt no responsibility and provide no warranty for any associated software. With that said, I think this is a fun project to tinker with and I would encourage anyone else thinking about using it to: A. have fun and B. adapt, modify, delete, and rewrite it as they see fit.
Embedded Linux Class by Mark A. Yoder