For this article we will assume your Shinobi installation is found in the default directory, /home/Shinobi .
FTP stands for File Transfer Protocol and it is a way of transferring files between computers.
Many IP cameras come with a built-in Motion Detector and FTP client. When motion is detected the camera can upload a snapshot or short clip to your specified FTP server.
Shinobi can now create an FTP server for this purpose. When Shinobi receives a new file it will see it as a reason to trigger an event, just like how it would trigger if Shinobi's built-in motion detector had caught motion.
When a JPEG file is placed into the directory it will treat it as a snapshot and copy it to the streams directory to be used for notifications and as the most recent view-able image through the /jpeg/ API method .
Placing any other type of file will simply invoke a trigger, just without a snapshot being provisioned.
1. Add the following options to your conf.json .
"dropInEventServer":true,
"ftpServer":true,
Run these commands to do so.
cd /home/Shinobi
node tools/modifyConfiguration.js addToConfig='{"dropInEventServer":true, "ftpServer":true}'
2. Now restart Shinobi
pm2 restart camera
Option | Description | Example Value |
---|---|---|
dropInEventServer | Enabled a directory watcher to trigger events. When a file is added to the specified folder. Default is null . | true |
dropInEventsDir | Specified directory for file drop-ins that trigger events. Default is a folder labelled dropInEvents inside the streamsDir . | /dev/shm/stream/dropInEvents |
dropInEventDeleteFileAfterTrigger | The file dropped in to create the trigger will be deleted after 5 minutes. Default is true . | false |
ftpServer | Toggle for the FTP server. Default is false . | true |
ftpServerPort | Specify a specific port for the FTP server to run on. Default is 21 . | 1337 |
ftpServerUrl | With this you can specify a more secure connection method or bind to a specific IP available on the machine. The default binds to all IPv4 Addresses, IPv6 is not available at this time. Default is ftp://0.0.0.0:{{PORT}} . | ftps://0.0.0.0:{{PORT}} |
1. Open the Monitor Settings and switch to Advanced view to reveal the Global Detector Settings .
2. Within the Global Detector Settings set the following fields.
3. For Recording when a file is dropped in set the following options.
For this tutorial we will use a Reolink C1 Pro
1. Open the Device Settings by clicking the gear icon in the top right.
2. Click Network then Advanced on the left and finally FTP at the top.
3. Set the following fields to setup the Shinobi Event Trigger.
4. Press Test and it will trigger an event in Shinobi.
5. Save the changes.