Skip to content

Releases: neilenns/node-deepstackai-trigger

Auto-restart and more logging

30 Jun 12:31
Compare
Choose a tag to compare
  • Warnings are now shown when annotateImage is true for a trigger handler but enableAnnotations wasn't set to true in the settings.json file. Resolves issue 333.
  • Log messages are printed on startup to help confirm the image folder was mounted correctly with Docker. Resolves issue 330.
  • Web server now shuts down properly when reloading settings. Resolves issue 323.
  • Startup is now re-attempted if there are any failures during launch. Each re-attempt is 30 seconds apart and five re-attempts will happen before things are assumed to just be completely broken. Resolves issue 322.

Per-trigger statistics and MQTT improvements

26 Jun 12:07
Compare
Choose a tag to compare

Breaking changes

  • statusTopic can no longer be set on the mqtt configuration in settings.json. Overall status messages are always sent to the node-deepstackai-trigger/status topic. This change aligns the status topic messages with the new MQTT messages that the system listens to for resetting statistics.

Non-breaking changes

  • Per-trigger statistics are now sent in new MQTT messages published to the node-deepstackai-trigger/statistics topic. The trigger name, triggered count and analyzed file count are included, as well as a formatted string version suitable for presentation to a user. The per-trigger statistics are also available as variables for mustache templates. Resolves issue 306.
  • Statistics can be reset by publishing specific MQTT messages to the node-deepstackai-trigger/statistics topics and sub-topics. Resolves issue 308.
  • Statistics can be read and reset via new REST APIs. Overall statistics are available at /statistics and per-trigger statistics are available at /statistics/triggerName. Statistics for all triggers can be retrieved from /statistics/all. See the API documentation for more information. Resolves issue 307 and issue 311.
  • Triggers can be activated by sending node-deepstackai-trigger/motion MQTT messages with the name of the trigger in the message. This is similar to activating a trigger via the REST API and results in the trigger attempting to download a snapshot from the snapshotUri specified in the trigger's configuration. Resolves issue 314.
  • Shutting down the system after a failed launch no longer throws an error. Resolves issue 301.
  • The underlying Linux variant used for the Docker image is now node:slim. Resolves issue 299.
  • Pushbullet is now included in the settings JSON schema. Resolves issue 316.

Pushbullet support!

23 Jun 16:01
Compare
Choose a tag to compare

Breaking changes

  • settings.json and triggers.json can no longer have unrecognized properties in them. While this is technically a breaking change it shouldn't impact anyone in practice. The addition of this requirement is to ensure new users get real-time notifications of typos/mistakes in their configuration files while editing in tools that support schema validation (such as Visual Studio Code). Resolves issue 291.

Non-breaking changes

  • Pushbullet notifications are now supported as trigger handlers. Enable it in settings.json then add pushbullet handlers to your triggers in triggers.json. See the wiki for more details. Resolves issue 119.

REST API + snapshot download, hot settings reload, and more!

21 Jun 12:31
Compare
Choose a tag to compare
  • Triggers can now be manually activated via a REST API, and can be configured to retrieve a camera snapshot from a REST API instead of watching for image files that appear in a folder. This is useful for NVR systems other than BlueIris that don't support writing a snapshot automatically when motion is detected and can only call a REST API as the motion activated action. Resolves issue 260.
  • Occasional crashes when enableAnnotations is on are fixed. Resolves issue 284.
  • Requests to end the system (e.g. via ctrl+c) are handled gracefully now. Resolves issue 280.
  • Changes to settings.json and triggers.json are automatically detected and cause a reload. No need to restart the Docker container anymore! Just save the file and the system should notice the change and reload with the new configuration. Resolves issue 278.
  • The internal web server can now be enabled independently from annotated images using the enableWebServer setting. It's off by default, and enabled automatically when enableAnnotations is on for backwards compatibility reasons. Resolves issue 265.

Consolidate settings into a single file

18 Jun 13:21
a29bd9d
Compare
Choose a tag to compare

