Gravio HubKit Manual

Table of Contents

1. Trigger Basics

To create a trigger, you first need an action to execute. There are three types of triggers:

  1. Triggered by events identified by sensor data
  2. Triggered by time
  3. Triggered by conditions of variables and properties

2. Sensor Event Triggers

To create a sensor-based trigger, click the icon with a plus sign in a square in the top right corner of the screen.

2.1 Trigger Settings

  1. Give the trigger a clear name (recommended to base it on the trigger conditions)
  2. Assign it to the appropriate area
  3. There are three tabs:
  4. When: When the trigger will execute
  5. Conditions: Conditions under which the trigger will execute
  6. Action: The action to be executed and its parameters

2.2 When Tab

2.3 Conditions Tab

You can set conditions based on the sensor layer type: - For door sensors: "open" or "close" - For temperature sensors: temperature values and conditions like "more", "less", "equal" - You can also combine multiple conditions using "and" or "or"

2.4 Action Tab

After creating the trigger, don't forget to turn on the switch on the right to enable it. This connects the sensor and action.

3. Trigger Parameter Examples

3.1 Setting Trigger Active Time

3.2 Threshold

This parameter applies to sensors that constantly send state data (temperature sensors, door open/close sensors, wireless switches, etc.).

Example 1: Temperature Sensor

If a threshold trigger is set and the trigger is set to above 20°: - After the temperature exceeds 20° and the sensor sends data, the trigger executes, and won't execute again until the temperature drops below 20° and then exceeds it again - If the sensor sends data for 21°, 22°, 18°, 23°: - With threshold trigger set: executes at 21° and 23° - Without threshold trigger: executes at 21°, 22°, 23°

Example 2: Door/Window Sensor

If a door/window sensor's threshold trigger is set to "close": - The trigger won't execute again until the sensor sends "close" data and then opens once - Without threshold set: executes every time "close" data is sent

3.3 Setting Trigger Execution Conditions

Key Layer and Layer

The key layer needs conditions specified. When conditions are met, the corresponding action executes.

Complex Condition Example

Example: Want to execute trigger only when CO2 exceeds 1000ppm AND motion sensor detects people in the room - Specify condition in key layer for CO2 layer value exceeding 1000ppm - Add motion sensor layer - Motion sensor doesn't send data when no people are present, so need to limit validity period of last value (e.g., 60,000 milliseconds = 1 minute) - This way, if no motion detected in past minute, trigger won't execute even if CO2 exceeds 1000ppm

4. Time-based Triggers

You can create triggers based on time and time-related parameters (intervals, days of week, days of month, etc.).

4.1 Schedule Types

4.2 Custom Trigger Syntax

Unit Required Allowed Values Available Special Characters
Seconds Required 0-59 ・/,-
Minutes Required 0-59 ・/,-
Hours Required 0-23 ・/,-
Days Required 1-31 ・/,-?
Months Required 1-12 or JAN-DEC ・/,-
Days of Week Required 0-6 or SUN-SAT ・/,-?

Example: Execute once a year on February 4th at 14:23:51 → "51 23 14 4 2 *"

5. Trigger Variables and Properties

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

5.1 Trigger Variables

Trigger variables are tv. and are passed to actions as tv.. Used in event-driven triggers that receive sensor data.

5.2 Trigger Properties

Trigger properties tp. can be defined in the trigger settings dialog, and even when the same action is called, you can change behavior through conditional branching based on tp. values.

Trigger properties can be set to these three predefined properties and any property name: - tp.KeyAreaName: Sets the selected area name - tp.KeyLayerName: Sets the name of the first key layer specified in conditions - tp.TriggerName: Sets the name of the trigger being executed