This is my first post in the Azure IOT series….and really excited to share this content.
Have you ever tried a lot to get some hands-on experience connecting devices to Azure IOT Hub. Don’t worry…Microsoft IOT Team had made it so easy so that we can connect to a real device like Raspberry Pi without actually having any physical hardware with you.
This is all possible with Open Sourced Raspberry Pi Online Simulator…with the below link..
Once you open this…you should see the below screen….all you need to enter your IOT Device connection string…
If you check in the above image, you could see that connectionString is highlighted which you need to get from Azure Portal. So lets see how you can get this from Azure portal…
Step 1: Create a free Azure account or if you already have one proceed to next step
Step 2: Create Azure IOT Hub from Azure portal
From the Azure homepage, select the + Create a resource button, and then enter IoT Hub in the Search the Marketplace field
In the results, click Create.
Step 3: Once the deployment is succeeded and your Azure IOT Hub got created, you need to create a device to which you will be connected by navigating as below. Select IOT Devices under Explorers available in the Side pane as highlighted below
Click on New Device as highlighted below
Step 5: Enter Device ID and click on save as higlighted below
Step 6: Now Open your device by click on IOT Devices…and grab the primary connection string..make sure Enable connection to IOT Hub is enabled as below.
Step 7: Now go back to Raspberry PI Simulator and enter this connection string at the place shown in the first image.
Step 8: And finally boom…you will see that the message sent to Azure…and the bulb was switched on.
In the next post, will briefly describe on the Node.js code used and also on the Device SDK’s for Azure IOT so that we can gain more insight.
If you have any further questions on this….please post it here or you can reach out to Community Support on this tool at the below link…
Hope this helps….