Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Presentation

Raspberry Pi and MQTT Essentials

Rating
-
Sold
-
Pages
242
Uploaded on
18-07-2024
Written in
2015/2016

"Book Description The future of IoT has the potential to be limitless. Wouldn''''t it be great if you could add it to your own technological stacks? But where to start? With the basics, of course. In this book, you will start by learning about the most popular hardware and communication protocol, Raspberry Pi and MQTT. You will see how to use them together by setting up your own MQTT server on Raspberry Pi and understand how it works. This book explores MQTT in detail, including the clients and devices that you can connect to your server. You will discover two very popular IoT development boards among project developers: the ESP8266 and ESP32 development boards. Then, you will learn how to build interactive dashboards on your Pi and monitor your client devices. The book also shows you how to build a dashboard using another popular software – Node-RED. You will be able to put your skills to the test by creating two full-scale projects. That''''s not all: you will also learn how to host your own MQTT server on a virtual cloud service. Finally, you will be guided on how to move forward from here, what technologies to learn, and some project recommendations to polish or test your knowledge. By the end of this book, you will be able to build meaningful projects using Raspberry Pi and MQTT and create dashboards for your projects on Node-RED. What you will learn Configure and use a Raspberry Pi for IoT projects Implement the MQTT communication protocol for projects Understand how to set up the NodeMCU and ESP32 boards as MQTT clients Control a NodeMCU board through a Node-RED dashboard hosted on Raspberry Pi Get LAMP server, Home Assistant, and MariaDB on the Raspberry Pi Set up an online MQTT broker on a cloud service or enterprise service provider platform Build full-scale, end-to-end prototype projects"

Show more Read less
Institution
Course

Content preview

,Preface
The future of IoT has the potential to be limitless. By 2025, it is estimated that there will be more
than 21 billion IoT devices. So, wouldn’t it be great if you could add these to your known
technological stacks? But where to start? Of course, with the basics.

First, we will learn about the most popular hardware used for IoT prototyping, the Raspberry Pi.
Then, we will learn what MQTT, one of the most used communication protocols for
communicating between devices, is. We will then explore why these are the most suitable options
to get started, their advantages, and how they are currently being used in the industry. Then, you
will see how to use them together by setting up your very own MQTT Server on the Raspberry Pi
and understanding how it works. We will get into the details of MQTT and learn more about the
clients or devices we will connect to our server. In particular, we will cover two very popular IoT
development boards among project developers: ESP8266 and ESP32. You will also learn how to
build interactive dashboards on your Pi and control or monitor your client devices. You will build
the dashboards using another popular software – Node-RED.

You will then put your theory into practical use by creating two full-scale projects: an IoT weather
station and a smart relay system. That’s not all; you will also learn how to host your very own
MQTT server on a virtual cloud service. Then you will be guided on the next steps to take after
reading this book, what technologies to learn along with some useful project recommendations.
Finally, we will cover the popular cloud platforms (AWS and GCP) to create IoT projects and also
create a project where we connect our Node MCU to AWS IoT.


Who this book is for
This book is suitable for a wide range of audiences. Particularly, this book is targeted at students
who want to start building IoT projects, educators who want to teach an introductory IT course,
technology enthusiasts, and IoT and hardware developers.


What this book covers
Chapter 1, Introduction to Raspberry PI and MQTT, provides an introduction to the hardware we
will be using, the Raspberry Pi. Moreover, it will also cover the basics of MQTT and how the
communication protocol actually works. Next, we will learn to set up the Raspberry Pi. This
includes installing the popular Debian-based Raspberry Pi OS on our Raspberry Pi. After that, we
will install the necessary libraries and packages to make our device a local MQTT broker.

Chapter 2, MQTT in Detail, covers how exactly MQTT works. This includes a gentle introduction
to MQTT brokers and clients, and different MQTT control packets will be covered in detail.
Finally, we will see a demonstration of how a client connects and communicates with a broker.

,Chapter 3, Introduction to ESP Development Boards, is all about implementing what we learned
in the previous chapter. It will first introduce you to the popular ESP development boards –
NodeMCU and ESP32. After covering the specifications of each board, we will move on to learn
how to set up the boards as an MQTT client. Finally, we will create our first project wherein we
will connect to our Raspberry Pi’s MQTT broker and control the onboard LED through MQTT.

