Trigger an Event

Adds the specified event to the metadata stream for use by downstream nodes.

Overview

The Event node inserts a user defined event into the metadata, to be used by downstream nodes such as Publish to Lumeo Dashboard or Create Search Index.

Inputs & Outputs

  • Inputs: 1, Media Format: Raw Video
  • Outputs: 1, Media Format: Raw Video
  • Output Metadata: Event Metadata

Properties

PropertyDescriptionTypeDefaultRequired
enabledEnabledbooltrueNo
event_typeEvent type to add to metadata. Accepts templates. Event type to add to metadata. Can be used by downstream nodes to index clips, publish to Lumeo Dashboard etc.stringnullYes
event_descriptionEvent description to add to metadata. Accepts templates. Optional. Event description to add to metadata. Can be used by downstream nodes to index clips, publish to Lumeo Dashboard etc.stringnullNo
event_triggerTrigger the event when this condition evaluates to true.trigger-conditionnullYes
trigger_modeTrigger mode. Options: Exact (exact): Trigger for as long as trigger condition is true; Fixed (fixed): Trigger for the defined maximum duration once the trigger condition is met.enumexactYes
trigger_duration0 implies 1 frame. Conditional on trigger_mode being fixed. Unit: seconds.float0Yes
event_log_severityRecord to Events log. Options: Do not record (none); Info (info); Warning (warning); Error (error).enumnoneNo
event_log_messageOptional message to publish to Events logstringnullNo
stop_deployment_on_eventStop deployment with an Error when event occurs.boolfalseNo

Event Description Template

event_type and event_description accept Jinja2 Template Syntax for customizing the Event Type and body of the Event description.

Variables available to the template:

VariableDescription
deployment_idDeployment ID.
deployment_nameDeployment Name.
application_idApplication ID.
application_nameApplication Name.
gateway_idGateway ID.
gateway_nameGateway Name.
node_idNode ID.
meta.nodesNode metadata.
meta.objectsObject metadata.
meta.custom_propertyCustom properties inserted using a Custom function.

Examples

Static text content:

Fire was detected in the parking lot

Insert description from an existing node:

{{ nodes.annotate_line_counter1.lines.line1.dir1_objects_crossed_delta }} cars crossed the line
{{ nodes.claude1.rois.polygon1.label }}

Output Metadata

The fields below are declared by this node's metadata schema; the JSON values are representative examples.

PathTypeDescription
nodes.<node_id>.event_deltaintegerWhen the state of the event changes
nodes.<node_id>.event_statebooleanWhile the event state is true or false
nodes.<node_id>.eventstringCurrent event name, or null when no event is active.
nodes.<node_id>.event_idstringUnique identifier of the current event, or null when inactive.
nodes.<node_id>.event_descriptionstringRendered description of the current event, if configured.
nodes.<node_id>.typestringIdentifies the node type that produced this metadata.

JSON example

{
  "nodes": {
    "event1": {
      "event": "value",
      "event_delta": 0,
      "event_description": "value",
      "event_id": "value",
      "event_state": false,
      "type": "event"
    }
  }
}

Did this page help you?