Shinobi/plugins/motion
Moe c940294f00 Shinobi Pro Lands on Gitlab 2018-06-09 16:34:06 -07:00
..
libs Shinobi Pro Lands on Gitlab 2018-06-09 16:34:06 -07:00
.gitignore Shinobi Pro Lands on Gitlab 2018-06-09 16:34:06 -07:00
INSTALL.sh Shinobi Pro Lands on Gitlab 2018-06-09 16:34:06 -07:00
README.md Shinobi Pro Lands on Gitlab 2018-06-09 16:34:06 -07:00
conf.sample.json Shinobi Pro Lands on Gitlab 2018-06-09 16:34:06 -07:00
shinobi-motion-pixel.js Shinobi Pro Lands on Gitlab 2018-06-09 16:34:06 -07:00
shinobi-motion.js Shinobi Pro Lands on Gitlab 2018-06-09 16:34:06 -07:00

README.md

Shinobi Motion Detector

Install required libraries.

Ubuntu and Debian only

sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++

CentOS only

su -c 'yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel giflib-devel'
yum search arial
yum install liberation-sans-fonts.noarch

Install the Node.js Canvas engine

sudo npm install canvas

Go to the Shinobi directory. Below is an example.

cd /home/Shinobi

Copy the config file.

cp plugins/motion/conf.sample.json plugins/motion/conf.json

Edit it the new file. Host should be localhost and port should match the listening port for camera.js.

nano plugins/motion/conf.json

Start the plugin.

node plugins/motion/shinobi-motion.js

Or to daemonize with PM2.

pm2 start plugins/motion/shinobi-motion.js

Doing this will reveal options in the monitor configuration. Shinobi does not need to be restarted when a plugin is initiated or stopped.