Internet of Things from Scratch - Renaldi Gondosubroto - E-Book

Internet of Things from Scratch E-Book

Renaldi Gondosubroto

0,0
29,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Develop the skills essential for building Internet of Things solutions with this indispensable guide. In an era where industries heavily rely on IoT, this book will quickly familiarize you with its foundations, widespread use, implementation guided by best practices, and the crucial technologies that allow it to work effectively.
Starting with the use of IoT in real-life scenarios, this book offers comprehensive insights into basic IoT hardware, protocols, and technologies. You’ll then learn about architecting and implementing solutions such as wireless sensor networks, cloud computing with AWS, and crucial security considerations. You’ll understand how these systems are operated and monitored over time and work with simple to complex, industry-grade systems, adhering to best practices.
In later chapters, you’ll be apprised of future IoT trends and strategies to manage the risks and opportunities that come with them. You’ll also get to grips with a diverse set of tools, including hardware such as ESP32 and Raspberry Pi, and software such as Mosquitto and ChatGPT for generative AI capabilities.
By the end of this IoT book, you’ll be able to independently build and design complex, industry-standard solutions fully aligned with best practices.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 609

Veröffentlichungsjahr: 2024

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Internet of Things from Scratch

Build IoT solutions for Industry 4.0 with ESP32, Raspberry Pi, and AWS

Renaldi Gondosubroto

Internet of Things from Scratch

Copyright © 2024 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Preet Ahuja

Publishing Product Manager: Surbhi Suman

Book Project Manager: Ashwin Dinesh Kharwa

Senior Editor: Mohd Hammad

Technical Editor: Irfa Ansari

Copy Editor: Safis Editing

Proofreader: Safis Editing

Indexer: Subalakshmi Govindhan

Production Designer: Vijay Kamble

DevRel Marketing Coordinator: Rohan Dobhal

First published: February 2024

Production reference: 1190124

Published by Packt Publishing Ltd.

Grosvenor House

11 St Paul’s Square

Birmingham

B3 1RB, UK

ISBN 978-1-83763-854-3

www.packtpub.com

Contributors

About the author

Renaldi Gondosubroto is an accomplished software engineer and developer advocate in the tech community. With a wealth of experience in developing proprietary and open-source solutions, he has made significant contributions to numerous organizations and communities. Currently, he holds all 12 AWS certifications, along with 20 Microsoft Azure certifications. He has a Bachelor of Science in Computing and Software Systems from the University of Melbourne and a Master of Science in Computer Science from Columbia University. Outside of the industry, he is active in the academic community, with his research focused on IoT and Artificial Intelligence. Having spoken at over 40 events, conferences, and workshops, he has been an international speaker for the past six years, sharing his experiences and projects. He aims to build open-source solutions and deliver content that can help people achieve more value in what they do and promote best practices for practitioners.

About the reviewers

Jun Wen, the founder of AI Discovery Academy, is a highly accomplished expert in the wireless, IoT, and AI domains. He has had a successful career spanning over 20 years in the fields of 4G/LTE, 5G, Wi-Fi, LoRaWAN, industrial IoT, and robotics. Jun has held senior product lead positions at Fortune 500 companies such as Amazon, Cisco, and Motorola. He holds a master of science degree from Brown University and is an AWS Certified Solutions Architect – Professional. Jun is passionate about crafting IoT innovations using Arduino, Raspberry Pi, RISC-V, and the AWS cloud. In his new career chapter at AI Discovery Academy, he is dedicated to course instruction for students, allowing them to learn and practice AI through a series of interesting engineering projects.

Dheerendra Panwar is a seasoned professional in the field of IoT, with over 10 years of experience. He earned his master’s degree in embedded electrical and computer systems from San Francisco State University, further fortifying his expertise in the domain. Throughout his career, he has contributed significantly to various IoT projects, ranging from manufacturing and smart cities to the retail and energy sectors. Having worked at both large organizations and start-ups, he possesses a comprehensive understanding of the intricacies of IoT/edge technologies and their practical applications.

Table of Contents

Preface

Part 1: Getting Started with the Internet of Things

1

An Introduction to IoT Architecture, Hardware, and Real-Life Applications

Technical requirements

What is IoT?

The vision of the IoT

The evolution of the IoT

The four pillars of IoT

Setting up the development environment of the book

Setting up your Arduino IDE environment

Setting up your GitHub repository

Choosing between IoT hardware

Data acquisition

Data processing and storage

Connectivity

Power management

Designing a simple IoT system diagram

A high-level design flow for a smart lightbulb

A high-level design flow for AWS

Defining systems and processes for smart objects

Defining a problem

The three-step model for working on IoT systems

Creating the flow

Practical exercise – creating a mini weather station

Hardware

Working with the BME680

ESP32 Wi-Fi auto-configuration

ESPAsync_WiFiManager installation

ESP32 programming OTA with a web server and mDNS

ESP32 reading the BME680 sensor

Summary

Further reading

2

Understanding and Designing IoT Networks

Technical requirements

Understanding the fundamentals of network design

Ranges

Topology

Understanding the seven-layer architecture of IoT

Defining the design of an IoT network

Defining what constitutes a smart object

The components of a generic IoT network

Putting it together

Designing wired and wireless IoT networks

Wired and wireless networks

Cellular networks

Machine-to-machine IoT networks

Other IoT networks

Practicing forming your own networks

Practical – creating a Raspberry Pi Wi-Fi extender

Hardware setup

Coding it up

Summary

Further reading

3

Integrating Application Protocols

Technical requirements

Installing Mosquitto

Installing Client for URL (cURL)

Application protocols and they fit into the picture

The different types of application protocols

An exercise to create a pub/sub MQTT broker

Requirements for application protocols

Reliability

Power usage

Security

Integrating application protocols into the design

A simple integration into the smart thermostat network

A cloud scenario

Multiple clients

Practical – creating an MQTT pub and sub communication between an ESP32 and a Raspberry Pi

Setting up Mosquitto as the broker on Raspberry Pi

Subscribing and publishing from MQTTX

Summary

Further reading

4

Examining Communication and Connectivity Technologies

Technical requirements

The role of short- and long-range protocols within IoT

Design factors

Long-range communication protocols

Allocating resources

Infrastructure protocols

Mesh networking, RFID, and Bluetooth

RFID

Mesh networking

Bluetooth

Examining edge cases for protocol selection and operation

Understanding the fundamental rules of architecting for different areas

A look at a water utility IoT network

Practice forming more networks

Practical scenario – working with multiple communication protocols with ESP32

Making the connections

Summary

Further reading

Part 2: Developing and Optimizing IoT Systems for Smart Environments

5

Realizing Wireless Sensor Networks within Smart Spaces

Technical requirements

Choosing between different sensor technologies

Classes of sensor networks

Routing for WSNs

Design considerations

Architecting the hardware and software

Managing APIs

How they integrate within the system

Types of APIs

Evaluating WSNs

Metrics

Models of delivery

A case study

Practical scenario – step-by-step smart energy monitoring and management system

Requirements

Connection diagram

Setting up and connecting the hardware

Configuring the connection for the access point

Summary

Further reading

6

Creating Applications on the Edge

Technical requirements

TensorFlow

Edge computing fundamentals and its benefits for IoT

Edge computing architecture

Benefits of edge computing

A sample edge computing exercise

Requirements of IoT for edge computing

Resource management

The three laws of IoT

Optimizing edge computing on networks

Strategies for optimizing edge computing workloads

Evaluating edge networks

Smart city case study

Practical – smart traffic control with edge computing

Assembling the circuit

Writing the code

Testing the system

Summary

Further reading

7

Working with Cloud Computing to Power IoT Solutions

Technical requirements

Setting up your AWS account

Fundamentals of cloud computing with IoT

The main advantages of cloud computing

Cloud computing deployment models

Services to work with for IoT

Identity Access Manager (IAM)

Amazon Elastic Compute Cloud (Amazon EC2)

AWS IoT Core

AWS IoT Greengrass

AWS IoT SiteWise

AWS Lambda

Amazon Simple Queue Service (SQS)

Amazon Simple Notification Service (SNS)

Other notable AWS services for IoT

A practical exercise utilizing the services

Optimizing for resilience and low latency

A simple architecture

Evaluating your solution

Practical—creating a cloud proximity detector

Assembling the circuit

Writing the code

Testing the installation

Troubleshooting and optimization

Summary

Further reading

8

Designing for Interoperability

Technical requirements

The Telegram app

The current state of IoT platforms and their interoperability

Defining interoperability in IoT

Why interoperate?

Costs and trade-offs of interoperability

ESP32-H2

Interoperability concept, approaches, and principles for building with IoT

Concepts, approaches, and principles

Types of interoperability

Layers of IoT

Architecting for interoperability

Projects working toward greater interoperability

Global interoperability

Interoperability within the cloud

E-health platform case study

Advancing the interoperability of IoT platforms

Practical – Creating a Telegram household motion detector

Creating a chatbot

Getting a Telegram user ID

Working with the Arduino IDE

Hardware setup

Coding it up

Outcome

Summary

Further reading

Part 3: Operating, Maintaining, and Securing IoT Networks

9

Operating and Monitoring IoT Networks

Technical requirements

Continuous operation of IoT systems

Challenges and benefits of maintaining continuous operation

Strategies for achieving continuous operation

Automation and machine learning in monitoring

Exercise on simulating monitoring networks

Setting KPIs and the metrics for success

Setting clear objectives and goals for monitoring

Different types of KPIs

Selecting, analyzing, and monitoring KPIs

Monitoring capabilities on-premises and on the cloud

Monitoring for security purposes

Creating a unified monitoring solution

Practical – operating and monitoring a joke creator with IoT Greengrass

Setting up your OpenAI account

Spinning up an Amazon EC2 instance

Configure AWS Greengrass on Amazon EC2

Monitoring the EC2 Thing when publishing messages

Summary

Further reading

10

Working with Data and Analytics

Technical requirements

Introduction to data analysis at scale

Data analysis on AWS

AWS services

Analysis on the cloud and outside

Third-party data services

Designing AWS flow diagrams with data analysis

Practical – smart home insights with AWS IoT Analytics

Industrial data analytics

Evaluating performance

Use cases within industry

A case study for data analytics

Practical – creating a data pipeline for end-to-end data ingestion and analysis

Creating a channel

Creating a data store

Creating a pipeline

Ingesting data

Monitoring ingested data

Creating a dataset from the data

Summary

Further reading

11

Examining Security and Privacy in IoT

Technical requirements

The current state of risk and security within IoT

Challenges within security on IoT networks

Security recommendations

Security and privacy controls within the cloud management landscape

Types of attacks

Security on AWS

Automated security remediation with AWS IoT Device Defender

Risk management within the IoT landscape

Threat modeling for IoT systems

Security controls

IR

Privacy and compliance within IoT networks

Cryptography controls for the IoT landscape

Schneider Electric’s implementation of an IoT solution security architecture

Practical – Creating a secure smart lock system

Materials

Part 1 – Setting up the Arduino board and RFID reader

Part 2 – Arduino code for encrypted RFID communication

Part 3 – AWS server-side setup

Configuring the Lambda function to be triggered by AWS IoT Core

Updating the Arduino code to receive the authentication result from AWS IoT Core

Summary

Further reading

12

Exploring and Innovating with Open Source IoT

Technical requirements

Introduction to community innovations within IoT

Open source as a standard

Open source as a culture

Why contribute to the community?

Guiding principles of open source

Structure of an open source project

Finding a project to contribute to

Contributing to projects

Continuing to manage contributions

Current focus areas in the community

Top focus areas

Open source technologies

A case study on an open source project

Building and maintaining a repo for open source IoT

Establishing guidelines for the project

Best practices for maintaining your open source repo

Your open source project

Practical – taking advantage of open source IoT for your use case

Required tools and technologies

Delving into open source

Summary

Further reading

Part 4: Delving into Complex Systems and the Future of IoT

13

Developing IoT Solutions for Digital Transformation within Industry 4.0

Technical requirements

Bringing IoT into the organization

Challenges within an organizational context

Overcoming organizational barriers

Digital transformation and building a smart ecosystem for work

Framework for digital transformation

Smart ecosystem

Step 1 – grasping the fundamental components of a long-term environment

Step 2 – selecting suitable collaborators, aiming for a diverse mix of partners in the platform-driven environment

Step 3 – establishing business growth units to oversee the intricate environment and maintain flexibility

Practical exercise – GPS tracking with the ESP32

Working with partners on IIoT

Selecting partners

Maintaining partnerships

Navigating Industry 4.0 risks and opportunities

Risks

Opportunities

A few best practices for a digital transformation within IoT

A case of digital transformation of healthcare within a smart city

A case of implementing security measures in IIoT

Benefits

Learnings

Practical – smart garden system with open source IoT

Required tools and technologies

Setting up the hardware for the project

Setting up the software for the project

Summary

Further reading

14

Architecting Complex, Holistic IoT Environments

Technical requirements

Navigating complex hybrid deployments for IoT

Introduction to Microsoft Azure

Architecting for a hybrid deployment

Architecting for a multi-cloud hybrid deployment

Threats and risks to complex IoT environments

Threats and risks

Managing threats and risks

Case study – a multi-cloud architecture supporting Volkswagen’s IoT operations

Practical – building a smart inventory management system with multi-cloud architecture

Materials required

Setting up ESP32 and BME680

Setting up the Arduino IDE

Setting up AWS IoT Core for usage

Setting up Azure IoT Central for usage

Building the inventory management system

Uploading the Arduino sketch and running ESP32

Summary

Further reading

15

Looking Ahead into the Future of IoT

Technical requirements

The next 5 years of IoT – what next?

Common trends and challenges

The future of smart businesses with IoT

Key areas of the future of smart businesses

Case study of Amazon

Challenges in the continued big data trend

IoT best practices – dos and don’ts

Dos

Don’ts

IoT sustainability

Aligning IoT practices with sustainable development goals

What to do for IoT sustainability?

Practical – Creating an IoT-integrated Amazon Bedrock RAG web application

Setup for the working directory

Coding up the HTML landing page

Coding up the RAG capability of the site

Testing the application

Summary

Further reading

Index

Other Books You May Enjoy

Part 1: Getting Started with the Internet of Things

In this part, we embark on a journey to explore the realm of the Internet of Things (IoT). Starting with an in-depth understanding of the IoT architecture, its hardware components, and real-world applications, we transition into the intricacies of designing robust IoT networks. Our focus will then shift to the application protocols that empower these devices, followed by a deep dive into the communication and connectivity technologies that bind them together. Throughout these chapters, you’ll be guided by practical examples using the ESP32 and its associated kit, offering a hands-on approach to grasp the foundational knowledge and lay the groundwork for more extensive IoT projects.

This part has the following chapters:

Chapter 1, An Introduction to IoT Architecture, Hardware, and Real-Life ApplicationsChapter 2, Understanding and Designing IoT NetworksChapter 3, Integrating Application ProtocolsChapter 4, Examining Communication and Connectivity Technologies