Chapter 4, Node-RED on Raspberry Pi, gets you acquainted with very popular software for the
Raspberry Pi – Node-RED. It is divided into four sections. First is an introduction to Node-RED,
followed by a guide to installing and setting up Node-RED on Raspberry Pi. After that, we will
cover the Node-RED MQTT and dashboard components, and then create a simple project to
implement everything we have learned.

Chapter 5, Major Project 1: IoT Weather Station, is where, now that we have the knowledge from
all the topics discussed in the previous chapters, we will be working on our first major project:
making an IoT weather station. This chapter provides step-by-step instructions on how to build
this.

Chapter 6, Major Project 2: Smart Home Control Relay System, helps you create a smart home
device to control wall switches using the Node-RED dashboard hosted on the Raspberry Pi. The
device will be based on the popular ESP32 development board. For this project, we will be
preparing a PCB instead of creating the circuit on a breadboard for a more finished and professional
look.

Chapter 7, Taking Your MQTT Broker Global, is where we will discuss the advantages of having
an online MQTT broker further, and two major options that we currently have to achieve these
advantages. We can still use the local broker on our Pi, but we can route all the data to any
destination through the internet.

Chapter 8, Project Prototype to Product, How?, starts by exploring IoT services provided by some
popular cloud services, such as AWS and GCP, now that the book has covered all the essentials
required to get you familiar with all the concepts related to Raspberry Pi and MQTT. We will even
create a project demo integrating our Node MCU board with AWS IoT.


To get the most out of this book
This book has been written for beginners, so in terms of knowledge, there are no prerequisites. As
for the hardware, you will need all the hardware devices listed in the following table in order to
follow along and build projects with me. In terms of software requirements, you will need the
Raspberry Pi Imager software (available for all three major operating systems) to create flashed
SD cards for your Pi (it even supports SD card formatting), Wireshark on the Raspberry Pi OS to
dissect the MQTT control packets, and Node-RED as a dashboard interface for our projects, also
to be installed on Raspberry Pi OS.

, Part 1:Covering the Basics
After completing this section, you will know all about Raspberry Pi, MQTT, NodeMCU, ESP32
development boards, and Node-RED. You will gain the knowledge required to build intermediate-
complexity projects.

This part comprises of the following chapters:

 Chapter 1, Introduction to Raspberry PI and MQTT
 Chapter 2, MQTT in Detail
 Chapter 3, Introduction to ESP Development Boards
 Chapter 4, Node-RED on Raspberry Pi


1
Introduction to Raspberry Pi and MQTT
In recent years, the Internet of Things (IoT) has been a trending field for research and
development. The future of IoT has the potential to be limitless. By 2025, it is estimated that there
will be more than 21 billion IoT devices. So, wouldn’t it be great if you could add these to your
known technological stacks? In this book, we will start with the absolute basics.

I will walk you through two fascinating subjects throughout this book: Raspberry Pi, which is a
prevalent development board for beginners, and MQTT, a very commonly used and robust
communication protocol to delve into the world of IoT.

This chapter will introduce you to the basics of MQTT and Raspberry Pi. Moreover, it will help
you set up your Raspberry Pi. Although simple, it is crucial to perform each step as this will help
us set up our own local MQTT broker on the Raspberry Pi. This will also help you understand
how to get started with your new Raspberry Pi by installing an operating system onto it.

First, we will flash the popular Debian-based Raspberry Pi OS on our Raspberry Pi. After that, we
will install all the necessary libraries and packages to make our device a local MQTT broker.

We will cover the following main topics in this chapter:

 What is MQTT and how does it work?
 A gentle introduction to Raspberry Pi

Written for

Course

Document information

Uploaded on
July 18, 2024
Number of pages
242
Written in
2015/2016
Type
PRESENTATION
Person
Unknown

Subjects

$4.79
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
RobertCuong

Get to know the seller

Seller avatar
RobertCuong Telecommunication
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
225
Last sold
-
GPON and WiFi

+ SDH solution based on Fujitsu/Alcatel/Huawei devices in deployment and troubleshoot + Switching and Routing network fundamental and advance + GPON solution with deep knowledge of PLOAM/OMCI, activation procedure. Analysis of Private/Public OMCI + WiFi solution with WiFi Management/Control/Data. WiFi bandsteering, WiFi mesh, and WiFi 6, 6E, 7, ...

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions