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
$44.99
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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Black & white paperback book shipped to your address
Product feature icon Download this book in EPUB and PDF formats
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
Buy Now

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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Black & white paperback book shipped to your address
Product feature icon Download this book in EPUB and PDF formats
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
Buy Now

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 the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela