For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using configuration fields in rule conditions

Create one rule that compares measurements against device-specific thresholds.

In short: Define a configuration field at product level, override its value where required, and select Configuration field from triggering device as the rule's comparison value.

Overview

Configuration fields are static settings defined for a product. They are available to every device of that product, while their values can be overridden for individual devices. This makes them useful when the same rule logic should apply to many devices but the comparison threshold differs by device.

For example:

Device

Target temperature

Cold room A

18 °C

Cold room B

20 °C (default)

Cold room C

22 °C

1. Create the configuration field

Open a device's Fields section, inside of Configuration. Configuration fields are defined at product level, which means, if you create it in one device of the product, all devices will have the same configuration field, with its default value.

Add a configuration field. For example, create Target temperature and select the appropriate unit, such as degrees Celsius.

Enter a default value. For example, use 20 °C. Every device of the product uses this value unless a device-specific value is set.

Override values where needed. Open a particular device and set its value, such as 18 °C or 22 °C.

2. Create the rule

Create a new rule. Choose the New measurement recorded trigger and enter the rule name, description, and branding settings as required.

Select the product and devices. Choose the product that contains the measurement field and configuration field. Select the devices the rule should monitor.

Choose the measurement field. For a temperature rule, select Temperature as the field of interest.

3. Configure the condition

Choose Triggering device. When several devices are included, this refers to the device whose incoming measurement is currently being evaluated.

Select the measurement and time-range operation. Use Current value for the newest measurement, or an aggregation such as the maximum from one hour ago until now.

Select an operator. Available options include equals, less than, greater than, inside range, and outside range. For this example, choose Greater than.

Choose the comparison value. Select Configuration field from triggering device, then select the appropriate field, in this example "Target temperature".

Add the condition. The condition now evaluates each device's measurement against that same device's configured target.

For this example, a device with a target of 18 °C triggers when its evaluated temperature exceeds 18 °C; a device with a target of 22 °C triggers only when it exceeds 22 °C.

4. Add an action and save

Add the action that should run when the condition is fulfilled, such as sending an email. Configure the recipients and message, add the action, and save the rule.

Checklist

  1. The configuration field is defined for the selected product.

  2. A sensible default value is set.

  3. Device-specific overrides are configured where necessary.

  4. The rule monitors the correct product and measurement field.

  5. The condition uses Triggering device and the intended time range.

  6. The comparison source and field are correct.

  7. An action is configured and the rule is saved.

Last updated

Was this helpful?