The [Trigger] tab allows you to set up device triggers that activate based on sensor values and timer triggers that execute periodically based on a schedule.
Before creating triggers, please set up devices according to the device tab and configure at least one action following the “Action Steps.”
After setting up devices and actions, you can create a device trigger.
To create a device trigger, click the “+” icon in the top right.
The following dialog will appear:
Enter a name in the trigger name field and select the area for the registered device.
In the Conditions tab, select the key layer/layer and device ID. Various options appear at the bottom of the dialog box depending on the sensor type.
When entering conditions for multiple layers (up to 4) in addition to the key layer, specify And or Or.
The key layer condition is always And.
Condition expression types:
Expressions can use functions available within triggers. For functions, refer to here.
For layers added to the key layer, you can specify an expiration period (milliseconds). This is the expiration period for received data when judging layer conditions after the key layer condition is met.
In the Actions tab, select the action to execute.
You can also specify multiple trigger properties (up to 5) as arguments for action execution.
Trigger properties include three predefined properties and custom property names:
In addition to these three, you can specify custom property names and values that can be referenced within actions.
For configuration examples, please refer to Configuration Examples.
Don’t forget to enable the new trigger by switching the toggle to green.
Device triggers operate when data matching the set conditions arrives, but by specifying an interval, you can set it so that the next execution won’t occur until this interval has passed since the last execution time.
Example: When device data arrives every 2 seconds but you want the trigger to execute every 10 seconds, set the interval to 9000ms (about 10% lower than 10 seconds).
With this setting, trigger execution for data received every 2 seconds will occur at the following timing: Data received 1 (trigger executes), Data 2, Data 3, Data 4, Data 5, Data 6 (trigger executes), Data 7
This parameter was introduced to handle sensors that continuously send data (temperature sensors, door/window sensors, wireless switches, etc.).
Example 1: For a temperature sensor with threshold-based trigger enabled and trigger set to >20°, after the trigger executes when the sensor sends data above 20°, it won’t execute again until the temperature drops below 20° and then exceeds 20° again. With threshold-based trigger disabled, the trigger executes every time the sensor sends data above 20°.
When the sensor sends data 21°, 22°, 18°, 23°, with threshold-based trigger enabled, it executes at 21°, 23°, but with it disabled, it executes at 21°, 22°, 23°.
Example 2: For a door/window sensor with threshold-based trigger enabled and trigger set to =close, after the trigger executes when the sensor sends close data, it won’t execute again until it receives open data. With threshold-based trigger disabled, the trigger executes every time the sensor sends close data.
When the sensor sends data close, close, open, close, with threshold-based trigger enabled, it executes at the first close, but with it disabled, it executes at all close signals.
Example 3: For a wireless switch with threshold-based trigger enabled and trigger set to =click, after the trigger executes when the sensor sends click data, it won’t execute again until it receives non-click data. With threshold-based trigger disabled, the trigger executes every time the sensor sends click data.
When the sensor sends data click, click, double click, click, with threshold-based trigger enabled, it executes at the first click, but with it disabled, it executes at all click signals.
The key layer is the required layer condition. The trigger condition is met and actions are executed when this key layer data is received and meets the trigger conditions.
Example 1: When key layer door/window sensor condition is set to close
Example 2: When key layer door/window sensor condition is set to close and layer temperature sensor condition is set to 20° or higher (with Use threshold-based trigger selected)
Example 3: When key layer door/window sensor condition is set to close and layer temperature sensor condition is set to 20° or higher (with Use threshold-based trigger not selected)
Example 4: When key layer door/window sensor condition is set to close, layer temperature sensor condition is set to 20° or higher, and layer humidity sensor condition is set to 30% or higher (with And selected)
Example 5: When key layer door/window sensor condition is set to close, layer temperature sensor condition is set to 20° or higher, and layer humidity sensor condition is set to 30% or higher (with Or selected)
When selecting Expression, the trigger execution condition is met when the condition is true.
Example 1: When temperature sensor reading is 25 degrees or higher Expression: tv.Data >= 25
Example 2: When temperature sensor reading is between 20 and 25 degrees Expression: tv.Data >= 20 && tv.Data <= 25
Example 3: When IVAR face recognition receives FR_UNKNOWN Event Type: Any Event Expression: tv.Data.common.type == “FR_UNKNOWN”
Example 4: When IVAR face recognition receives data without mask Event Type: Any Event Expression: tv.Data.iod.mask == “NONE”
Example: Execute trigger only when CO2 exceeds 1000ppm and motion sensor detects presence
Set the key layer condition for CO2 layer value exceeding 1000ppm and the layer condition for motion sensor detecting presence.
Since the motion sensor doesn’t send data when no one is present, if someone was present an hour ago but is no longer there, comparing with the most recent value (data from an hour ago) would incorrectly indicate presence.
In such cases, by setting the layer “Validity Period” to 60000 milliseconds (1 minute), the trigger will only execute when the motion sensor has detected presence within the last minute. This enables scenarios where the trigger won’t execute when CO2 exceeds 1000ppm if no one is present.
When “Validity Period” is set to 0 (milliseconds), that layer has no expiration period and conditions are judged based on the most recent value.
After setting up actions, create a timer trigger.
To create a timer trigger, click the “+” icon in the top right.
The following dialog will appear:
Enter a name in the timer name field.
Select the repeat condition.
The custom expression uses five space-separated fields to represent sets of occurrences.
Field | Required | Allowed Values | Special Characters |
---|---|---|---|
Second | Required | 0-59 | * / , - |
Minute | Required | 0-59 | * / , - |
Hour | Required | 0-23 | * / , - |
Day | Required | 1-31 | * / , – ? |
Month | Required | 1-12 or JAN-DEC | * / , - |
Day of Week | Required | 0-6 or SUN-SAT | * / , – ? |
Example: Once a year on January 1st at 0:00:00 “0 0 0 1 1 *”
In the Actions tab, select the action to execute.
You can also specify multiple trigger properties (up to 5) as arguments for action execution.
Trigger properties include three predefined properties and custom property names:
In addition to these three, you can specify custom property names and values that can be referenced within actions.
Don’t forget to enable the new trigger by switching the toggle to green.
In device/timer triggers, you can pass trigger properties and trigger variables as arguments when executing actions.
Trigger variables are tv. variables passed to actions in triggers driven by sensor data reception events.
tv.Data: Sets the received data.
Trigger properties (tp.) can be defined in the trigger settings dialog, and even when calling the same action, you can change behavior using conditions based on tp. values.
Trigger properties include three predefined properties and custom property names: