Skip to content
SolderHub learning pathMessaging · Connected devices

MQTT: Connect your devices with a messaging layer built for IoT.

Learn how MQTT brokers, topics, publish/subscribe, retained messages and availability work—then build ESP32 integrations and reliable home-automation messaging.

  • Understand topics and publish/subscribe
  • Test messages before connecting hardware
  • Build device status and resilient connections

Practical guides

2 published articles currently in this path.

Hands-on projects

0 published projects available to build or study.

A connected path

Move from fundamentals to device integrations and more reliable systems.

Explore the curriculum

Guides and projects, by skill level

Published resources open normally. Draft cards are listed for planning, but their article and project pages remain unpublished until they are released.

Beginner

14 resources2 available

Build the mental model and get a first working setup before adding complexity.

ESP32 MQTT Tutorial: Publish and Subscribe with Arduino IDE
Guide
beginner· 12 min

ESP32 MQTT Tutorial: Publish and Subscribe with Arduino IDE

A complete, broker-agnostic ESP32 MQTT tutorial -- topics, QoS, retained messages, Last Will and Testament, TLS security for production, and a working publish/subscribe example with PubSubClient.

Available nowOpen
How to Use MQTT with ESP32 and Home Assistant — Complete Beginner Guide
Guide
beginner· 5 min

How to Use MQTT with ESP32 and Home Assistant — Complete Beginner Guide

MQTT is the backbone of most smart home systems. This guide shows you how to set up an MQTT broker, connect ESP32, and integrate with Home Assistant from scratch.

Available nowOpen
GuideDraft
beginner· 12 min

Control an ESP32 LED with Node-RED and MQTT

Build your first real-hardware Node-RED project: wire an LED to an ESP32, send ON/OFF commands over MQTT, and monitor device status from your flow.

Saved draftNot published
ProjectDraft
beginner· 9 min

ESP32 Plant Watering System with Soil Moisture Sensor & MQTT

Build an ESP32 automatic plant watering system that monitors soil moisture, triggers a pump, and reports data to Home Assistant via MQTT.

Saved draftNot published
GuideDraft
beginner· 15 min

Install Mosquitto on Raspberry Pi 5: Secure MQTT Broker Setup

Install Eclipse Mosquitto on Raspberry Pi 5, start the broker as a service, test publish/subscribe locally, and configure remote LAN access with explicit listeners and password authentication. Explains the Mosquitto 2.0 local-only default and safe next steps for TLS.

Saved draftNot published
GuideDraft
beginner· 24 min

MQTT Complete Guide for ESP32, ESP8266 and Raspberry Pi

Master MQTT for IoT with a practical guide to brokers, topics, QoS, retained messages, Last Will, Mosquitto, ESP32/ESP8266 firmware and Raspberry Pi integrations. Start with command-line tests and build toward secure, resilient systems.

Saved draftNot published
GuideDraft
beginner· 12 min

MQTT Explained: Broker, Topics, QoS, Retained Messages and Last Will

Understand MQTT without writing code. Learn how brokers route publish/subscribe messages, how topic hierarchies and wildcards work, what QoS guarantees, when to retain state and how Last Will supports device availability.

Saved draftNot published
GuideDraft
beginner· 10 min

Node-RED with MQTT: Connect Mosquitto, Publish & Subscribe

Connect Node-RED to a Mosquitto MQTT broker, publish a test message, subscribe to the same topic, and verify the message in Debug. A practical foundation for Raspberry Pi and ESP32 IoT projects.

Saved draftNot published
GuideDraft
beginner· 14 min

NodeMCU ESP8266 MQTT LED Control with Mosquitto

Control a NodeMCU ESP8266 LED by publishing ON/OFF commands to Mosquitto over MQTT. Configure command and reported-state topics, wire an external LED, test with command-line clients and troubleshoot broker access.

Saved draftNot published
GuideDraft
beginner· 10 min

Test MQTT without Hardware: Mosquitto Clients and MQTT Explorer

