Create a Trigger Based on a Device (Classic)

This topic describes how to create a trigger based on conditions on values received from a device.

Before you begin

Register the device details and metrics that you want to use in the trigger, using baseline entities.
  1. Register at least one device type and metric using the supported_device_gateway and the metrics_device_type entities, respectively.
  2. Register at least one device group and device for the device type using the M2M_groups and device_gateway entities, respectively.

About this task

You can, however, create a trigger that will cover only a single device, a group of devices, or all the devices of a given type.

You can also create a trigger based on conditions on values stored in an entity.

Procedure

  1. Access the event for which you want to create a trigger.
  2. Select Add Device Condition.
    The Device Gateway and Condition sections appear.
  3. In the Device Type, Device Group, and Device Units boxes, select the type, group, and unit of the device, respectively.
    The following table provides values that you can select in these boxes, and which devices will be filtered accordingly.
    Device Type Device Group Device Units Result
    MyDeviceType Any Any All devices of the type MyDeviceType.
    MyDeviceType MyGroup Any All devices in the group MyGroup.
    MyDeviceType MyGroup MyDevice The device named MyDevice.
    In the Metric box, a list of metrics registered for the device type appears.
  4. In the Metric, Operator, Input Source, and Value boxes, select or enter the metric, operator, input source, and value, respectively.
    If you want to create a trigger when the temperature recorded by the device exceeds 40 degrees Celsius, in the Metric, Operator, Input Source, and Value boxes, select or enter Temperature, >, Fixed Value, and 40, respectively.
  5. If you want to allow the end user to set the value manually, select the Allow End User to set value check box, and then enter a value in the Input Name box.
    If you want to create a trigger when the temperature stored in the entity field reaches a certain limit, and you want application users to specify that limit:
    1. In the Input Name box, enter Maximum Temperature.
    2. In the application, add an event settings widget, and then select the event that you have created.

      In the application, the widget contains an input field labeled Maximum Temperature, which allows the user to change the value that you have specified in the event.

  6. If there is more than one condition, and if you want to create a trigger only if all the conditions are satisfied, select Meet ALL of the conditions. By default, this option is selected. If, however, you want to create a trigger if at least one of the conditions is satisfied, select Meet ANY of the conditions.

What to do next

Create an action.