You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-monitoring-notifications-with-azure-logic-apps.md
+20-13Lines changed: 20 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,31 @@
1
1
---
2
-
title: IoT remote monitoring and notifications with Azure Logic App
3
-
description: Use Azure Logic Apps for IoT temperature monitoring on your IoT hub and automatically send email notifications to your mailbox for any anomalies detected.
2
+
title: Tutorial - Monitor devices, notify with Azure Logic Apps
3
+
titleSuffix: Azure IoT Hub
4
+
description: Tutorial - Use Azure Logic Apps to monitor IoT temperature data in IoT hub and send email notifications to your mailbox for any anomalies detected.
4
5
author: kgremban
5
6
6
7
ms.author: kgremban
7
8
ms.service: iot-hub
8
9
ms.topic: tutorial
9
10
ms.date: 07/18/2019
10
-
#I think this is out of date. I changed 'click' to select. --RobinShahan
11
11
---
12
12
13
-
# IoT remote monitoring and notifications with Azure Logic Apps connecting your IoT hub and mailbox
13
+
# Tutorial: Monitor IoT devices and send notifications with Azure Logic Apps
14
+
15
+
Use Azure Logic Apps to monitor incoming device telemetry from IoT Hub and send notifications when alerts are triggered.
[Azure Logic Apps](../logic-apps/index.yml) can help you orchestrate workflows across on-premises and cloud services, one or more enterprises, and across various protocols. A logic app begins with a trigger, which is then followed by one or more actions that can be sequenced using built-in controls, such as conditions and iterators. This flexibility makes Logic Apps an ideal IoT solution for IoT monitoring scenarios. For example, the arrival of telemetry data from a device at an IoT Hub endpoint can initiate logic app workflows to warehouse the data in an Azure Storage blob, send email alerts to warn of data anomalies, schedule a technician visit if a device reports a failure, and so on.
19
+
[Azure Logic Apps](../logic-apps/index.yml) can help you orchestrate workflows across on-premises and cloud services, multiple enterprises, and various protocols. A logic app begins with a trigger, which is then followed by one or more actions that can be sequenced using built-in controls, such as conditions and iterators. This flexibility makes Logic Apps an ideal IoT solution for IoT monitoring scenarios. For example, the arrival of telemetry data from a device at an IoT Hub endpoint can initiate logic app workflows to warehouse the data in an Azure Storage blob, send email alerts to warn of data anomalies, schedule a technician visit if a device reports a failure, and so on.
20
+
21
+
In this tutorial, you perform the following tasks:
18
22
19
-
In this article, you learn how to create a logic app that connects your IoT hub and your mailbox for temperature monitoring and notifications. The client code running on your device sets an application property, `temperatureAlert`, on every telemetry message it sends to your IoT hub. When the client code detects a temperature above 30 C, it sets this property to `true`; otherwise, it sets the property to `false`.
23
+
> [!div class="checklist"]
24
+
> Create a Service Bus queue.
25
+
> Create a route in your IoT hub that sends messages to the Service Bus queue if the messages contain anomalous temperature readings.
26
+
> Create a logic app that watches for messaging arriving in the queue and sends an email alert.
27
+
28
+
The client code running on your device sets an application property, `temperatureAlert`, on every telemetry message it sends to your IoT hub. When the client code detects a temperature above 30 C, it sets this property to `true`; otherwise, it sets the property to `false`.
20
29
21
30
Messages arriving at your IoT hub look similar to the following, with the telemetry data contained in the body and the `temperatureAlert` property contained in the application properties (system properties aren't shown):
22
31
@@ -34,17 +43,15 @@ Messages arriving at your IoT hub look similar to the following, with the teleme
34
43
}
35
44
```
36
45
37
-
To learn more about IoT Hub message format, see [Create and read IoT Hub messages](iot-hub-devguide-messages-construct.md).
38
-
39
-
In this article, you set up routing on your IoT hub to send messages in which the `temperatureAlert` property is `true` to a Service Bus endpoint. You then set up a logic app that triggers on the messages arriving at the Service Bus endpoint and sends you an email notification.
46
+
If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin.
40
47
41
48
## Prerequisites
42
49
43
-
* Complete the [Raspberry Pi online simulator](iot-hub-raspberry-pi-web-simulator-get-started.md)tutorial or one of the device tutorials. For example, you can go to [Raspberry Pi with Node.js](iot-hub-raspberry-pi-kit-node-get-started.md) or to one of the [Send telemetry](../iot-develop/quickstart-send-telemetry-iot-hub.md?pivots=programming-language-csharp) quickstarts. These articles cover the following requirements:
50
+
Before you begin this tutorial, complete one of the [Send telemetry](../iot-develop/quickstart-send-telemetry-iot-hub.md)quickstarts in the development language of your choice. Alternatively, you can use any device app that sends temperature telemetry; for example, the [Raspberry Pi online simulator](iot-hub-raspberry-pi-web-simulator-get-started.md). These articles cover the following requirements:
44
51
45
-
* An active Azure subscription.
46
-
* An Azure IoT hub under your subscription.
47
-
* A client application running on your device that sends telemetry messages to your Azure IoT hub.
52
+
* An active Azure subscription.
53
+
* An Azure IoT hub in your subscription.
54
+
* A client app that sends temperature data to your Azure IoT hub.
In this tutorial, you begin by learning the basics of working with Raspberry Pi that's running Raspberry Pi OS. You then learn how to seamlessly connect your devices to the cloud by using [Azure IoT Hub](about-iot-hub.md). For Windows 10 IoT Core samples, go to the [Windows Dev Center](https://www.windowsondevices.com/).
18
+
In this article, you learn the basics of working with Raspberry Pi that's running Raspberry Pi OS. You then learn how to connect your devices to the cloud by using [Azure IoT Hub](about-iot-hub.md). For Windows 10 IoT Core samples, go to the [Windows Dev Center](https://www.windowsondevices.com/).
19
19
20
20
Don't have a kit yet? Try [Raspberry Pi online simulator](iot-hub-raspberry-pi-web-simulator-get-started.md). Or buy a new kit [here](https://azure.microsoft.com/develop/iot/starter-kits).
In this tutorial, you begin by learning the basics of working with Raspberry Pi that's running Raspberry Pi OS. You then learn how to seamlessly connect your devices to the cloud by using [Azure IoT Hub](about-iot-hub.md). For Windows 10 IoT Core samples, go to the [Windows Dev Center](https://www.windowsondevices.com/).
18
+
In this article, you learn the basics of working with Raspberry Pi that's running Raspberry Pi OS. You then learn how to seamlessly connect your devices to the cloud by using [Azure IoT Hub](about-iot-hub.md). For Windows 10 IoT Core samples, go to the [Windows Dev Center](https://www.windowsondevices.com/).
19
19
20
20
Don't have a kit yet? Try [Raspberry Pi online simulator](iot-hub-raspberry-pi-web-simulator-get-started.md). Or buy a new kit [here](https://azure.microsoft.com/develop/iot/starter-kits).
In this tutorial, you begin by learning the basics of working with Raspberry Pi online simulator. You then learn how to seamlessly connect the Pi simulator to the cloud by using [Azure IoT Hub](about-iot-hub.md).
18
+
In this article, you learn the basics of working with Raspberry Pi online simulator. You then learn how to seamlessly connect the Pi simulator to the cloud by using [Azure IoT Hub](about-iot-hub.md).
19
19
20
20
:::image type="content" source="media/iot-hub-raspberry-pi-web-simulator/3-banner.png" alt-text="Connect Raspberry Pi web simulator to Azure IoT Hub" border="false":::
0 commit comments