Difference between revisions of "ECE434 Project - Intruder Cam"

From eLinux.org
Jump to: navigation, search
(Replaced placeholder text.)
 
m
 
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:ECE497 |PI]]
 
 
[[Category:ECE434Spring2022 |PI]]
 
[[Category:ECE434Spring2022 |PI]]
 
{{YoderHead}}
 
{{YoderHead}}
Line 29: Line 28:
 
== Executive Summary ==
 
== Executive Summary ==
  
[[File:Https://elinux.org/File:20230127005505-00.jpg|thumb]]
+
[[File:20230127005505-00.jpg|720px|frameless]]
  
 
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.
 
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 [https://motion-project.github.io/ motion]) and can fire off arbitrary scripts. I've integrated with [https://ifttt.com/ IFTTT] to send mobile notifications when a motion event starts.
+
Currently, motion detection is working (using [https://motion-project.github.io/ motion]) and can fire off arbitrary scripts. I've integrated with [https://ifttt.com/ 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.
 
 
What still needs to be accomplished:
 
* Way for the owner to see pictures/video captured from the motion events
 
* More options for notifying the owner
 
  
 
== Packaging ==
 
== Packaging ==
If you have hardware, consider [http://cpprojects.blogspot.com/2013/07/small-build-big-execuition.html Small Build, Big Execuition] for ideas on the final packaging.
+
For this project I used a [https://beagleboard.org/black BeagleBone Black] (a small single board computer) to host the webserver and interface with a USB webcam (I used a [https://www.amazon.com/dp/B004FHO5Y6 Logitech C270], but just about any webcam should work).
  
 
== Installation Instructions ==
 
== Installation Instructions ==
  
Give step by step instructions on how to install your project. 
+
See [https://github.com/rhit-keeleya/ECE434-Workspace/tree/master/project]
 
 
* Include your [https://github.com/ github] path as a link like this to the read-only git site:  [https://github.com/MarkAYoder/gitLearn 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 ==
 
== 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.
+
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.
 
 
Consider making it autostart for full credit.
 
  
 
== Highlights ==
 
== Highlights ==
  
Here is where you brag about what your project can do.
+
[https://youtu.be/aHx7p18pMzQ Video demo].
  
Include a [http://www.youtube.com/ YouTube] demo the audio description.
+
[https://www.hackster.io/rhit-keeleya/intruder-cam-a5985e Hackster.io project page].
  
 
== Theory of Operation ==
 
== Theory of Operation ==
  
Give a high level overview of the structure of your softwareAre you using GStreamer?  Show a diagram of the pipeline. Are you running multiple tasks?  Show what they do and how they interact.
+
[[File:Project_Theory_of_Operation.png|720px|frameless]]
 +
 
 +
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 eventThe python script then fetches a link to a remote [https://dashboard.ngrok.com/get-started/setup 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 ==
 
== Work Breakdown ==
  
List the major tasks in your project and who did what.
+
* Configure Motion to recognize webcam, detect motion, and launch an arbitrary script - Abel
 
+
* Write a script to trigger an IFTTT notification - Abel
Also list here what doesn't work yet and when you think it will be finished and who is finishing it.
+
* 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 ==
 
== Future Work ==
  
Suggest addition things that could be done with this project.
+
* 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 ==
 
== Conclusions ==
  
Give some concluding thoughts about the project. Suggest some future additions that could make it even more interesting.
+
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.
  
 
{{YoderFoot}}
 
{{YoderFoot}}

Latest revision as of 14:17, 27 November 2023

thumb‎ Embedded Linux Class by Mark A. Yoder


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

20230127005505-00.jpg

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

Video demo.

Hackster.io project page.

Theory of Operation

Project Theory of Operation.png

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.




thumb‎ Embedded Linux Class by Mark A. Yoder