Trigger by Variable

Trigger by Variable

The trigger type, Trigger by Variable allows you to execute your Actions when a variable meets certain conditions. If your device has sent data and the variables are meeting those conditions, this action will be triggered.

There are 2 (two) categories inside of this trigger type:

  1. Single device: Allows you to watch a specific device in your list. Any data that is sent by that device will be tested against your conditions to decide if this action should be triggered or not.
  2. Multiple devices: Allows you to watch multiple devices. Any data that is sent by those devices will be tested against your conditions to decide if this action should be triggered or not. For this type, you must supply the tag key and tag value of the devices you want to watch.

It's important to note that only the Single device category allows you to set Trigger Unlock conditions. To learn more about Trigger Unlock.



Trigger Conditions

After setting up the device, you should set a condition for your action to be executed. To do so, you must head over to the Trigger section.

You can set multiple conditions in an action, if at least one of them results in a match, the action will be executed.

Notice that setting up multiple conditions will execute the action only once if any of the conditions are matched. This means that if you send two variables that would trigger the action at same time, it will only trigger one action.

  1. Select a variable: Select a variable to be tested. This will be one of the variables that will be compared against the data from the device.
  2. Condition: The type of condition to test the variable. The available test conditions are:
    1. Less than: condition is true when the value of the variable is less than the value defined;
    2. Greater than: condition is true when the value of the variable is greater than the value defined;
    3. Equal to: condition is true when the value of the variable is equal to the value defined;
    4. Different from: condition is true when the value of the variable is different from the value defined;
    5. Any: condition is true whenever a new value of the variable is sent to the device;
    6. Between: condition is true when the new value is between a fixed value range;
  3. Value: The value to complement the condition. In the example above, the value for the condition is 15.
  4. Field type: The field type to use in the comparison. The system will force this field type when comparing the values from the device and the value defined in the condition (15). You could, for example, set the value to 0x1 and set this field to string in order to compare the number as a string.

The example above means that the action will be triggered when my_variable is less than 15.

Looking to create more complex logic statements? You can use the Action to trigger an Analysis, and then manually create a custom logic inside of the code.


Preventing action from running every time the conditions are met

To prevent your action from activating every time the conditions are met, you can lock it by defining Trigger Unlock conditions. Note that only the Single device type allows you to set Trigger Unlock conditions.


    • Related Articles

    • Trigger Unlock

      Trigger Unlock is a feature that allows users to define specific conditions under which an action, once locked, can be unlocked and allowed to execute again. This locking mechanism serves as a safeguard against repetitive or unwanted triggers, ...
    • Trigger by Geofence

      The "Trigger by Geofence" feature allows you to execute an Action whenever a variable containing location data meets specific geofence conditions—either inside or outside a predefined area. For instance, you can configure an action to trigger when a ...
    • Trigger by MQTT Topic

      The trigger type, Trigger by Variable, allows you to execute your Action when data is sent to an MQTT topic. TagoIO has its own MQTT broker that is responsible for pushing data to clients in case something new is published in the specific topics they ...
    • Trigger by Usage Alert

      The "Trigger by Usage Alert" is a feature that enables you to execute an Action when a specific service or resource meets predefined conditions. Below, you will find a list of Resources and Services that can be used to trigger your action. Resources ...
    • Trigger by Resource

      The trigger type Trigger by Resource allows you to execute your Action when a resource meets certain conditions. A resource is one of the following: Access Management Actions Analysis Device RunUser For example, you can trigger an Action when a new ...