Programming the Internet of Things: An Introduction to Building Integrated, Device-to-Cloud IoT Solutions

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Learn how to program the Internet of Things with this hands-on guide. By breaking down IoT programming complexities in step-by-step, building-block fashion, author and educator Andy King shows you how to design and build your own full-stack, end-to-end IoT solution--from device to cloud. This practical book walks you through tooling, development environment setup, solution design, and implementation. You'll learn how a typical IoT ecosystem works, as well as how to tackle integration challenges that crop up when implementing your own IoT solution. Whether you're an engineering student learning the basics of the IoT, a tech-savvy executive looking to better understand the nuances of IoT technology stacks, or a programmer building your own smart house solution, this practical book will help you get started. • Design an end-to-end solution that implements an IoT use case • Set up an IoT-centric development and testing environment • Organize your software design by creating abstractions in Python and Java • Use MQTT, CoAP, and other protocols to connect IoT devices and services • Create a custom JSON-based data format that's consumable across a range of platforms and services • Use cloud services to support your IoT ecosystem and provide business value for stakeholders

Author(s): Andy King
Edition: 1
Publisher: O'Reilly Media
Year: 2021

Language: English
Commentary: Vector PDF
Pages: 420
City: Sebastopol, CA
Tags: Cloud Computing; Python; Java; Internet of Things; MQTT; Constrained Application Protocol; Data Management; AWS IoT

