|
| 1 | +--- |
| 2 | +title: Configure rules and actions in Azure IoT Central | Microsoft Docs |
| 3 | +description: This how-to article shows you, as a builder, how to configure telemetry-based rules and actions in your Azure IoT Central application. |
| 4 | +author: vavilla |
| 5 | +ms.author: vavilla |
| 6 | +ms.date: 11/11/2019 |
| 7 | +ms.topic: conceptual |
| 8 | +ms.service: iot-central |
| 9 | +services: iot-central |
| 10 | +manager: philmea |
| 11 | +--- |
| 12 | + |
| 13 | +# Configure rules (preview features) |
| 14 | + |
| 15 | +[!INCLUDE [iot-central-pnp-original](../../../includes/iot-central-pnp-original-note.md)] |
| 16 | + |
| 17 | +*This article applies to operators, builders, and administrators.* |
| 18 | + |
| 19 | +Rules in IoT Central serve as a customizable response tool that trigger on actively monitored events from connected devices. The following sections describe how rules are evaluated. |
| 20 | + |
| 21 | +## Select target devices |
| 22 | + |
| 23 | +Use the target devices section to select on what kind of devices this rule will be applied. Filters allow you to further refine what devices should be included. The filters use properties on the device template to filter down the set of devices. Filters themselves don't trigger an action. In the following screenshot, the devices that are being targeted are of device template type **Refrigerator**. The filter states that the rule should only include **Refrigerators** where the **Manufactured State** property equals **Washington**. |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +## Use multiple conditions |
| 28 | + |
| 29 | +Conditions are what rules trigger on. Currently, when you add multiple conditions to a rule, they're logically AND'd together. In other words, all conditions must be met for the rule to evaluate as true. |
| 30 | + |
| 31 | +In the following screenshot, the conditions check when the temperature is greater than 90 and the humidity is less than 10. When both of these statements are true, the rule evaluates to true and triggers an action. |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +## Use aggregate windowing |
| 36 | + |
| 37 | +Rules evaluate aggregate time windows as tumbling windows. In the screenshot below, the time window is five minutes. Every five minutes, the rule evaluates on the last five minutes of data. The data is only evaluated once in the window to which it corresponds. |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +## Use rules with IoT Edge modules |
| 42 | + |
| 43 | +A restriction applies to rules that are applied to IoT Edge modules. Rules on telemetry from different modules aren't evaluated as valid rules. Take the following as an example. The first condition of the rule is on a temperature telemetry from Module A. The second condition of the rule is on a humidity telemetry on Module B. Since the two conditions are from different modules, this is an invalid set of conditions. The rule isn't valid and will throw an error on trying to save the rule. |
| 44 | + |
| 45 | +## Next steps |
| 46 | + |
| 47 | +Now that you've learned how to configure a rule in your Azure IoT Central application, you can: |
| 48 | + |
| 49 | +> [!div class="nextstepaction"] |
| 50 | +> [Analyze your data on the fly](howto-create-analytics.md) |
0 commit comments