Raspberry Pi and MQTT Essentials: A complete guide to helping you build innovative full-scale prototype projects using Raspberry Pi and MQTT protocol
- Length: 272 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-09-16
- ISBN-10: 1803244488
- ISBN-13: 9781803244488
- Sales Rank: #0 (See Top 100 Books)
Get familiar with all the concepts related to Raspberry Pi and MQTT, build innovative IoT projects, and discover how to scale these projects to the next level
Key Features
- Learn some of the most popular tools used in IoT – Raspberry Pi, MQTT, ESP8266 and more
- Build exciting projects such as an IoT weather station and a smart switch board
- Discover the advantages of taking your MQTT broker global
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
Who this book is for
This book is for students who are interested in IoT and want to build projects using the available developer hardware. Educators who want to introduce a course on IoT into their curriculum, technology enthusiasts, and IoT developers who are just getting started will also benefit from this book. No prior knowledge about the two main topics that the book covers is required – Raspberry Pi and MQTT. A basic understanding of what IoT is will also be useful but not mandatory.
Raspberry Pi and MQTT Essentials Contributors About the author About the reviewer Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share Your Thoughts Part 1:Covering the Basics Chapter 1: Introduction to Raspberry Pi and MQTT What is MQTT and how does it work? What is MQTT? Basic concepts of MQTT A gentle introduction to Raspberry Pi Setting Up Your Raspberry Pi Technical requirements Setting up an SD card for your Raspberry Pi Flashing the OS image onto the SD card Setting up Raspberry Pi for the first time Setting up VNC for Raspberry Pi Setting up and testing the MQTT broker Testing the MQTT broker locally Summary Chapter 2: MQTT in Detail Introducing MQTT clients MQTT messages MQTT topics MQTT clients How does an MQTT client connect to a broker? Understanding the MQTT protocol packet structure Connect packet CONNACK packet PUBLISH and SUBSCRIBE packets Practical demonstration of MQTT in action Summary Chapter 3: Introduction to ESP Development Boards ESP8266-based NodeMCU development board Technical specifications NodeMCU GPIO pinout and pin configurations Arduino IDE setup for the NodeMCU development board ESP32-based development board Technical specifications ESP32 GPIO pinout and pin configurations Arduino IDE setup for the ESP32 development board Mini-project 1: NodeMCU as an MQTT client Part 1 – NodeMCU development board setup Part 2 – Raspberry Pi setup Summary Chapter 4: Node-RED on Raspberry Pi Introduction to Node-RED Node-RED first-time installation, setup, and demonstration Node-RED installation Running Node-RED on your Pi for the first time Node-RED crash course Node-RED MQTT components and dashboard setup Node-RED MQTT nodes Node-RED dashboard Mini project 2 – Controlling a NodeMCU LED from the Node-RED dashboard Hardware requirements Software requirements NodeMCU setup Raspberry Pi setup Summary Part 2: Practical Implementation – Building Two Full-Scale Projects Chapter 5: Major Project 1: IoT Weather Station Hardware requirements The NodeMCU development board The DHT11 temperature and humidity sensor The BMP280 temperature and pressure sensor The CCS811 air quality sensor Sensor interfacing Code explanation Raspberry Pi setup Starting Node-RED Project flow and dashboard setup Additional functionality – email alerts Summary Chapter 6: Major Project 2: Smart Home Control Relay System Hardware requirements and setup ESP32 development board 5V non-latching relay 5V Hi-Link power supply Miscellaneous components Hardware setup (PCB design and circuit) Code explanation Raspberry Pi setup Project enhancements Summary Part 3: How to Take Things Further – What Next? Chapter 7: Taking Your MQTT Broker Global Establishing the advantages of a global MQTT broker How to take your broker global Option 1 – online MQTT broker Option 2 – virtual server Summary Chapter 8: Project Prototype to Product – How? Innovative project ideas Idea 1 – Home automation system Idea 2 – air quality monitoring system IoT services provided by enterprise cloud platforms IoT cloud platforms Project – getting started with AWS IoT Core How to scale your projects using the current hardware Home Assistant LAMP Server Summary Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Raspberry Pi and MQTT Essentials: A complete guide to helping you build innovative full-scale prototype projects using Raspberry Pi and MQTT protocol
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.