Sentry is a NodeJS security system. It is divided into separate 3 module:
- Camera: Connects a webcam to the server
- Client: The frontend interface for Sentry
- Server: All clients and cameras connect to the server
The default configs will let you run all three modules on a single machine and play with it.
- NodeJS
- OpenCV dependencies
- Typescript and
ts-node
pm2
if you would like it to autostart on start upnpm install
- Copy
src/config.default.ts
tosrc/config.ts
If you are installing the camera part on a Raspberry Pi:
wget https://nodejs.org/dist/v14.16.0/node-v14.16.0-linux-armv7l.tar.gz
tar -xzf node-v14.16.0-linux-armv7l.tar.gz
sudo cp -r node-v14.16.0-linux-armv7l/* /usr/local/
sudo npm install -g typescript ts-node nodemon pm2
You'll need to install the dependencies for OpenCV:
sudo apt install cmake build-essential unzip pkg-config libjpeg-dev libpng-dev libtiff-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libgtk-3-dev libcanberra-gtk* libatlas-base-dev gfortran libasound2-dev
If you are using a Raspberry Pi camera: sudo modprobe bcm2835-v4l2
Or add bcm2835-v4l2
to /etc/modules
You'll also have to add yourself to the video
group (if you want run this as non-root):
sudo usermod -a -G video $USER
reboot
npm install
- Copy
src/config.default.ts
tosrc/config.ts
npm install
npm start
in each module:
cd camera && npm start
cd server && npm start
cd clinet && npm start