Creating an Azure IOT Solution

Create an Azure IoT Hub
Sign in to the Azure Portal: Go to portal.azure.com and sign in with your Azure account.

Create a new IoT Hub:

  • Click on Create a resource in the upper left corner.
  • In the search box, type “IoT Hub” and select IoT Hub from the results.
  • Click on Create to start creating a new IoT Hub.
  • Fill in the IoT Hub basics:
  • Subscription: Choose your Azure subscription.
  • Resource group: Create a new resource group or use an existing one.
  • Region: Choose the region closest to you.
  • IoT Hub name: Enter a unique name for your IoT Hub.
  • Pricing and scale tier: Choose the pricing tier (for example, F1 – Free tier for testing purposes).
  • Review and create:

Image description

Image description

Review your IoT Hub configuration settings.

  • Click Create to provision the IoT Hub.
    Deployment: Wait for the deployment to complete. This may take a few minutes.

Image description
Register a Simulated Device (Phone)

Navigate to IoT devices:

  • Once the IoT Hub deployment is complete, navigate to your IoT Hub in the Azure portal.
  • Click on IoT devices under Explorers.

Add a new device:

  • Click on + New to add a new device.

Image description

Configure the device:

  • Enter a Device ID (e.g., simulated-phone).
  • For Authentication type, select Symmetric key.
  • Click Save.

Image description

Copy the connection string:

  • After saving, click on the registered device (simulated-phone).
  • Copy the Primary key (or Connection string), which will be used by the simulated device to authenticate with the IoT Hub.

Image description

Configure the IoT application the smart phone

  • Download IoT plug and play application on your smart phone
  • Click Scan QR code
  • Click connect manually
  • Select IoT connection string
  • Paste the connection string
  • Click connect

Message Routing

  • Navigate to Iot Hub overview
  • Expand Hub settings
  • Click message routing
  • Click Add
    Image description

Configure Message Routing

  • Select storage as end point type
  • Enter end point name
  • Pick a container ( we would be creating a new storage account and container for this project)

Image description

Set up Azure Blob Storage:

  • Fill out the details for your storage account:
  • Subscription: Choose your Azure subscription.
  • Resource Group: Create a new one or use an existing one.
  • Storage account name: Choose a unique name.
  • Location: Choose the same region as your IoT Hub for optimal performance.
  • Performance: Standard (recommended).
  • Click Review + create and then Create.

Image description
Create a Blob Container:

After the storage account is deployed, navigate to it in the Azure Portal.
Go to Containers under Blob service and click on + Container.
Give your container a Name.

Image description

  • Notice it automatically selects the container that was just created
  • Endocing- Select JSON
  • Create & Next

Image description

  • Click on Add to create a new route:
  • Name: Enter a name for the route.
  • Data source – Device telementary message
  • Click Test

Image description

Image description
Enrichment

  • Enter Name
  • Enter Value
  • Click Add

Image description

Configure file upload on IoT Hub

  • On Azure portal navigate to iot hub
  • Select file upload
  • Select storage account
  • Select the container
  • Save

Image description

Upload an image on your Smart phone
-On your device click on image upload

  • Add an image to your azure blob storage using the plug and play application on your device

  • Navigate to the selected container

  • The image has successfully uploaded
    Image description

  • Overview of the image properties

  • Click download to view image
    Image description

Success!
Image description

Conclusion
This solution demonstrates a basic implementation where an IoT device (simulated using Iot plug and play application on Andriod) sends telemetry data to Azure IoT Hub, which then routes the data to Azure Blob Storage for storage. This setup can be expanded and customized further based on specific IoT device types, additional Azure services integration (e.g., Azure Functions for data processing), and real-world deployment requirements. It provides a foundation for building scalable IoT solutions leveraging Azure services.


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top