Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TinkerTurtle/Sentry-Picam
A simple wildlife camera for Raspberry Pis.
https://github.com/TinkerTurtle/Sentry-Picam
golang-application motion-detection raspberry-pi raspberry-pi-zero-w webapp
Last synced: about 2 months ago
JSON representation
A simple wildlife camera for Raspberry Pis.
- Host: GitHub
- URL: https://github.com/TinkerTurtle/Sentry-Picam
- Owner: TinkerTurtle
- License: mit
- Created: 2020-01-19T13:29:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-17T18:13:41.000Z (over 1 year ago)
- Last Synced: 2024-08-01T00:46:09.785Z (5 months ago)
- Topics: golang-application, motion-detection, raspberry-pi, raspberry-pi-zero-w, webapp
- Language: JavaScript
- Homepage:
- Size: 32.6 MB
- Stars: 142
- Watchers: 14
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sentry-Picam
![Mosaic of a 3d printed sentry turret, bird, and screenshot of a bar graph](https://raw.githubusercontent.com/TinkerTurtle/TinkerTurtle.github.io/main/img/sentry-picam.png)
Sentry-Picam is a simple wildlife / security camera solution for the Raspberry Pi Zero W, providing 1080p/30fps motion activated H.264 video capture. The built in web interface makes it easy to review video clips and identify the busiest times of day.
Recordings will be kept as long as there's enough available space. 1 GiB of free space will be maintained by default.
Motion detection in Sentry-Picam uses vectors provided by RaspiVid's video pipeline, enabling performant and effective supression of video noise.
Thanks to [Broadway](https://github.com/mbebenita/Broadway) and [RaspiVid](https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/raspicam/RaspiVid.c), the Pi Zero W hardware can also stream live video to multiple devices with a ~300ms delay over Wifi.
## Minimum Hardware Requirements
* Raspberry Pi Zero
* Raspberry Pi Camera Module v2## Prerequisite Software
* raspivid - Required for motion vector data. Available in Raspberry Pi OS Debian version: 10 (buster).
* ffmpeg - Used for custom triggers and video conversion/thumbnails## Quick Setup
* Ensure camera is enabled in raspi-config
```
wget https://github.com/TinkerTurtle/Sentry-Picam/releases/latest/download/sentry-picam
./sentry-picam
```Navigate to http://IP_address_of_your_RPi:8080
## Tips
1. The default video settings strike a good balance between video quality and resource usage.
To View options:
```
./sentry-picam -help
```
2. For higher quality on Camera Module v2:
```
./sentry-picam -height 1088 -width 1920 -fps 30 -bitrate 4000000
```3. Use "Edit Detection Sectors" in the web UI to specify areas where motion detection should be triggered.
4. Set up auto start:
Download and edit the sentry-picam.service file.
```
sudo cp sentry-picam.service /etc/systemd/system/
sudo systemctl enable sentry-picam
sudo systemctl start sentry-picam
```5. Custom programs can be set up to trigger other functionality, like notifications or image classification. Ffmpeg is a prerequisite.
Sentry-picam runs your program after generating a thumbnail, and passes in the video/thumbnail name as an argument to your program. Your program will need to append the .mp4 file extension to access the video, or .jpg to access the thumbnail. Recordings are stored in ```./www/recordings/```
```
./sentry-picam -run example_script.sh
```6. Files discarded from the web interface may be recovered from the folder ```./www/recordings/deleteme/```. The web interface will occasionally empty this folder, starting with recordings over 7 days old.
## Compiling from Windows for a Raspberry Pi Zero
```
git clone https://github.com/TinkerTurtle/sentry-picam
cd sentry-picam# Set environment variables for the Go compiler
SET GOOS=linux
SET GOARCH=arm
SET GOARM=6go build
```## STLs for the Portal Turret
https://www.thingiverse.com/thing:8277https://www.prusaprinters.org/prints/76478-supplemental-portal-turret-components
## Enjoy!
![Cardinal swinging on a birdfeeder while eating birdfeed](https://raw.githubusercontent.com/TinkerTurtle/TinkerTurtle.github.io/main/img/cardinal.gif)