Mastering Internet of Things
eBook - ePub

Mastering Internet of Things

Peter Waher

Share book
  1. 410 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering Internet of Things

Peter Waher

Book details
Book preview
Table of contents
Citations

About This Book

Augment your IoT skills with the help of engaging and enlightening tutorials designed for Raspberry Pi 3About This Book• Design and implement state-of-the-art solutions for the Internet of Things• Build complex projects using motions detectors, controllers, sensors, and Raspberry Pi 3• A hands-on guide that provides interoperable solutions for sensors, actuators, and controllersWho This Book Is ForIf you're a developer or electronic engineer and are curious about the Internet of Things, this is the book for you. With only a rudimentary understanding of electronics and Raspberry Pi 3, and some programming experience using managed code, such as C# or Java, you will be taught to develop state-of-the-art solutions for the Internet of Things.What You Will Learn• Create your own project, run and debug it• Master different communication patterns using the MQTT, HTTP, CoAP, LWM2M and XMPP protocols• Build trust-based as hoc networks for open, secure and interoperable communication• Explore the IoT Service Platform• Manage the entire product life cycle of devices• Understand and set up the security and privacy features required for your system• Master interoperability, and how it is solved in the realms of HTTP, CoAP, LWM2M and XMPPIn DetailThe Internet of Things (IoT) is the fastest growing technology market. Industries are embracing IoT technologies to improve operational expenses, product life, and people's well-being. Mastering Internet of Things starts by presenting IoT fundamentals and the smart city. You will learn the important technologies and protocols that are used for the Internet of Things, their features, corresponding security implications, and practical examples on how to use them. This book focuses on creating applications and services for the Internet of Things. Further, you will learn to create applications and services for the Internet of Things. You will be discover various interesting projects and understand how to publish sensor data, control devices, and react to asynchronous events using the XMPP protocol. The book also introduces chat, to interact with your devices. You will learn how to automate your tasks by using Internet of Things Service Platforms as the base for an application. You will understand the subject of privacy, requirements they should be familiar with, and how to avoid violating any of the important new regulations being introduced.At the end of the book, you will have mastered creating open, interoperable and secure networks of things, protecting the privacy and integrity of your users and their information.Style and approachThis mastering-level guide will immerse you in the advanced functionalities of IoT, along with extending them, and finishes up with security and privacy techniques.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Mastering Internet of Things an online PDF/ePUB?
Yes, you can access Mastering Internet of Things by Peter Waher in PDF and/or ePUB format, as well as other popular books in Computer Science & Hardware. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781788397438
Edition
1

Using an Internet of Things Service Platform

As we have seen throughout the chapters of this book, developing services for the Internet of Things may often include many repetitive tasks. These relate to the architecture of the application, infrastructure, data persistence, manageability, communication framework, hosting, inter-connectivity, user interfaces, and so on. In practical applications, you also need to consider managing devices. When on a tight schedule or having limited resources, many of these tasks are omitted, or receive little attention, to cut corners.
In this chapter, you will learn how an Internet of things (IoT) service platform can help you with many of the repetitive tasks required to create a successful IoT application. This chapter covers:
  • An introduction to the IoT Gateway project
  • An overview of its architecture
  • An introduction to its hardware abstraction layer
  • Management through its XMPP architecture
  • How to create services
  • How to interface things
  • Using its databases and persistence layer
  • Understanding the hosting environment
  • An introduction to its security infrastructure

Understanding the IoT Gateway project

An IoT service platform can help you with many of the repetitive tasks required when creating an IoT service or device. It also provides you with an abstraction layer for devices and gives you support for many IoT-related protocols. By using such a platform as the base for your application, many of those repeated programming tasks can be eliminated, or wholly or partially automated and solved. This leaves you to focus on what you really want to do: develop functionality. This approach drastically increases productivity and shortens development cycles, which can be used to either increase functionality or quality, or to decrease development costs. Furthermore, it improves interoperability, increases security, and makes it simpler to manage massive amounts of things in large networks, since many of these aspects are already integrated into the platform.
For these reasons, this chapter is dedicated to the study of one such IoT platform: the WaherIoT Gateway. We have already used parts of the gateway in earlier chapters, when we used some of its libraries for communication, persistence, and so on.

Running the IoT Gateway

The IoT Gateway can be run as a standalone application, without any modification. There are different encapsulations of the IoT Gateway already prepared. They are built using the same code, but have different properties and are aimed at different operating systems. Since all libraries used are based on .NET Standard, they are portable across platforms and operating systems. The encapsulations are then compiled into .NET Core 2 applications. These are the ones being executed. Since both .NET Standard and .NET Core 2 are portable, the gateway can therefore be encapsulated for more operating systems than currently supported.
Check out this link for a list of operating systems supported by .NET Core 2: https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0-supported-os.md
Available encapsulations such as installers or app package bundles are listed in the following table. For each one is listed the start project that can be used if you build the project and want to start or debug the application from the development environment:
Platform
Executable project
Windows console
Waher.IoTGateway.Console
Windows service
Waher.IoTGateway.Svc
Universal Windows Platform app
Waher.IoTGateway.App
The IoT Gateway encapsulations can be downloaded from the GitHub project page: https://github.com/PeterWaher/IoTGateway#iot-gateway
All gateways use the library Waher.IoTGateway, which defines the executing environment of the gateway and interacts with all pluggable modules and services. They also use the Waher.IoTGateway.Resources library, which contains resource files common among all encapsulations.
The Waher.IoTGateway library is also available as a NuGet: https://www.nuget.org/packages/Waher.IoTGateway/

Running the console version

The console version of the IoT Gateway (Waher.IoTGateway.Console) is the simplest encapsulation. It can be run from the command line. It requires some basic configuration to run properly. This configuration can be provided manually (see following sections), or by using the installer. The installer asks the user for some basic information and generates the configuration files necessary to execute the application.
The console version is the simplest encapsulation, with a minimum of operating system dependencies. It's the easiest to port to other environments. It's also simple to run from the development environment. When run, it outputs any events directly to the terminal window. If sniffers are enabled, the corresponding communication is also output to the terminal window.
This provides a simple means to test and debug encrypted communication:
IoT Gateway console application

Running the gateway as a Windows service

The IoT Gateway can also be run as a Windows service (Waher.IoTGateway.Svc). This requires the application be executed on a Windows operating system. The application is a .NET Core 2 console application that has command-line switches allowing it to be registered and executed in the background as a Windows service. Since it supports a command-line interface, it can be used to run the gateway from the console as well. The following table lists recognized comm...

Table of contents