Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Developing IoT Projects with ESP32 - Second Edition

You're reading from  Developing IoT Projects with ESP32 - Second Edition

Product type Book
Published in Nov 2023
Publisher Packt
ISBN-13 9781803237688
Pages 578 pages
Edition 2nd Edition
Languages
Author (1):
Vedat Ozan Oner Vedat Ozan Oner
Profile icon Vedat Ozan Oner

Table of Contents (15) Chapters

Preface Introduction to IoT development and the ESP32 platform Understanding the Development Tools Using ESP32 Peripherals Employing Third-Party Libraries in ESP32 Projects Project – Audio Player Using Wi-Fi Communication for Connectivity ESP32 Security Features for Production-Grade Devices Connecting to Cloud Platforms and Using Services Project – Smart Home Machine Learning with ESP32 Developing on Edge Impulse Project – Baby Monitor Other Books You May Enjoy
Index

Communicating over MQTT

Message Queue Telemetry Transport (MQTT) is a many-to-many communication protocol with a message broker as the mediator. There are publishers that send messages to the topics on the broker, and there are subscribers that receive messages from the topics that they subscribe to. A node can be a publisher and subscriber at the same time:

Figure 6.6: MQTT communication model

For MQTT, TCP is the underlying transport protocol and TLS can be configured for communication security.

Let’s see how MQTT works with a simple example. The goal in this example is to publish sensor data to an MQTT broker running in the local network and control the sensor features remotely by connecting to the broker with an MQTT client running on another machine. As listed in Technical requirements, the broker is Mosquitto. We begin with installing the broker.

Installing the MQTT broker

The mosquitto installation package comes with an MQTT broker, a publisher...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}