ECE434 Project - Intruder Cam

Team members: Abel Keeley

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
Give step by step instructions on how to install your project.


 * Include your github path as a link like this to the read-only git site: https://github.com/MarkAYoder/gitLearn.
 * Be sure your README.md is includes an up-to-date and clear description of your project so that someone who comes across you git repository can quickly learn what you did and how they can reproduce it.
 * Include a Makefile for your code if using C.
 * Include any additional packages installed via apt. Include install.sh and setup.sh files.
 * Include kernel mods.
 * If there is extra hardware needed, include links to where it can be obtained.

User Instructions
Once everything is installed, how do you use the program? Give details here, so if you have a long user manual, link to it here.

Consider making it autostart for full credit.

Highlights
Here is where you brag about what your project can do.

Include a YouTube demo the audio description.

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 is 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.