Skip to content
Neil Enns edited this page May 30, 2020 · 25 revisions

This system uses Docker containers to run DeepStack AI and process images from a watch folder, then fires a set of registered triggers to make web request calls, send MQTT events, and send Telegram messages when specified objects are detected in the images.

This project was heavily inspired by GentlePumpkin's post on ipcamtalk.com that triggers BlueIris video survelliance using DeepStack as the motion sensing system.

Quick start

The following five steps are all that's required to start using AI to analyze images and then call a web URL, such as one that triggers a BlueIris camera to record.

  1. Install Docker
  2. Copy the docker-compose.yml and triggers.json files from the [sampleConfiguration](https://github.com/danecreekphotography/node-deepstackai-trigger/tree/master/sampleConfiguration) directory locally.
  3. Edit the docker-compose.yml file to modify the mount point for source images and set the timezone
  4. Edit triggers.json to define the triggers you want to use.
  5. Run docker-compose up to start the system running

Setting the timezone via the TZ environment variable in docker-compose.yml is important for every thing to work smoothly. By default Docker containers are in UTC and that messes up logic to skip existing images on restart. A list of valid timezones is available on Wikipedia. Use any value from the TZ database name column.

Editing the .json files in Visual Studio Code or some other editor that understands JSON Schemas is recommended: you'll get full auto-complete and documentation as you type.

To enable MQTT and telegram:

  1. Copy mqtt.json and telegram.json from the [sampleConfiguration](https://github.com/danecreekphotography/node-deepstackai-trigger/tree/master/sampleConfiguration) directory locally.
  2. Edit mqtt.json to specify the connection information for your MQTT server (if using MQTT).
  3. Edit telegram.json to specify the connection information for your Telegram bot server (if using Telegram).
  4. Edit triggers.json to add mqtt and Telegram handlers.
  5. Stop the existing running containers
  6. Run docker-compse up to start the system with the new configuration

Having trouble? Check the logs output from Docker for any errors the system may throw. The troubleshooting page has tips for resolving common deployment problems.

Building this yourself

Interested in building this locally? Check out the contributing guide for quick steps on how to clone and run in under five minutes.

Clone this wiki locally