Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
The Azure IoT Handbook
The Azure IoT Handbook

The Azure IoT Handbook: Develop IoT solutions using the intelligent edge-to-cloud technologies

By Dan Clark
$15.99 per month
Book Dec 2023 248 pages 1st Edition
eBook
$35.99 $24.99
Print
$44.99
Subscription
$15.99 Monthly
eBook
$35.99 $24.99
Print
$44.99
Subscription
$15.99 Monthly

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details


Publication date : Dec 22, 2023
Length 248 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781837633616
Category :
Table of content icon View table of contents Preview book icon Preview Book

The Azure IoT Handbook

An Introduction to the IoT

The Internet of Things (IoT) is rapidly transforming the way we live, work, and interact with the world around us. It has the potential to revolutionize countless industries, from manufacturing and healthcare to transportation and agriculture. With billions of interconnected devices already in use, and that number projected to grow exponentially in the coming years, understanding and harnessing the power of the IoT is becoming increasingly important. This book aims to provide a comprehensive introduction to the IoT and is arranged to guide you through setting up and securing your devices, routing and analyzing data, and then visualizing and augmenting it. Although there are no prerequisites for this book, it would be beneficial to have some experience with programming and scripting languages.

This chapter introduces you to the IoT. It introduces some common use cases for developing IoT systems and introduces you to the common components of an IoT system. You will understand the benefits of an IoT hub and its role in the IoT system. The chapter ends with a hands-on lab where you will connect a virtual IoT device to an Azure IoT hub and capture the streaming data.

In this chapter, we’re going to cover the following main topics:

  • What is the IoT?
  • What are some common IoT use cases?
  • What are the components of an IoT system?
  • Lab – setting up an IoT hub in Azure

Technical requirement

In order to complete the lab in this chapter, you will need a subscription to Azure. If you do not have access to one, you can sign up for a free trial subscription at https://azure.microsoft.com/subscription/free. This free trial will give you $200 of Azure credit to spend over the next 30 days. Take some time to explore all the free services you get with your free subscription; they are quite extensive.

What is the IoT?

If you are reading this book, you are probably somewhat aware of what the IoT is and have been tasked with an IoT project. Nonetheless, it is a good idea to look at the common components of IoT systems. The IoT is a network of connected computing devices with embedded sensors that can transfer the sensor data to the cloud for centralized data processing. These devices run the gamut of wearable devices, such as Fitbit, that track your steps and vitals to smart cars and appliances.

Once you begin planning an IoT solution, you will find that it is a complex task. Both the device side and the cloud side involve complicated implementations that provide hundreds of required features, and the security of these devices is of the utmost importance. This is where Azure comes into play. It provides a set of Platform-as-a-Service (PaaS) offerings that make creating IoT systems easier, more reliable, and secure.

Now that we know what the IoT is, let’s look at some use cases before we dive into further details.

What are some common IoT use cases?

While there are some common IoT use cases to consider, this list is getting bigger all the time. People are constantly coming up with exciting new ways to use the IoT to solve problems, and I think we are just scratching the surface of its full potential. Nevertheless, it is helpful to consider the following common use cases to get a feel for the technology:

  • Agriculture: This domain is finding many ways to use the IoT. For example, smart irrigation is a popular IoT use case for farmers that provides real-time visibility; IoT sensors recognize when environmental factors, such as ground moisture, call for adjusted watering schedules and can pinpoint where water is needed.
  • Predictive maintenance: Predictive maintenance sensors and software help recognize when a piece of equipment is out of date, slowing down, or malfunctioning and needs to be replaced proactively instead of reactively.
  • Remote monitoring: This IoT use case allows companies to monitor sensors that are in dangerous and remote places. This is particularly helpful in industries such as mining and environmental agencies, where specialized equipment is widely distributed.

Now that we have discussed a few use cases, let’s review the common components of an IoT system.

What are the components of an IoT system?

At their core, all IoT systems are composed of things, insights, and actions. Things refers to small computing devices with embedded sensors that send data up to the cloud through a cloud gateway. The cloud gateway offers a central hub in the cloud that provides secure connectivity, telemetry, event ingestion, cloud-to-device communication, and device management functionalities. It routes the streaming data to storage for long-term analysis and to services that can analyze real-time streaming data. Once the data is processed, it is sent to reporting tools, dashboards, and automated workflows that can automatically respond to the conditions and insights garnered from the telemetry data of the devices. The following figure shows a generic IoT system:

Figure 1.1 – Basic structure of a generic IoT system

Figure 1.1 – Basic structure of a generic IoT system

