DEV Community

Cover image for Creating an IOT Hub on Azure Portal and Authenticate using Raspberry Pi
Ige Olanrewaju Ogunlade
Ige Olanrewaju Ogunlade

Posted on

Creating an IOT Hub on Azure Portal and Authenticate using Raspberry Pi

Introduction

The Azure Internet of Things (IoT) is a collection of Microsoft-managed cloud services, edge components, and SDKs that allow connection, monitoring, and controlling IoT assets at scale. Simply put, an IoT solution is made up of IoT devices that communicate with cloud services.
Azure IoT has a wide range of practical applications and use cases across various industries due to its ability to connect, manage, and analyze data from diverse IoT devices.
These practical applications demonstrate how Azure IoT can be employed across diverse industries to gather, manage, and derive insights from IoT data, leading to improved operational efficiency, cost savings, better decision-making, and enhanced customer experiences.

How can one create IoT Hub through Azure portal? This write up shows how this can be done in a step-by-step format.

Step 1
Log into you azure portal account https://portal.azure.com/#home and if you have none, create one for purpose of learning

Step 2
Search the web browser for IoT

Image description
Click on create:

Image description

Step 3

Image description

As can be seen, the IoT hub consists of tabs ranging from Basics to Review + Create.
On the Basics, we have project details and instance details.
The project details is made up of Subscription and resource group.
On the Basics Tab, the first item is the Project Details and Instance details. The project details contains the Subscriptions and the Resource group.
The Subscription allows you to determine which subscription will be billed for the resources consumed by the IoT device.
While Resource Group allows you to organize and manage the IoT device along with other related resources under a common grouping for administrative, billing, and lifecycle management purposes.

Below is the selection based on the preferred requirements for the device:

Image description

Then click on review + create

Image description

Wait for the deployment to be completed:

Image description

Step 4
The deployment is completed now, click on go to resource

Image description

Image description

The IoT Hub Usage should be noted at this stage so as to compare later.
Messages used today 0
Daily messages quota 400000
IoT Devices 0

Step 5
We want to deploy a new device in the Azure IoT Hub. To achieve this, we need to go back to the Microsoft Azure portal and search for the IoT we just created, click on it:

Image description

When you are on IoT pane, look for device management, click on device, and next click on + Add Device:

Image description

Step 6
On the Create device tab, create the ID for the device to be added and Save:

Image description

Image description

Step 7
Click on the created device,

Image description

Step 8
Go to the https://azure-samples.github.io/raspberry-pi-web-simulator/ web page, replace the string on line 15 with the one we copied in step 7.

Image description

Step 9

Image description

This is the end. The fact that it detects a device shows our deployment works.
Please read and comment.

Top comments (0)