Triggers
A trigger is set up to define data capture scenarios. It specifies the conditions (the “if”) and defines which data to record when those conditions are met (the “then”). Multiple conditions can be applied, to define a complex scenario. Triggers can be used in one or across multiple systems.
Concepts & Architecture
Conditions
For a trigger to generate an event, all of the conditions must be met simultaneously. For instance speed > 20 km/h AND acceleration > 1 m.s-². Conditions can be applied on different signal types:
- Number
- String
- Maps
- Boolean
- Custom text for specific types
Recordings
Recordings are the data you want to capture when a trigger conditions are met. Such recording can be point in time or of a defined duration. The time range can start before the trigger fires and creates an event thanks to a buffer.
Trigger Management
Triggers Overview
Trigger List
You can view all triggers in your workspace on the Trigger page. To open a trigger, click on it. The list can be filtered by:
- ID or name
- Systems using the trigger
- Trigger Labels
- Trigger Priority
Trigger List on a System
You can list all triggers applied to a system from its system view. Each entry has an action menu with the following options:
- View the trigger
- Unlink the trigger from the system
- Remove the trigger
Viewing the Trigger
You can open the trigger column from the trigger list or from the system details view. The column contains the following information:
Main Information
- Name
- UUID
- Priority
- Status
- Labels
General Information
Provides details such as the total number of events generated, or the date of the latest event.
Configuration
The configuration block details the monitored signals, conditions and which signals are to be recorded and for how long.
Specific Options
This block displays additional settings for your trigger, such as the recording range (i.e. the duration) of your recordings.
Systems
Lists all systems using the trigger.
Creating Triggers
Currently, you can only create triggers directly from a system. Each trigger can be reused across multiple systems. A system can use a trigger only if it contains all the Data Sources and signals used as conditions in the trigger.
Main Information
You need to enter essential information such as the name, description, and labels for the trigger.
Configuration
In this step, you define what your trigger will do: what will activate it and what recordings will be generated when it activates.
Conditions
You can add a condition by clicking on the Add Condition button, which adds a new condition block. Then, select a signal to apply the condition to. You can only add conditions to signals that are on a Data Source linked to the system where the trigger is being applied.
Once a signal is selected, the condition block will update to match the type of the signal:
- Number: Select an operator and provide a number.
- String: Select an operator and provide a string.
- Maps: Select an operator and multiple zones.
- Boolean: Specify whether the signal must be true or false to meet the condition.
- Custom: Provide free multiline text.
You can add as many conditions as necessary.
Recordings
Select which signals you want to record when the trigger is activated. To add a recording, click the Add Recording button and select a signal. Then, specify if you want to record the signal at the time of the event or over a timeframe.
If at least one recording uses the timeframe option, you can define the recording range at the bottom of the recording settings. Note that the recording range applies to all recordings, meaning you cannot have different ranges for different recordings.
Specific Options
Here, you can configure specific options for your triggers:
- Conditions must remain true for a timeframe: The trigger will only activate if all conditions are true simultaneously for the specified timeframe.
- Merge events within a sliding timeframe: This option merges events generated by a trigger when a new event is generated within the specified timeframe of the last merged event. The timeframe resets with each new event, and the merged event is finalized when no new events are generated within the specified timeframe.
- Cooldown period: Specifies a time period during which the trigger will not generate new events after generating one.
Adding a Trigger to a System
You can add a trigger to a system directly from the trigger list by clicking the Add Trigger button. This opens a modal with three tabs. The first tab allows you to add existing triggers to the system. For a trigger to be added, all signals used for conditions and recordings must be present in the system. The list of available triggers only shows those that meet this condition.
Editing & Updates
You can edit a trigger from the trigger list within a system.
Status of Triggers
The status of a trigger may vary depending on where you view it.
Trigger List Status
In the trigger list, a trigger will be marked as “Not Ready” if certain fields are missing, such as conditions. Once the trigger can be used in systems, its status changes to “Ready.”
System Status
Within a system, each trigger has a status that represents its implementation progress:
- Requested: The trigger has been requested and requires completion.
- To Code: Some implementations are missing for the trigger to function correctly.
- To Deploy: All implementations are ready, but some need to be deployed in the system.
- Ready: All implementations have been deployed, and the trigger can start generating data.