Cover
Copyright
Table of Contents
Foreword
Preface
Who Is This Book For?
To the Programmer
To the Instructor
To the Technology Manager or Executive
What Do I Need to Know?
How Is This Book Arranged?
Part I, Getting Started
Part II, Connecting to the Physical World
Part III, Connecting to Other Things
Part IV, Connecting to the Cloud
Some Background on the IoT
Complexity Redefined
Creating Value
Living on the Edge
Conclusion
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Part I. Getting Started
Chapter 1. Getting Started
What You’ll Learn in This Chapter
Defining Your System
Breaking Down the Problem
Defining Relevant Outcomes
Architecting a Solution
Setting Up Your Development and Test Environment
Step I: Prepare Your Development Environment
Step II: Define Your Testing Strategy
Step III: Manage Your Design and Development Workflow
Thoughts on Automation
Programming Exercises
Testing the Constrained Device App
Testing the Gateway Device App
Conclusion
Chapter 2. Initial Edge Tier Applications
What You’ll Learn in This Chapter
Design Concepts
Tracking Your Requirements
Programming Exercises
Add System Performance Tasks to the Constrained Device Application
Add System Performance Tasks to the Gateway Device Application
Additional Exercises
Conclusion
Part II. Connecting to the Physical World
Chapter 3. Data Simulation
What You’ll Learn in This Chapter
Simulating Sensors and Actuators
Generating Simulated Data Using a Sensor Data Generator Class
Programming Exercises
Integrating Sensing and Actuation Simulation Within Your Application Design
Representing Sensor and Actuator Data Within the Application
Create Data Containers to Support Data Collection and Actuation
Simulating Sensors
Simulating Actuators
Connecting Simulated Sensors with the Sensor Adapter Manager
Connecting Simulated Actuators with the Actuator Adapter Manager
Create and Integrate the Device Data Manager
Additional Exercises
Hysteresis Management
Conclusion
Chapter 4. Data Emulation
What You’ll Learn in This Chapter
Emulating Sensors and Actuators
Setting Up and Configuring an Emulator
The Sense-Emu Sense HAT Emulator
Programming Exercises
Integrating Sensing and Actuation Emulation Within Your Application Design
Emulating Sensors
Emulating Actuators
Connecting Emulated Sensors with the Sensor Adapter Manager
Connecting Emulated Actuators with the Actuator Adapter Manager
Additional Exercises
Threshold Management
Conclusion
Chapter 5. Data Management
What You’ll Learn in This Chapter
Data Translation and Management Concepts
Programming Exercises
Data Translation in the Constrained Device App
Data Translation in the Gateway Device App
Additional Exercises
Proactive Disk Utilization Management
Conclusion
Part III. Connecting to Other Things
Chapter 6. MQTT Integration–Overview and Python Client
What You’ll Learn in This Chapter
About MQTT
Connecting to a Broker
Message Passing
Control Packets and the Structure of an MQTT Message
Adding MQTT to Your Applications
Installing and Configuring an MQTT Broker
Programming Exercises
Create the MQTT Connector Abstraction Module
Add Callbacks to Support MQTT Events
Add Publish, Subscribe, and Unsubscribe Functionality
Integrate the MQTT Connector into Your CDA
What About Security?
Additional Exercises
Conclusion
Chapter 7. MQTT Integration–Java Client
What You’ll Learn in This Chapter
Programming Exercises
Create the MQTT Connector Abstraction Module
Add Callbacks to Support MQTT Events
Add Publish, Subscribe, and Unsubscribe Functionality
Integrate the MQTT Connector into Your GDA
What About Security and Overall System Performance?
Additional Exercises
Subscriber Callbacks
CDA to GDA Integration
Conclusion
Chapter 8. CoAP Server Implementation
What You’ll Learn in This Chapter
About CoAP
Client to Server Connections
Request Methods
Message Passing
Datagram Packets and the Structure of a CoAP Message
Putting It All Together
Programming Exercises
Add CoAP Server Functionality to the Gateway Device Application
Add CoAP Server Functionality to the Constrained Device Application (Optional)
Additional Exercises
Add More Resource Handlers
Add a Custom Discovery Service
Add Dynamic Resource Creation
Conclusion
Chapter 9. CoAP Client Integration
What You’ll Learn in This Chapter
Concepts
Programming Exercises
Add CoAP Client Functionality to the Constrained Device Application
Add CoAP Client Functionality to the Gateway Device App (Optional)
Additional Exercises
Add a Robust OBSERVE Cancel Feature
Add Support for DELETE and POST
Conclusion
Chapter 10. Edge Integration
What You’ll Learn in This Chapter
Concepts
Security Exercises
Adding TLS Support to Your MQTT Broker
Add Security Features to Your Gateway Device App MQTT Client Connector
Add Security Features to Your Constrained Device App MQTT Client Connector
Functional Exercises
Adding Business Logic to the Gateway Device App
Adding Business Logic to the Constrained Device App
Performance Testing Exercises
Additional Exercises
Add DTLS Support to Your CoAP Client and Server
Conclusion
Part IV. Connecting to the Cloud
Chapter 11. Integrating with Various Cloud Services
What You’ll Learn in This Chapter
Concepts
Programming Exercises
Add the Cloud Client and Other Related Components
Integrating with an IoT Cloud Service Provider (CSP)
Ubidots Connectivity Overview Using MQTT
AWS IoT Core Connectivity Overview Using MQTT
Additional Exercises
Analyzing and Acting on Time-Series Performance Data
Conclusion
Chapter 12. Taming the IoT
What You’ll Learn in This Chapter
IoT Ecosystem Enablers
Sample IoT Use Cases
Shared Enablers and a Common Notional Design
Use Case 1: Home Environment Monitoring and Temperature Adjustment
Use Case 2: Garden Monitoring and Water Adjustment
Use Case 3: Pond Quality Monitoring
Conclusion
Appendix A. Design Road Maps
Part I, Getting Started—Design Road Maps
Chapter 1 Designs
Chapter 2 Designs
Part II, Connecting to the Physical World—Design Road Maps
Chapter 3 Design
Chapter 4 Design
Chapter 5 Designs
Part III, Connecting to Other Things—Design Road Maps
Chapter 6 Design
Chapter 7 Design
Chapter 8 Designs
Chapter 9 Designs
Chapter 10 Designs
Part IV, Connecting to the Cloud—Design Road Maps
Chapter 11 Designs
Bibliography
Index
About the Author
Colophon