In addition to the basic components of an IoT system, many IoT solutions include subsystems for provisioning management at scale, end-to-end security, and machine learning. The following figure shows an IoT system architecture with additional subsystems:

Figure 1.2 – Adding optional subsystems to the IoT solution

Figure 1.2 – Adding optional subsystems to the IoT solution

As shown in the figure, Bulk Device Provisioning allows the provisioning of a large number of devices. Edge devices play an active role in managing access and controlling the flow of information. They can assist in tasks such as filtering, batching, aggregating, and buffering data, as well as translating protocols. Data Transformation refers to the manipulation or aggregation of the raw streaming data. The User Management subsystem allows the capabilities of different users and groups to be specified in the context of the actions they can perform via the applications and on the systems. Machine Learning provides the systems with the ability to perform actions based on the data, such as predictive maintenance and security alerts. In addition to supporting these subsystems, IoT systems should provide the ability to set up system-wide security and end-to-end logging and monitoring, in addition to high availability and disaster recovery for the system.

Now that we have seen the pieces that make up an IoT system, let’s see what the corresponding resources are in Azure.

Understanding the Azure IoT system

The first thing we need for an IoT system is the devices that will collect the data. These devices can be very small, such as 8-bit microcontrollers, all the way up to server-grade devices depending on the implementation requirements. There are a tremendous number of devices on the market to choose from. The key differentiators are cost, power, network access, types of sensors, and the inputs and outputs accepted.

Although not necessary, when using an IoT device on Azure it is beneficial to ensure it is an Azure Certified Device. This guarantees the device supports telemetry that will be compatible with the IoT hub and the Device Provisioning Service (DPS). It will also facilitate cloud-to-device messaging, direct methods, and device-twin updating. Microsoft maintains a catalog of Azure Certified Devices at https://devicecatalog.azure.com.

Organizations that choose Azure Certified Devices for their IoT projects benefit from reduced development time, increased security, and a more streamlined integration process when building and scaling their IoT solutions on the Azure platform. These devices are typically used in a wide range of IoT applications, including industrial automation, smart cities, healthcare, agriculture, and more.

After selecting a device, the next step is to set up an IoT hub on Azure and connect the device to it. Within Azure IoT Hub, numerous features are available to simplify device management and control. These features comprise secure communication channels that enhance data transmission and reception, the automatic resending of device messages to accommodate intermittent connectivity, and selective revocation of access rights for specific devices as required.

In the following hands-on lab, you will learn how to set up a virtual device that will send simulated data to an IoT hub you will create in Azure. Make sure you have the technical requirements in place before you start!

Lab – setting up an IoT hub in Azure

By the end of this lab, you will be able to do the following:

  • Navigate the Azure portal
  • Set up a resource group
  • Create an IoT hub
  • Create a virtual device
  • Send data from the device to the IoT hub

