Do you have trouble with Azure IoT Hub?
Here's a simple guide to help you set it up if you're new to IoT Hub, let's start with a quick introduction.
What is Internet of Things(IoT)?
The Internet of Things (IoT) refers to a network of physical devices, vehicles, appliances, and other objects embedded with sensors, software, and network connectivity. These devices, often called βsmart objects,β can collect and share data with each other and with other internet-enabled devices.
What is Azure IoT Hub?
This is a cloud service from Microsoft that connects, monitors, and manages IoT (Internet of Things) devices. It helps you securely communicate with and control IoT devices, collect data, and integrate with other Azure services.
Steps involved in setting up an IoT Hub in Azure:
Step 1: Sign in to azure portal at https://portal.azure.com/ with your details.
Step 2: In the Search box, type IoT and select IoT Hub from the services suggestions.
Step 3: On the IoT Hub page, press Create.
Step 4: Fill the basic details, then click Review $ Create with the default settings and await deployment.
Step 5: Once deployment is complete, click Go to resource to view your new IoT Hub.
NOTE: The newly created IoT Hub has no connected devices, so all information and messages will be empty(0).
Step 6: From the Overview menu, select Device management dropdown and choose Devices and then choose Add device to create one.
Step 7: Enter the device ID and save.
Step 8: Click on the added IoT device, note the primary connection string copy it.
Step 9: Search for Azure Raspberry Pi simulator in your browser and click on the Raspberry Pi Azure IoT simulator option.
NOTE: There is display of Raspberry Pi with the LED off, suggesting it hasn't been connected.
Step 10: Next to the Raspberry Pi diagram, edit the placeholder in line 15 and paste the primary connection string. Then click Run at the bottom of the script.
NOTE: Once you run it, the device will blink the LED to indicate a successful connection.
Step 11: Check the response script for message count and refresh the IoT Hub overview page to see the messages sent.
CONGRATULATIONS! You've successfully created an IoT Hub and connected a device.
Top comments (2)
Nice π
Thanks my boss π