Watchdog2 is a solution to easily browse snapshots taken by surveillance cameras and stored on an email server.
Firstly you need to configure the Network Video Recorder station to send notification mails. For the exemple we will used Synology Surveillance Station.
3.1 Subject:
%CAMERA%-%DATE%-%TIME% Motion detected
3.2 Content:
CAMERA: %CAMERA%
DATE: %DATE%
TIME: %TIME%
You need a login + password. On Gmail create an App password
- Get Watchdog2:
git clone https://github.com/swayvil/watchdog2.git
- Create a folder to store the snapshots images:
mkdir /Users/xxx/watchdog2-store
- Edit .env:
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
MAIL_CRAWLER_STORE=/Users/xxx/watchdog2-store
- Declare the camera names by updating the values to insert in the camera table. Edit initdb.sh:
INSERT INTO camera (camera) VALUES ('Cour');
INSERT INTO camera (camera) VALUES ('Garage');
INSERT INTO camera (camera) VALUES ('Entree');
- Edit mail-crawler/config.json:
- Set imap server connectivity information
- Importing mail start date
- Update mail object and body parsing patterns if you set a different notification content than the example
- Build Docker images and start the containers:
cd watchdog2
docker-compose -f docker-compose.yml create
docker-compose -f docker-compose.yml start
- Browse the snapshots: http://localhost:8181
This article presents how to build your own secure video surveillance system with your Synology NAS.
cd watchdog2
npm install
npm run serve