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

0a20bee · Sep 10, 2024
Apr 30, 2022
Apr 15, 2024
Jan 19, 2024
Apr 27, 2023
Feb 14, 2024
Apr 15, 2024
Apr 22, 2022
Apr 22, 2024
Mar 9, 2020
Oct 10, 2022
Feb 14, 2024
Jun 30, 2023
Apr 4, 2022
Jun 13, 2022
Jul 27, 2022
Oct 6, 2022
Jul 17, 2019
Jan 5, 2023
Oct 31, 2022
Sep 10, 2024
Jun 24, 2023
Mar 26, 2024
Oct 6, 2022
Jul 17, 2019
Oct 6, 2022
Sep 10, 2024
Sep 10, 2024
Jul 10, 2019
May 20, 2016
Oct 6, 2022
Oct 6, 2022

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