- Notifications
You must be signed in to change notification settings - Fork33
A Pi Zero and Motion based webcamera that forwards images to Amazon Web Services for Image Processing
License
markwest1972/smart-security-camera
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project elevates aPi Zero simple webcamera with Motion Detection into a smart security camera by adding Cloud based image analysis viaAWS Rekognition.
You can read more about this solution in the following blog posts:
- Smarten up Your Pi Zero Web Camera with Image Analysis and Amazon Web Services Part 1.
- Smarten up Your Pi Zero Web Camera with Image Analysis and Amazon Web Services Part 2.
You can also check outthis presentation from JavaZone 2017 where I describe the solution. Theslides from this talk are also available.
BothJava andNode.js versions of the AWS Lambda Functions are provided. Due to naming differences I have also provided seperate Step Function definitions for both the Java and Node.js versions.
Heres anotherblogpost that describes the differences between the two versions.
- s3-upload: Handles upload of image files from Pi Zero to Amazon s3.
- motion-config: Configuration files for Motion (running on a Pi Zero).
- aws-lambda-functions: Choose between Node.js or Java source code for all AWS lambda functions.
- aws-step-functions: JSON definitions for orchestration of AWS Lambda Functions.
Note that this repository is provided as a record of my Smart Camera Project, which was originally created in December 2016 and further developed through to early 2018. It is a record for those interested and is not actively supported.
All the code is provided as is, and it is left to the user to work out the fine details for themselves. The AWS documentation is very useful here. Remember thatGIYF.
Each subdirectory in this repository has simple instructions. Note that there are naming dependencies in this project, so make sure that any naming changes are applied across the repository.
The following prerequisites are required for working with this repository.
- AWS Credentials.
- You'll also need to be using a AWS Region that supports Rekognition, Step Functions, Lambda, s3 and SES (for example 'eu-west-1').
- You'll need as3 bucket where your images can be uploaded for processing.
- The bucket will need two root directories : "/upload" and "/archive".
- Directly under the "/archive" directory, create the "/alerts" and "/falsepositives" subdirectories.
- In the "Permissions->Bucket Policy" tab for your S3 Bucket, set up the following Bucket Policy:
{"Version":"2012-10-17","Statement": [ {"Effect":"Allow","Principal": {"AWS":"*" },"Action": ["s3:Get*","s3:List*" ],"Resource": ["arn:aws:s3:::your-bucket-name","arn:aws:s3:::your-bucket-name/*" ] } ]}
To make your S3 even more secure you can swop "*" with the fullARN for theIAM role associated with yournodemailer-send-notification orses-send-notification Lambda Function.
- Set up your PiZero webcamera with Motion.
- Create an AWS account.
- Create an S3 Bucket.
- Implements3-upload from PiZero to S3 Bucket.
- Implement all youraws-lambda-functions and test them individually.
- Implement youraws-step-function. Test it.
- Set up the S3 Trigger (Java orNode.js) that triggers the Step Function.
About
A Pi Zero and Motion based webcamera that forwards images to Amazon Web Services for Image Processing
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.