Breaking changes

  • Settings are now kept in a single settings.json file instead of separate ones for each handler. You will need to create a settings.json file to use this release and will need to modify your Docker configuration to mount the settings file either as a secret or have it present in your /config folder. A sample is included in the sampleConfiguration folder as a base to start from. It is essentially what was in the separate files previously now just merged into one file. Additionally all environment variables except for TZ are now just settings in this file. Any other environment variables for the trigger container can be removed from your Docker configuration.
  • The source code repository's latest builds now produce out of the main branch. This means the location of the schema files has moved. If your triggers.json file has master in the $schema property you will need to update them to say main instead.

Non-breaking changes

  • All the schema file references are updated to reflect the new main branch name. Resolves issue 255.
  • The ability to disable verbose logging is back. Somehow between version 1.8.0 and now it broke. Resolves issue 257.

Add retain property for MQTT

18 Jun 01:56
Compare
Choose a tag to compare

Setting the retain property in mqtt.conf to true makes all MQTT messages get sent with the retain flag on. Default is false.

Fix incorrect log message

17 Jun 04:06
Compare
Choose a tag to compare

Logs said annotations were on when they weren't. That's fixed now.

Pushover support, detection annotations, and numerous other little improvements.

16 Jun 22:30
Compare
Choose a tag to compare
  • The length of time it takes to analyze an image is now calculated and available via the analysisDurationMs property in the default MQTT message. It is also available as a mustache template variable and shown in verbose logging messages. Resolves issue 242.
  • MQTT messages now include the trigger's name in the name property. Resolves issue 243.
  • Pushover is now supported as a trigger handler. See the wiki for how to enable it and how to configure it on a trigger. Resolves issue 232.
  • Annotated images that show the objects and confidence percentage for things that fired the triggers are now available for Telegram messages. To enable the annotated image in Telegram messages set the new annotateImage property to true on the handler configuration. The annotated images are also exposed via a web server on port 4242 using their original file name for use by external services, for example http://localhost:4242/Dog_20200523-075000.jpg. By default the images are kept for 60 minutes before being deleted. This new capability comes with a performance impact due to the additional image manipulation required and is off by default. To enable it set the ENABLE_ANNOTATIONS environment variable on the trigger Docker container to true. Resolves issue 187.
  • Resolve a warning when using Telegram triggers. Resolves issue 174.
  • Added a new CHOKIDAR_AWAITWRITEFINISH environment variable that, when true,
    resolves issues with images getting saved to a network share that's then mounted
    to Docker as the image source. As this has a performance impact it is off
    by default. Resolves issue 236.
  • An optional /node-deepstackai-trigger mount point exists for future use. Resolves
    issue 191.

Improved MQTT status messaging and webRequest URI bug fix

12 Jun 19:15
Compare
Choose a tag to compare

Breaking changes

  • MQTT online and offline status messages are now sent when the service starts or fails
    to start. This, combined with the LWT message, makes it easy to set up MQTT binary sensors in Home Assistant
    to track the status of the system and send notifications to people if the system goes down
    or isn't running. This is a breaking change if you rely on the LWT message.
    The format of the offline message sent for the LWT changed to align with the online and processing status messages. See the wiki for documentation on the status message format. Resolves issue182.
  • webRequest URIs are no longer double-encoded. Instead only the text replaced with a
    mustache template is encoded. This is a breaking change if you had previously modified your webRequest URIs to work
    around issue 176
    . If you previously worked around the bug by removing encoding from the URIs in the trigger configuration
    file you will need to put the encoding in again. Resolves issue 176.

Other changes

  • MQTT detection messages now include a friendly formatted version of the predictions,
    for example: "formattedPredictions": "dog (98%)". Resolves issue 181.
  • Failed calls to the Deepstack server no longer throw an unhandled promise rejection
    exception. Resolves issue 175.

Better startup messages and MQTT status messages

11 Jun 13:12
Compare
Choose a tag to compare
  • MQTT status messages with statistics are now sent on every received file. The total
    number of files received and the number of triggers actually fired are included in
    the message payload. Resolves issue 146.
  • Add a clear message after initialization indicating whether startup was successful.
    If it wasn't there's now a link to a troubleshooting wiki page for assistance. Resolves
    issue 167.
  • Fix typos in the source code. Resolves issue 170.
  • Fix typos in CHANGELOG.md. Resolves issue 168.