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! 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
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Azure IoT Development Cookbook
Azure IoT Development Cookbook

Azure IoT Development Cookbook: Develop and manage robust IoT solutions

eBook
€23.99 €26.99
Paperback
€32.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 Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Azure IoT Development Cookbook

Introducing Device Management

In this chapter, you will learn the following recipes:

  • Device registry operations
  • Device twins
  • Device direct methods
  • Device jobs
  • IoT Hub query explorer

Introduction

Azure IoT Hub has capabilities that can be used by a developer to build robust device management. There could be different use cases or scenarios across multiple industries, but these device management capabilities, their patterns, and the SDK code remains the same, saving significant time in developing and managing, along with maintaining millions of devices.

Device management will be the central part of any IoT solution. The IoT solution helps users to manage devices remotely, take actions from cloud-based applications such as disable, update data, run any command, and firmware updates.

In this chapter, we are going to perform all these tasks for device management, and we will start with creating the device.

Understanding IoT Hub endpoints

...

Device registry operations

This sample application is focused on device registry operations and how they work. We will create a console application as our first IoT solution and look at the various device management techniques.

Getting ready

Let's create a console application to start with IoT:

  1. Create a new project in Visual Studio:
Create a console application
  1. Add the IoT Hub connectivity extension in Visual Studio:
Add the extension for IoT Hub connectivity
  1. Now, right-click on the Solution in Visual Studio, navigate to Add, and select Connected Services.
  2. Select Azure IoT Hub and click on Add.
  3. Now, select the Azure subscription from the dropdown, followed by which you will get a list of the IoT Hub service parts...

Device twins

Firstly, we need to understand what a device twin is. We will be following some steps to use a device twin to understand their purpose and where we can use the device twin in any IoT solution. The device twin is a JSON formatted document that describes the metadata, properties of any device created within IoT Hub. It describes the individual device specific information.

The device twin is made up of: tags, desired properties, and reported properties. The operations that can be done on an IoT device is to update the data or query for any IoT device. this feature can be built into the IoT Solution from where a Administrator user can initiate these.

Tags hold the device metadata that can be accessed from an IoT solution only. The desired properties are set from the IoT solution and can be accessed on the device. Whereas the reported properties are set on the device and...

Device direct methods

Azure IoT Hub provides fully managed bidirectional communication between the IoT solution on the backend and the IoT devices in the fields. We will be considering detailed message communication in Chapter 3, IoT Hub Messaging and Commands.

When there is a need for an immediate communication result, a direct method best suits these scenarios. Let's take an example of a home automation system. One needs to control the AC temperature or turn the faucet showers on/off. It uses the HTTP protocol for method invocation.

How to do it...

The following steps will be taken to perform a direct method with an IoT device connected with IoT Hub:

  1. Invoke this method from the application:
public async Task<CloudToDeviceMethodResult...

Device jobs

In a typical scenario, the device administrator or operators are required to manage devices in bulk. In the earlier sections, we looked at the device twin, which maintains properties and tags. Conceptually, the job is nothing but a wrapper on the possible actions, which can be done in bulk.

Suppose we have a scenario in which we need to update the properties for multiple devices; in such a case, one can schedule the job and track the progress of the job. I would like to set the frequency to send the data every 1 hour instead of every 30 minutes for 1000 IoT devices. Another example could be to reboot multiple devices at the same time.

Device administrators can perform device registrations in bulk using the export and import methods.

How to do it...

...

IoT Hub query explorer

IoT Hub supports a SQL-like language to retrieve information regarding device twins, jobs, and message routing. Basically, you can write a basic SQL command and that will be executed against the device registry.

Each query follows the syntax like SQL; it has the standard SELECT, FROM, and WHERE keywords used to retrieve the result set in the result window.

How to do it...

In this section, we will follow the steps to use the query explorer and retrieve the device information in the results window:

  1. we will select the IoT Hub IoTHubCookBook service from the Azure portal.
  2. Select Query Explorer:
  1. Using the execution windows, type the query you want to execute:
  1. The output will be shown in the result...
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • •Build secure and scalable IoT solutions with Azure IoT platform
  • •Learn techniques to build end to end IoT solutions leveraging the Azure IoT platform
  • •Filled with practical recipes to help you increase connectivity and automation across IoT devices

Description

Microsoft’s end-to-end IoT platform is the most complete IoT offering, empowering enterprises to build and realize value from IoT solutions efficiently. It is important to develop robust and reliable solutions for your organization to leverage IoT services. This book focuses on how to start building custom solutions using the IoT hub or the preconfigured solution of Azure IoT suite. As a developer, you will be taught how to connect multiple devices to the Azure IoT hub, develop, manage the IoT hub service and integrate the hub with cloud. We will be covering REST APIs along with HTTP, MQTT and AMQP protocols. It also helps you learn Pre-Configured IoT Suite solution. Moving ahead we will be covering topics like:-Process device-to-cloud messages and cloud-to-device messages using .Net-Direct methods and device management-Query Language, Azure IoT SDK for .Net-Creating and managing, Securing IoT hub, IoT Suite and many more. We will be using windows 10 IoT core, Visual Studio, universal Windows platform. At the end, we will take you through IoT analytics and provide a demo of connecting real device with Azure IoT.

Who is this book for?

If you are an application developer and want to build robust and secure IoT solution for your organization using Azure IoT, then this book is for you.

What you will learn

  • • Build IoT Solutions using Azure IoT & Services
  • • Learn device configuration and communication protocols
  • • Understand IoT Suite and Pre-configured solutions
  • • Manage Secure Device communications
  • • Understand Device management, alerts
  • • Introduction with IoT Analytics, reference IoT Architectures
  • • Reference Architectures from Industry
  • • Pre-Configured IoT Suite solutions

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 11, 2017
Length: 254 pages
Edition : 1st
Language : English
ISBN-13 : 9781787280090
Vendor :
Microsoft
Category :
Languages :
Tools :

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 Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 11, 2017
Length: 254 pages
Edition : 1st
Language : English
ISBN-13 : 9781787280090
Vendor :
Microsoft
Category :
Languages :
Tools :

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

Frequently bought together


Stars icon
Total 111.97
Azure IoT Development Cookbook
€32.99
Azure for Architects
€36.99
Serverless computing in Azure with .NET
€41.99
Total 111.97 Stars icon

Table of Contents

9 Chapters
Getting Started with the Azure IoT Platform Chevron down icon Chevron up icon
Introducing Device Management Chevron down icon Chevron up icon
IoT Hub Messaging and Commands Chevron down icon Chevron up icon
Azure IoT Communication Protocols Chevron down icon Chevron up icon
Azure IoT Hub Security and Best Practices Chevron down icon Chevron up icon
IoT Suite and Pre-Configured Solutions Chevron down icon Chevron up icon
Azure IoT Analytics Chevron down icon Chevron up icon
Using Real Devices to Connect and Implement Azure IoT Hub Chevron down icon Chevron up icon
Managing the Azure IoT Hub Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(3 Ratings)
5 star 66.7%
4 star 0%
3 star 0%
2 star 33.3%
1 star 0%
Rahul Deshmukh Apr 03, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very good book
Amazon Verified review Amazon
Rakesh Oct 06, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book really looks awesome. The content is well structured with crisp content. Has a lot of practical content rather than just theory. I definitely recommend this book for novice to advanced users. Kudos.
Amazon Verified review Amazon
Brian E. Adams Apr 21, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I bought this thinking it would help with getting started in IoT vis-á-vis Azure, which is not the case...In short, it is simply a collection of randomly-organized and unexplained code snippets and screenshots of cloud components, with no useful overviews or underlying structure.Starting with meaningful articulation and even summarized architecture of the services might have made the otherwise immediate dive into vague code samples more meaningful and useful.If you’re looking for snippets, fire up a browser and search. If you’re looking for how to get started in IoT in Azure, find another source for the information.It’s not a bad read, it just has a lot of words and doesn’t really say anything...
Amazon Verified review Amazon
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.