A running camera feed that only saves videos when you press a button. How many times has someone done something funny and you said "I wish I got that on camera!" Maybe you did :)
As of 10/2020 with Raspberry Pi OS, this project is in the "Alpha" phase of development. The current version is stable, but major feature, install, etc changes may happen at any time. Please be patient with any bugs you are certain to encounter and any holes you may find in this documentation.
curl -L https://github.com/oudeismetis/missed-moment/raw/master/install.sh | sh
- Raspberry Pi
- Raspberry Pi camera module
- SD card (minimum 8GB for OS. We recommend 16GB+ for storing video captures)
- Newer version of Raspberry Pi OS (Will run on an older OS like Raspbian, but may have issues like Python 3.5+ not installed, camera drivers not pre-installed, etc.)
- Network access to the Pi (Newer models have WiFi/ethernet on the board)
- Internet is ONLY needed for initial install
- Recommend a case that has a camera mount and wall mount (Vilros has a good case with both)
- Tactile button that can plug into two pins on the Pi board to get input (By default, missed-moment uses GPIO 26/Pin 37 and the Ground on Pin 39 to attach the button GPIO Reference)
- here's an example of one to buy (or you can make your own)
- USB microphone
- Install the OS on the Pi using method of choice. e.g. Raspberry Pi Imager
- Boot into the Raspberry Pi
Update Software
when prompted andRestart
- Make sure you've enabled the camera module in the settings
- Menu >
Preferences
>Interfaces
> EnableCamera
- Menu >
- Then...
curl -L https://github.com/oudeismetis/missed-moment/raw/master/install.sh | sh
- Reboot to ensure all installed dependencies work as expected
- missed-moment is ready for use, push the button to save a moment!
- Wait a moment after startup, then press the button to have it save off the last ~minute of video and audio
- Wait a moment after capture, then plug in a USB flash drive, wait for the LEDs to stop flashing, and unplug. Any recordings are now on that USB.
- apt-pinning?
- configuration file for: file deletion, video/audio time up to X seconds
- run headless instructions (would need to install pip to a minimum)
- figure out filetype issues, converting, etc.
- Video playback speed?
- Video/audio tuning?
- increase quality? Contrast? etc.
- USB with NTFS file system support
Details on getting setup via git and contributing back can be found Here
- missed-moment is a "Security First" IoT project. As such, internet access is not required for those paranoid about a constant running camera in their home. Videos can be retrieved via SSH/SCP or USB dead drop with simple configuration.
- Internet is ONLY needed for initial install
- Extra features like Dropbox and Slack are unoffically supported and require a
.env
file in the root of your project that define key(s):
-
Uncomment out the line in
requirements.txt
that installs the dropbox python SDK. -
Add the following to the
.env
fileDROPBOX_API_KEY=[Get a folder-specific APP key connected to your Dropbox account]
-
If you want slack notifications, log into Slack and create a bot user
-
Uncomment out the line in
requirements.txt
that installs the slack python SDK. -
Add the following to you
.env
SLACK_API_TOKEN=[Not supported yet. Work in progress. PR's welcome.]
- missed-moment should be running with the default "pi" user
- missed-moment-usb currently only supports USB with FAT file system
-
Installation
- While ssh'd onto the raspberry pi - logs should print to the screen
-
Production Installation
- While ssh'd onto the raspberry pi, to view missed-moment/missed-moment-usb status and logs (if you want to tail the logs add "-f" option right after journalctl and before -u option)
sudo systemctl status missed-moment sudo systemctl status missed-moment-usb journalctl -u missed-moment journalctl -u missed-moment-usb
- While ssh'd onto the raspberry pi, to view crontab logs
tail -f /home/pi/missed-moment-delete-files.log
- The main application is called
missed-moment
- The USB dead drop application is called
missed-moment-usb
- run
ps -ef | grep python
to look for both processes running - run
top
and look for python process(es) - Note that the
missed-moment-usb
process is an optional process that only does work when it detects that a USB memory stick has been connected - Files not downloaded within 7 days are deleted (checks at midnight daily)