How amusarra/esp32-mqtt-publish-subscribe works
This repository provides ESP32 firmware for an IoT environmental-monitoring and relay-control device. Its main runtime flow reads BME280 measurements and relay state, publishes telemetry over MQTT, and receives MQTT commands to operate relays and report their state. The README also describes a broker, dashboard/mobile subscribers, and a gateway LCD as parts of the broader solution; their implementation is not present in this source tree. Edges reflect only documented behavior or calls visible in the firmware excerpt.
Main entry points: esp32_mqtt_publish_subscribe.cpp Device runtime
Components 6
ESP32 firmware
- Device runtime
src/esp32_mqtt_publish_subscribe.cpp
IoT environment
- BME280 sensor
- Relay module
- MQTT broker
- Gateway LCD
Other components
- Dashboard / phone
Connections 8
- Device runtime → BME280 sensor: reads via I2C
src/esp32_mqtt_publish_subscribe.cpp - Device runtime → Relay module: drives GPIO
src/esp32_mqtt_publish_subscribe.cpp - Device runtime → MQTT broker: publishes telemetry
README.markdown - MQTT broker → Dashboard / phone: dispatches telemetry
README.markdown - Dashboard / phone → MQTT broker: publishes commands
README.markdown - MQTT broker → Device runtime: delivers commands
README.markdown - Device runtime → MQTT broker: publishes relay status
src/esp32_mqtt_publish_subscribe.cpp - Gateway LCD → MQTT broker: subscribes to data
README.markdown