To do this, you will need to perform the following steps:

  1. Before you start the lab, you will need to create a unique ID. We will add this to the ends of your resource names to make them unique. This ID can be whatever you want. I find using my initials and then attaching the month and day I was born works well. So I would use drc0830.
  2. Open a Microsoft Edge browser window, and then navigate to the Azure portal (https://portal.azure.com).
  3. Sign in with the credentials you used to create the account. You should land on the home page. You can customize the look and feel by selecting the settings icon in the top-right corner:
Figure 1.3 – Selecting the settings icon

Figure 1.3 – Selecting the settings icon

  1. On the settings page, select the Appearance + startup views tab. Make sure the Menu behavior option is set to Docked (see Figure 1.4). Also, verify that the startup page is set to Home.
Figure 1.4 – Setting up the look and feel of the portal

Figure 1.4 – Setting up the look and feel of the portal

  1. Via the left-side menu, go back to the Home page.
  2. At the top of the page, you should see a + icon that lets you create a resource. Click on it, and in the search bar that appears, enter Resource group, then select Resource group from the results dropdown:
Figure 1.5 – Creating a resource group

Figure 1.5 – Creating a resource group

  1. On the next page, click on the Create button to start the creation of the resource group.
  2. In the Basics tab, create a resource group named rg-iot-training-{your-id} (replacing {your-id} with the one you created earlier). Select a region close to your location and then select Review + create at the bottom:
Figure 1.6 – Creating a resource group

Figure 1.6 – Creating a resource group

  1. Once it passes validation, click on the Create button at the bottom of the page.
  2. After your new resource group has been created, select Resource groups in the menu on the left. You should see the resource group you just created in the list. Select your resource group from this list.
  3. At the top of the resource group page, select the + Create button. This brings you back to the Azure Marketplace. Search for and create an IoT hub. Name the hub iothub-{your-id}. Select the same region as that of the resource group you created.
  4. Select Review and create at the bottom of the page. Once it passes validation, select Create. Once it is created, click the Go to resource button.
  5. Investigate the features of the IoT hub using the left-side menu.
  6. From the menu on the left, select Devices. On the Devices page, select Add Device.
  7. Name the device device01, leave the rest of the settings as the defaults, and select Save:
Figure 1.7 – Creating an IoT device

Figure 1.7 – Creating an IoT device

  1. You may have to refresh the page to see the device just created in the device list. Once the device has been created, select it from the list. Copy and save the Primary connection string value for the device.
  2. In order to simulate a device, we are going to use the Raspberry Pi Azure IoT simulator. You can get access to it by going to https://azure-samples.github.io/raspberry-pi-web-simulator/.
  3. Go to line 15 in the code and paste the device connection string you copied earlier:
Figure 1.8 – Updating the connection string

Figure 1.8 – Updating the connection string

  1. Select Run and verify messages are being sent.
  2. Go back to the Azure portal and navigate to your IoT hub. On the Overview page, verify that you are getting signals from the simulated device. From the list labeled Show data for last, select 1 Hour:
Figure 1.9 – Verifying messages in the IoT hub

Figure 1.9 – Verifying messages in the IoT hub

  1. Once satisfied you are getting signals, stop the simulated device and close the web page.

Now that we are done with this chapter, let’s summarize what we have learned so far and where we are going next.

Summary

In this chapter, you learned the basics of an IoT system consisting of things, insights, and actions. You should now understand in a broad sense what kind of services are needed to create an IoT system. In particular, you set up an IoT hub in Azure and verified that it was receiving data from a virtual device. In this chapter, we did not go deep into all the features of an IoT hub. The goal was to get comfortable working in the Azure portal and gain a broad view of the services that make up an IoT system. In Chapter 2, Exploring the IoT Hub Service, we will take a deeper look at the capabilities of this service.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Develop a complete IoT system in Azure with the help of hands-on examples
  • Discover how to create, secure, and manage an enterprise-wide IoT system
  • Learn how to collect, analyze, and visualize streaming data
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

With the rise of cloud-based computing, deploying IoT systems has become more cost-effective for businesses. This transformation has led to developers and architects shouldering the responsibility of creating, managing, and securing these systems, even if they are new to the IoT technology. The Azure IoT Handbook is a comprehensive introduction to quickly bring you up to speed in this rapidly evolving landscape. Starting with the basic building blocks of any IoT system, this book guides you through mobile device management and data collection using an IoT hub. You’ll explore essential tools for system security and monitoring. Following data collection, you’ll delve into real-time data analytics using Azure Stream Analytics and view real-time streaming on a Power BI dashboard. Packed with real-world examples, this book covers common IoT use as well. By the end of this IoT book, you’ll know how to design and develop IoT solutions leveraging intelligent edge-to-cloud technologies implemented on Azure.

What you will learn

Get to grips with setting up and deploying IoT devices at scale Use Azure IoT Hub for device management and message routing Explore Azure services for analyzing streaming data Uncover effective techniques for visualizing real-time streaming data Delve into the essentials of monitoring and logging to secure your IoT system Gain insights into real-time analytics with Power BI Create workflows and alerts triggered by streaming data

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details


Publication date : Dec 22, 2023
Length 248 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781837633616
Category :

Table of Contents

18 Chapters
Preface Chevron down icon Chevron up icon
Part 1: Capturing Data from Remote Devices Chevron down icon Chevron up icon
Chapter 1: An Introduction to the IoT Chevron down icon Chevron up icon
Chapter 2: Exploring the IoT Hub Service Chevron down icon Chevron up icon
Chapter 3: Provisioning Devices with the Device Provisioning Service Chevron down icon Chevron up icon
Chapter 4: Exploring Device Management and Monitoring Chevron down icon Chevron up icon
Chapter 5: Securing IoT Systems Chevron down icon Chevron up icon
Part 2: Processing the Data Chevron down icon Chevron up icon
Chapter 6: Creating Message Routing Chevron down icon Chevron up icon
Chapter 7: Exploring Azure Stream Analytics Chevron down icon Chevron up icon
Chapter 8: Investigating IoT Data with Azure Data Explorer Chevron down icon Chevron up icon
Chapter 9: Exploring IoT Edge Computing Chevron down icon Chevron up icon
Part 3: Processing the Data Chevron down icon Chevron up icon
Chapter 10: Visualizing Streaming Data in Power BI Chevron down icon Chevron up icon
Chapter 11: Integrating Machine Learning Chevron down icon Chevron up icon
Chapter 12: Responding to Device Events Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.