This is not AX but this was a nice experience. I worked through some labs to interact with Azure IoT Hub.
There is a lot of information out there on the web. So, I will focus on the the IoT Hub only here. On later dates, I may get into the other features of the IoT services in Azure.
Below are the steps to create a device in IoT Hub to get you started. After you have created your device, you can interact with the device in multiple ways.
Go to Azure and Create a new IoT Hub App.
Enter the required information.
Now you can Add Devices manually through the Azure Portal. Otherwise, you can use the SDK to add the device via code.
Now, I will show how to add the device via C#. Create a new Console project.
Add the reference via NuGet.
Search for Microsoft.Azure.Devices and Install it.
Below is the code to copy and paste. Make sure to change the connection string to point it to your IoT Hub.
|
Credit to Microsoft for the Labs. Lab doc I found was a little old but most of the steps worked.
Reference:
https://azure.microsoft.com/en-us/documentation/articles/iot-hub-csharp-csharp-getstarted/