← Return to Top Page 日本語

Gravio Trigger Manual

Table of Contents

  1. Overview of the Trigger Tab
  2. Device Triggers
  3. Timer Triggers
  4. Trigger Variables and Properties

Overview of the Trigger Tab

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.”

Device Triggers

Creating a Device Trigger

After setting up devices and actions, you can create a device trigger.

To create a device trigger, click the “+” icon in the top right.

Create Device Trigger Button

The following dialog will appear:

Add Device Trigger Dialog

Enter a name in the trigger name field and select the area for the registered device.

Setting Trigger Active Hours

Trigger Time Settings Screen

Setting Trigger Conditions

Trigger Condition Settings Screen

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.

Layer Validity Period Settings

Setting Actions

Action Settings Screen

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.

Enabling the Trigger

Don’t forget to enable the new trigger by switching the toggle to green.

Configuration Examples

Setting Trigger Active Hours

Interval Examples

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

Threshold Examples

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.

Setting Trigger Execution Conditions

Key Layer Examples

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

  1. Door/window sensor data open received
  2. Door/window sensor data close received « Trigger executes here
  3. Door/window sensor data open received
  4. Door/window sensor data close received « Trigger executes here

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)

  1. Door/window sensor data open received
  2. Door/window sensor data close received (Trigger does not execute)
  3. Temperature sensor data 20.0° received
  4. Door/window sensor data open received
  5. Temperature sensor data 19.8° received
  6. Door/window sensor data close received (Trigger does not execute)
  7. Door/window sensor data open received
  8. Temperature sensor data 20.1° received
  9. Door/window sensor data close received « Trigger executes here
  10. Temperature sensor data 20.2° received

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)

  1. Door/window sensor data open received
  2. Door/window sensor data close received (Trigger does not execute)
  3. Temperature sensor data 20.0° received
  4. Door/window sensor data open received
  5. Temperature sensor data 20.1° received
  6. Door/window sensor data close received « Trigger executes here
  7. Door/window sensor data open received
  8. Temperature sensor data 20.2° received
  9. Door/window sensor data close received « Trigger executes here
  10. Temperature sensor data 20.1° received

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)

  1. Door/window sensor data open received
  2. Door/window sensor data close received (Trigger does not execute)
  3. Temperature sensor data 20.0° received
  4. Door/window sensor data open received
  5. Temperature sensor data 20.1° received
  6. Door/window sensor data close received (Trigger does not execute)
  7. Door/window sensor data open received
  8. Humidity sensor data 35% received
  9. Door/window sensor data close received « Trigger executes here
  10. Temperature sensor data 20.1° received

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)

  1. Door/window sensor data open received
  2. Door/window sensor data close received (Trigger does not execute)
  3. Temperature sensor data 20.0° received
  4. Door/window sensor data open received
  5. Temperature sensor data 20.1° received
  6. Door/window sensor data close received « Trigger executes here
  7. Door/window sensor data open received
  8. Humidity sensor data 35% received
  9. Door/window sensor data close received « Trigger executes here
  10. Temperature sensor data 20.1° received
Expression Examples

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”

Key Layer and Additional Layer Trigger Condition Examples

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.

Timer Triggers

Creating a Timer Trigger

After setting up actions, create a timer trigger.

To create a timer trigger, click the “+” icon in the top right.

Timer Trigger Create Button

The following dialog will appear:

Timer Trigger Creation Dialog

Enter a name in the timer name field.

Schedule Settings

Schedule Settings Screen

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 *”

Timer Trigger Actions

Timer Trigger Action Settings Screen

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.

Enabling the Timer Trigger

Don’t forget to enable the new trigger by switching the toggle to green.

Trigger Variables and Properties

In device/timer triggers, you can pass trigger properties and trigger variables as arguments when executing actions.

Trigger Variables

Trigger variables are tv. variables passed to actions in triggers driven by sensor data reception events.

tv.Data: Sets the received data.

Trigger Properties

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: