DEV Community

Ikuesan Adeola
Ikuesan Adeola

Posted on

IoT solution using IoT Hub, involves setting IoT Hub, device registering and to send telemetry data to Azure Blob Storage

Azure IoT (Internet of Things) hub is a cloud-based service that allows for secure and reliable communication between an IoT application and its connected devices. It provides a cloud-hosted solution back end to connect virtually any device. Azure IoT hub provides a secure channel for sending and receiving data between devices and the cloud. It offers build-in device management including per-device authentication and scaled provisioning. it allows for over-the-air updates to keep devices up to date and secure. It can also track device creation, connections, and failures.
Azure IoT hub can connect millions of devices and their backend solutions. It enables real-time interaction between devices and the cloud, which allows for immediate responses to changes in device conditions.

To get started,
Open the Azure portal
Sign-up or Sign-in
Search for and select "IoT hub"

Image description

When the "IoT hub" page opens, on the page click on "+ Create" or "Create IoT hub

Image description

When the page opens, fill the details for the IoT hub such as Subscription, Resource group, IoT hub name, Region, Tier, Daily message limit.
Other tabs remain as default. Click on "review + create" then click on "create"

Image description
After that has been done, click on "Go to resource"

Image description
Under "Overview" of IoT hub, go to "Device management"

Image description
Click on "Devices", when the page opens. Click on "+ Add Device"

Image description

When the "Create a device" page opens, input the "Device ID" then "save" the device.

Image description

After creating the device, click on the device created to explore

Image description

When the device opens, copy the "primary connection string".

Image description

Return back to the "IoT hub" overview, go to "Hub setting" from the dropdown, select "File upload", when the page opens. Turn on "File notification settings" then Click on the "Select Azure Storage Container"

Image description

When the "Storage account" page open. Click on "+ Storage account" to create a storage account.

Image description

When the "Create storage account" opens. Input the storage account name, leave other option on default then click on "Ok

Image description

Click on the storage account created, the "Container" page opens. Click on "+ Container" to create container. New container page opens on the side, input the new container name then click "create"

Image description

After creating the container, select the created container then click on "Select"

Image description

Click on "Save"

Image description

Return back to the "IoT hub" overview, go to "Hub setting" from the dropdown, select "Message routing", click on "+ Add"

Image description

When "+ Add a route" page open, select "Storage" in Endpoint type, input the "Endpoint name" then click on "Pick a container"

Image description

Click on the storage account created, the containers page opens. Select the container you created then click on "Select"

Image description

Click on "create + next"

Image description

Click on "create + skip enrichment"

Image description

Get a mobile device, download "IoT plug and play" on mobile device. Tap "Scan QR code"

Image description

Then tap "Connect manually"

Image description

On the next page, select "IoT Hub device connection string". Paste the "primary connection string" copied in the box then tap "connect"

Image description

To upload a file to the Blob storage, tap "Image upload". Select a file from the gallery or take a picture

Image description

Top comments (0)