Summary

Working with IoT Devices are always fun, I have been trying to get the understanding about how IoT Central works and found this meaningful blog with d365 blogger.

Just consolidating two parts of the blog into one:

Getting Started with Azure IoT Central – Connecting the MX Chip

Creating an Alert in Azure IoT Central

In summary, you can get started with some great Alerting options with Azure IoT Central especially around the Webhook and Azure Monitor Action Groups, you can create some cool notification functions where the Alerts are created in Dynamics 365 Field Services. So your imagination is the limit 🙂

As always I hope this article will become useful in your Azure IoT journey. Have fun and let me know if you have any questions.

Introduction

I have been working with Azure IoT Central for the past few months and I am going to share my experience and learnings through a series of blogs. So let’s get started with the first one. By now anyone who is interested in Azure IoT should be aware of the MX Chip Dev Kit. You can find more details about the Dev Kit over here. I this article we will look at how to connect the MX Chip Devkit to Azure IoT Central

What is Azure IoT Central?

IoT Central is an IoT platform that enables you to connect various IoT devices to monitor device conditions, create rules, and manage millions of devices and their data throughout their life cycle.

Connecting the MX Chip Dev Kit to Azure IoT Central.

Setting up Azure IoT Central

Step 1

Navigate to: https://apps.azureiotcentral.com

Step 2

Create a New Application

Step 3

Select Custom App for the list of App Templates

Provide the details for the new Application

Step 4

Once the App is created, go into the App and select “Device Templates“, Create a New Template and select the MXChip IoT DevKit

Review and Create the Device Template

Step 5

Next, navigate to the Devices menu and you will see the Device Template created. Click on the Device Template and Select “New

Provide a Device ID and Name and make sure Simulated option is set to “Off” and click on the Create Button.

Now you will see an MX Chip Device Record created

Once the Device is created go into the device record and click on Connect.

This will bring up the connection details for the device which will we will need later when connecting the MXChip to the Azure IoT Central. Copy the ID Scope, Device ID and the Primary Key to a Notepad as we will need this later.

Setting up the MXChip Dev Kit

Step 1

Now that we have done our setup on Azure IoT Central. Lets prepare the MX Chip. First Download the latest pre-built Azure IoT Central Plug and Play (preview) firmware for the DevKit device from GitHub.

Step 2

Connect the MxChip DevKit device to your PC or Laptop using a USB cable. In Windows, a file explorer window will open on a drive mapped to the storage on the DevKit device. For example, the drive might be called AZ3166 (D:).

Drag the iotc_devkit.bin file onto the drive window. When the copying is complete, the device reboots with the new firmware.

Step 3

Now that we have copied the new Firmware the next step is to connect the MXChip to Wifi and Azure IoT Central. On the MXChip, hold down  B Button, push and release the Reset button, and then release  B Button. The device is now in access point mode. To confirm, the screen displays “IoT DevKit – AP” and the configuration portal IP address.

Step 4

On your PC or Laptop, connect to the WiFi network name shown on the screen of the device. The WiFi network starts with AZ. When you connect to this network, you don’t have internet access.

Step 5

Open the web browser and navigate to http://192.168.0.1/ and the following web page will appear. Select the WiFi and the Password you want the MX Chip to Connect and provide the ID Scope, Device ID and the Primary Key you retrieved in the earlier step when configuring the Azure IoT Central “Step 6”.

Finally, Click “Configure Device” The MX Chip will reboot and the Dev Kit LED Screen will display Confirmation that the device is connected to Azure IOT Central.

You can now navigate to the Azure IoT Central and see the Device Telemetry passing though

Summary

Azure IoT Central is great fun. There is a Command area from where you can send commands to the MXChip.

I will be wiring a few more articles on getting the Azure IoT Central data to Dynamics 365 Field Services App.

As always have fun and let me know if you have any questions.

In this article, we will look at setting up Rules in Azure IoT Central to monitor the telemetry emitted from the MXChip. This will help trigger actions such as sending an email can automatically be invoked in the event of a device anomaly e.g an increase in Temperature.

Create a Rule

Step 1: Log in to Azure IoT Central App

Step 2: Navigate to Rules menu in the Azure IoT Central App.

Step 3: Click on the New Button to create a new Rule

Step 4: Provide the following parameters

  • 1 – Provide a Name to the rule
  • 2 – Ensure the Rule is set to “Enable
  • 3 – Select the appropriate device if you have multiple templates.
  • 4 – Create the condition by selecting the telemetry type, operator and the value. In my example, my condition will trigger once the temperature value is greater than 27 degrees.
  • 5 – Select the Action that should be taken upon triggering the above rule. Currently, there are only 3 Actions available which are
    • Webhook:  When the conditions of the rule are met, a POST request will be sent to the callback URL you provide. Click on the following link to learn further on how to create a Webhook
    • Email: Send an email to a specified list of users when your rule is triggered.
    • Azure Monitor Action GroupsUse Azure Monitor action groups to trigger a list of actions including SMS and Voice. Click on the following link to learn further on how to link Azure Monitor Action Groups with Azure IoT Central Alerts.