Training
Certification
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In this quickstart, you configure an IoT Central rule. IoT Central rules let you automate actions that occur in response to specific conditions. The example in this quickstart uses accelerometer telemetry from the phone to trigger a rule when the phone is turned over.
In this quickstart, you:
The smartphone app sends telemetry that includes values from the accelerometer sensor. The sensor works differently on Android and iOS devices:
When the phone is lying on its back, the z value is greater than 9
, when the phone is lying on its front, the z value is less than -9
.
To add a new telemetry-based rule to your application, in the left pane, select Rules.
To create a new rule, select Create a rule.
Enter Phone turned over as the rule name.
In the Target devices section, select IoT Plug and Play mobile as the Device template. This option filters the devices the rule applies to by device template type. You can add more filter criteria by selecting + Filter.
In the Conditions section, you define what triggers your rule. Use the following information to define a single condition based on accelerometer z-axis telemetry. This rule uses aggregation, so you receive a maximum of one email for each device every five minutes:
Field | Value |
---|---|
Time aggregation | On, 5 minutes |
Telemetry | Acceleration / Z |
Operator | Is less than |
Aggregation | Minimum |
Value | -9 |
To add an email action to run when the rule triggers, in the Actions section, select + Email.
Use the information in the following table to define your action and then select Done:
Setting | Value |
---|---|
Display name | Your phone moved |
To | Your email address |
Notes | Your phone is face down! |
Tip
To receive an email notification, the email address must be a user ID in the application, and the user must have signed in to the application at least once.
Select Save. Your rule is now listed on the Rules page.
Shortly after you save the rule, it becomes live. When the conditions defined in the rule are met, IoT Central sends an email to the address you specified in the action.
To trigger the rule, make sure the smartphone app is sending data and then place it face down on your desk. After five minutes, IoT Central sends you an email to notify you that your smartphone is face down.
After your testing is complete, disable the rule to stop receiving the notification emails in your inbox.
In this quickstart, you learned how to create a telemetry-based rule and add an action to it.
To learn more about integrating your IoT Central application with other services, see:
Training
Certification
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.
Documentation
Quickstart - Export data from Azure IoT Central - Azure IoT Central
In this quickstart, you learn how to use the data export feature in IoT Central to integrate with other cloud services.
Tutorial - Connect a client app to Azure IoT Central - Azure IoT Central
This tutorial shows you how to connect a device running either a C, C#, Java, JavaScript, or Python client app to your Azure IoT Central application.
Device connectivity guide - Azure IoT Central
This guide describes how IoT devices connect to and communicate with your IoT Central application. The article describes telemetry, properties, and commands.