Actions are things you want Agent to do when something happens, like when an alert is generated by a camera or a device disconnects. To get to the Actions settings, edit a device and select Actions in the menu.

Click Add to add a new action and you will see a screen like:

There are a lot of events you can use to trigger actions. You can add multiple actions to each event and use various tags within those actions to generate dynamic events. Available tags are listed under "Action Configuration". The tags are:

  • {ID}: The object ID. When you edit a camera or microphone in Agent this is displayed at top left of the editor.
  • {OT}: The object type ID. 1 = Microphone, 2 = Camera
  • {FILENAME}: The filename. This applies to events like Recording Started, Recording Finished and Snapshot Taken. It's the full local path to the file.
  • {MSG}: The event name that triggered the action, for example "Manual Alert"
  • {NAME}: The name of the device (on the General tab)
  • {GROUPS}: The groups the device belongs to (on the General tab)
  • {LOCATION}: The location the camera is in (on the General tab)
  • {AI}: Comma separated list of detected objects from DeepStack, plates from LPR or detected faces from Facial Recognition
  • {AIJSON}: JSON data returned from DeepStack or LPR
  • {BASE64IMAGE}: Live image data URL for example: "data:image/jpeg;base64,..." (available v4.3.6.0+)

Some of these tags are only available under certain conditions. For example, {FILENAME} isn't available for the Alert Event and {AI} isn't available if DeepStack isn't being used.

Available Events

The list of events you can attach actions to is:

  • Alert
  • Alert Finished
  • DeepStack Object Found (see api)
  • DeepStack Object Not Found
  • Face Recognized (see api)
  • Face Unknown (face found but not in deepstack/ senseai database)
  • License Plate Recognized (see api)
  • License Plate Not Recognized
  • License Plate Not Detected
  • Manual Alert
  • Motion Detected
  • Motion Finished
  • None - use this if you want to trigger actions with "Alert Action Run" command on the schedule
  • ONVIF Logical State ON - use this to for example start and stop recording based on ONVIF logical state updates (requires the motion detector type to be set to ONVIF)
  • ONVIF Logical State OFF
  • Photo Taken
  • Reconnect Failed
  • Recording Finished
  • Recording Started
  • Source Disconnected
  • Source Reconnected
  • Switch Object Off
  • Switch Object On
  • System: UI Connected - when someone opens a browser to view your system)
  • System: UI Disconnected - when the session is closed (happens roughly a minute after the browser disconnects)

New (in v3.5.5.0+) - you can now add your own Task buttons to trigger actions.

New (in v3.6.3.0+) - you can now add your own Events to this list via Plugins

Available Actions

The list of available actions you can perform is:

  • Beep - plays beep through local PC speaker
  • Call URL - call any URL with an optional Auth token
  • Execute File
    Also see commands
    To add your own commands/ scripts you can add .bat or .sh files into the Commands directory. You can then pass parameters into the batch file. For example, to copy all photos to the root of the D drive:

    Create a plain text file containing:
    copy %1 D:\
    Save it as copyPhoto.bat (on linux use .sh - you will need to make this file executable using chmod +x) to Agent Directory/Commands
    Then add an action:
    if: "Photo Taken"
    then: "Execute Command"
    File: copyPhoto
    Parameters: "{FILENAME}"

  • MQTT - send an MQTT message
  • Network Message
  • Send Email
  • Send SMS
  • Send Twitter Message
  • Show Message - displays message on viewing web browsers
  • Switch Profile
  • Switch Object On
  • Switch Object Off
  • Sound (on Agent computer)
  • Sound (through web browser)
    Due to browser security this requires interaction with the web page first (eg clicking on something). To work around this in chrome go to chrome://settings/content/sound and add the address of your server (or our website if you are using the remote portal) to the Allowed List.
  • Sound (through Camera)
  • Text to Speech (on Agent computer)
  • Text to Speech (through web browser)
    Due to browser security this requires interaction with the web page first (eg clicking on something)
  • Text to Speech (through camera)
  • Trigger Alert On (another device)
  • Trigger Detect On (another device)

Note: If you are using trigger alert on actions, make sure there is no cyclical route - ie, on Camera 1 alert, Camera 1 triggers alert on Camera 2 which triggers alert on Camera 1.

When you have added an action the table control displays a list of your actions:

Example Action Table

The green tick indicates that the action is active and the text gives you a summary of what the action does.

TIP: You can use the scheduler to enable and disable actions or trigger an action.

Schedule Actions

In this example we added an action to send an email with 2 grabs with the event set to None. We then added a schedule entry to execute that action at 8AM on Sunday and Saturday.