1
0
Fork 0
mirror of https://gitlab.com/Shinobi-Systems/ShinobiCE.git synced 2025-03-09 15:40:15 +00:00
ShinobiCE/plugins/motion
2018-06-07 23:21:38 -07:00
..
libs Shinobi CE officially lands on Gitlab 2018-06-07 23:21:38 -07:00
.gitignore Shinobi CE officially lands on Gitlab 2018-06-07 23:21:38 -07:00
conf.sample.json Shinobi CE officially lands on Gitlab 2018-06-07 23:21:38 -07:00
INSTALL.sh Shinobi CE officially lands on Gitlab 2018-06-07 23:21:38 -07:00
README.md Shinobi CE officially lands on Gitlab 2018-06-07 23:21:38 -07:00
shinobi-motion-pixel.js Shinobi CE officially lands on Gitlab 2018-06-07 23:21:38 -07:00
shinobi-motion.js Shinobi CE officially lands on Gitlab 2018-06-07 23:21:38 -07:00

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.