Verify a broker and topic flow before connecting any microcontroller. Use mosquitto_pub and mosquitto_sub in two terminals, inspect topics with MQTT Explorer, and diagnose local versus remote broker access.

Saved draftNot published
GuideDraft
beginner· 14 min

ESP32 WiFiManager: Configure WiFi Without Hardcoding SSID & Password

Stop hardcoding WiFi credentials. Use the WiFiManager library to give your ESP32 a captive configuration portal: first-boot setup from a phone, saved credentials, custom MQTT fields, a reset button, timeouts and fixes for the common pitfalls.

Saved draftNot published
GuideDraft
beginner· 22 min

Node-RED Complete Guide: From First Flow to Home Automation

Learn Node-RED from the first Inject-to-Debug flow to MQTT, live dashboards, ESP32 sensor projects and home automation. Follow a structured beginner-to-advanced path with practical guides, reliability advice and security essentials.

Saved draftNot published
GuideDraft
beginner· 12 min

Node-RED Tutorial for Beginners: Nodes, Flows & msg.payload

New to Node-RED? Learn how nodes, flows, messages and msg.payload work, then build your first Inject-to-Debug flow with simple diagrams and practical IoT examples.

Saved draftNot published
GuideDraft
beginner· 12 min

What Is Blynk 2.0? Templates, Datastreams, Devices and Dashboards Explained

A beginner-friendly explanation of Blynk 2.0: how templates, devices, datastreams and dashboards fit together, what the free plan really allows, and when to choose Blynk over MQTT or Node-RED.

Saved draftNot published

Intermediate

11 resources

Combine boards, sensors, brokers, dashboards and state feedback into practical systems.

GuideDraft
intermediate· 16 min

8-Channel Relay Control with Node-RED and MQTT State Feedback

Build an 8-channel relay dashboard using Node-RED and MQTT with separate command and reported-state topics. Plan reconnect behavior, retained-state policy and safe startup without letting the UI misrepresent the hardware.

Saved draftNot published
GuideDraft
intermediate· 14 min

Blynk vs Node-RED vs Home Assistant vs MQTT: Which Should You Choose?

Compare Blynk, Node-RED, Home Assistant and MQTT by purpose, hosting, dashboards, automation, offline behavior and maintenance. Choose a practical stack for ESP32 and ESP8266 projects without adding unnecessary components.

Saved draftNot published
GuideDraft
intermediate· 16 min

ESP32 + Home Assistant WiFi Smart Switch: Relay, Button & MQTT Discovery

Build a WiFi smart switch with an ESP32 and a relay that appears in Home Assistant automatically through MQTT Discovery. Includes a physical button, power-loss state restore, safe relay wiring, full code, an automation and a safety section on mains voltage.

Saved draftNot published
GuideDraft
intermediate· 15 min

ESP32 Home Assistant Without MQTT: ESPHome, REST & Webhooks Compared

Four ways to connect an ESP32 to Home Assistant without MQTT: ESPHome native API (easiest), REST sensors and switches, webhooks and the Home Assistant REST API. Working YAML and code for each, plus a decision guide and troubleshooting.

Saved draftNot published
GuideDraft
intermediate· 16 min

ESP32 MQTT Temperature Sensor: Send DHT22 Data to Home Assistant

Build an ESP32 temperature and humidity sensor that appears in Home Assistant automatically using MQTT Discovery. Includes DHT22 wiring, complete PubSubClient code with availability and reconnect, dashboard setup, an alert automation and troubleshooting.

Saved draftNot published
GuideDraft
intermediate· 16 min

ESP32 Relay Control over MQTT with State Feedback

Control relay channels from MQTT with separate command and reported-state topics. Define a safe startup policy, validate commands, handle retained messages carefully and test the relay controller with low-voltage loads.

Saved draftNot published
GuideDraft
intermediate· 18 min

Live DHT11 and BMP280 Dashboard with ESP32 and MQTT

