Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
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

Arrow left icon
Profile Icon Dan Clark
Arrow right icon
$24.99 $35.99
Book Dec 2023 248 pages 1st Edition
eBook
$24.99 $35.99
Print
$44.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Dan Clark
Arrow right icon
$24.99 $35.99
Book Dec 2023 248 pages 1st Edition
eBook
$24.99 $35.99
Print
$44.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$24.99 $35.99
Print
$44.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon AI Assistant (beta) to help accelerate your learning
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
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

Product Details

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

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon AI Assistant (beta) to help accelerate your learning
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Table of Contents

18 Chapters
Preface Chevron down icon Chevron up icon
1. Part 1: Capturing Data from Remote Devices Chevron down icon Chevron up icon
2. Chapter 1: An Introduction to the IoT Chevron down icon Chevron up icon
3. Chapter 2: Exploring the IoT Hub Service Chevron down icon Chevron up icon
4. Chapter 3: Provisioning Devices with the Device Provisioning Service Chevron down icon Chevron up icon
5. Chapter 4: Exploring Device Management and Monitoring Chevron down icon Chevron up icon
6. Chapter 5: Securing IoT Systems Chevron down icon Chevron up icon
7. Part 2: Processing the Data Chevron down icon Chevron up icon
8. Chapter 6: Creating Message Routing Chevron down icon Chevron up icon
9. Chapter 7: Exploring Azure Stream Analytics Chevron down icon Chevron up icon
10. Chapter 8: Investigating IoT Data with Azure Data Explorer Chevron down icon Chevron up icon
11. Chapter 9: Exploring IoT Edge Computing Chevron down icon Chevron up icon
12. Part 3: Processing the Data Chevron down icon Chevron up icon
13. Chapter 10: Visualizing Streaming Data in Power BI Chevron down icon Chevron up icon
14. Chapter 11: Integrating Machine Learning Chevron down icon Chevron up icon
15. Chapter 12: Responding to Device Events Chevron down icon Chevron up icon
16. Index Chevron down icon Chevron up icon
17. Other Books You May Enjoy Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.