Skip to content

simple code base using the pi camera & node.js for motion camera capture

Notifications You must be signed in to change notification settings

joseph-jja/pi-camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-camera

This is some simple code and some of scripts for making a motion detection camera capture system using the raspberry pi, a pir sensor and a camera.

to install

  • install nodejs and forever or pm2
    • currently known to work with node 12.x or later
      • for node 12.x you must start node with --experimental-modules
  • install ffmpeg for avconv
  • clone this repo
  • create a config.json for the mail (see the other readme for config.json)
  • if you are like me, you'll want a read only filesystem to save your sd card in case of power outage or just to reduce wear, so clone my pi-ro-mount repo and that should help. You'll need unionfs-fuse

NOTE: This code was originally taken from pi_videoEMailIntruder. The email code was cleaned up and made into a module.

To switch from read only to read and write you may need to use fuser

sudo fuser -c /etc

then sudo kill -9

I have also found some services (like avahi-daemon) need to be stopped so service --status-all will show whats running

you will need to generate ssl keys to do ssl

  • openssl req -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr == pass in you info for -subj "/C=US/ST=New York/L=Brooklyn/O=Example Brooklyn Company/CN=examplebrooklyn.com"

There is also the capture server program which uses libcamera-vid and libcamera-still

  • this has dependencies on ffmpeg and gstreamer plugins
  • on raspian you need to sudo apt-get install git nodejs npm gstreamer1.0-plugins-base-apps ffmpeg
  • it save to /tmp so setting up tmpfs for /tmp can save disk writes during image capture tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=64M 0 0

About

simple code base using the pi camera & node.js for motion camera capture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published