Maker tech hub — AI · 3D print · Pi · ESP32 · plus the classic tech archive.

Free ESP32 kit · Books · Network Ninja · Archive

Guide · Intermediate · Raspberry Pi

Tool Review: Mosquitto as a Workshop MQTT Broker

Why a boring Mosquitto install on a Pi beats cloud IoT dashboards for a home lab full of ESP32 nodes.

Written by

Avery J. Parker

IT veteran, maker educator, and author of Network Ninja, 3D Printing Mastery, and AI Workflow Mastery. Business IT: Diversified Tech Solutions.

Project template

  • Goal & materials
  • Steps / firmware
  • Troubleshooting
  • AI assist notes
  • Related gear & books

If your ESP32 nodes need to talk to a Pi without shipping telemetry to a random cloud, Eclipse Mosquitto is still the sensible workshop default.

Pi coordinator with ESP32 nodes
Pi runs the broker; ESP32 nodes publish sensors and subscribe to relay commands.

Why Mosquitto

  • Lightweight on a Pi
  • Easy to test with mosquitto_pub / mosquitto_sub
  • Plays well with Home Assistant later without forcing HA on day one

Minimal lab install

sudo apt install -y mosquitto mosquitto-clients
sudo systemctl enable --now mosquitto
mosquitto_sub -h localhost -t 'lab/#' -v
Security: open MQTT without auth on a WAN interface is a gift to the internet. Lab VLAN + auth before any port forward. See also Network Ninja thinking on segmentation.

ESP32 side

Publish sensor JSON to lab/room1/bme; subscribe to lab/room1/relay. Keep payloads boring and versioned.

Build path: Pi + ESP32 mesh guide · Pi first weekend checklist.

Related