Send DHT11 temperature/humidity and BMP280 temperature/pressure from an ESP32 to Node-RED over MQTT, validate JSON telemetry, and build a Dashboard 2.0 view with sensible ranges and clear stale-data status.

Saved draftNot published
GuideDraft
intermediate· 11 min

MQTT Topic Naming Best Practices for IoT Projects

Design MQTT topic hierarchies that stay readable as IoT projects grow. Learn device naming, telemetry versus commands, wildcard filters, case sensitivity, retained state and topic permission patterns.

Saved draftNot published
GuideDraft
intermediate· 13 min

MQTT Troubleshooting: Connection Refused, rc=-2 and rc=5

Diagnose MQTT connection failures systematically. Understand broker listener and port problems, PubSubClient rc=-2 and rc=5, authentication, client IDs, topic mismatches and reconnect logs for ESP32, ESP8266, Mosquitto and Node-RED.

Saved draftNot published
GuideDraft
intermediate· 15 min

ESP32 WebSocket Tutorial: Real-Time Sensor Data Dashboard (Arduino IDE)

Build a real-time ESP32 WebSocket server: push live sensor readings to a browser graph, control an LED from the page, handle reconnects and heartbeats, and learn when WebSockets beat HTTP polling and MQTT.

Saved draftNot published
GuideDraft
intermediate· 13 min

Retained Messages and Last Will with ESP32: Online/Offline Status

Use MQTT retained status and Last Will and Testament (LWT) to show whether an ESP32 is online. Configure status topics safely, test unexpected disconnects, and separate availability from sensor freshness and retained commands.

Saved draftNot published

Advanced

6 resources

Focus on resilience, security, logging, integrations and maintainable system design.

ProjectDraft
advanced· 35 min

ESP32 Home Automation Node with MQTT & Home Assistant

Turn an ESP32 WROOM into a smart home node that publishes sensor data and receives relay commands via MQTT. Supports Home Assistant auto-discovery, OTA firmware updates, and reconnect logic.

Saved draftNot published
GuideDraft
advanced· 16 min

Non-Blocking MQTT Auto-Reconnect on ESP32

Make an ESP32 MQTT client recover from Wi-Fi and broker outages without long delay() calls. Use millis()-based retry scheduling, capped backoff, unique client IDs, resubscription after reconnect and local work that continues while offline.

Saved draftNot published
GuideDraft
advanced· 17 min

Secure Node-RED: Login, HTTPS, MQTT TLS, Backups and Git

Harden a Node-RED deployment with editor authentication, HTTPS or a secure reverse proxy, restricted network access, MQTT security, secret handling and recoverable flow backups. Learn what not to expose to the internet.

Saved draftNot published
GuideDraft
advanced· 15 min

Node-RED Automations: Schedules, LDR Lighting and Context Variables

Build practical Node-RED automations with scheduled Inject nodes, an LDR-based light rule, hysteresis and context variables. Learn to avoid rapid switching, handle stale readings and decide which state should survive a restart.

Saved draftNot published
GuideDraft
advanced· 15 min

PIR Motion Alerts from Node-RED to Telegram or Email

Turn PIR sensor events into Node-RED Telegram or email alerts without spamming your inbox. Detect state transitions, add a cooldown and test unavailable-network and repeated-trigger scenarios.

Saved draftNot published
GuideDraft
advanced· 18 min

Store Node-RED Sensor Data in InfluxDB 2.x and Chart It in Grafana

Build a time-series logging path from Node-RED to InfluxDB 2.x and Grafana. Validate MQTT sensor payloads, write measurements with units, configure a least-privilege token and chart trends without confusing missing samples with zero.

Saved draftNot published
Build your stack

These tools work even better together.

MQTT moves messages, Node-RED connects them into logic, and Blynk can provide a mobile-facing device interface. Pick the layer your project needs.

Have a project idea?

Keep exploring the SolderHub catalog or share a build with the community.