All projects
No. 13
IoT plant monitoring
Temperature and humidity with ESP8266 and MQTT
- My role
- Repository author
- Period
- Dec 2025
The problem
I wanted to monitor the temperature and humidity of several plants with cheap hardware and see the readings in near real time from the browser.
What I built
I published the project on December 6, 2025, in 3 commits.
- Firmware for an ESP8266 with a DHT11 sensor: it joins the Wi-Fi and every 3 s publishes a JSON message with temperature and humidity to an MQTT topic for each plant.
- A Python receiver (paho-mqtt) subscribed to every plant that stores each reading with its timestamp in SQLite.
- A Flask server with an endpoint that returns the last 30 readings for each of the 3 plants.
- A Chart.js dashboard that refreshes every 2 s and shows a status card per plant.
Architecture
Results
It's a local-network prototype. There are no metrics and no log of readings in the repository.
Known limits
- The broker's IP is hardcoded in the firmware and the receiver, and the names of the 3 plants are hardcoded in the server.
- The Wi-Fi credentials are compiled into the firmware, and neither MQTT nor Flask has authentication; MQTT doesn't use TLS either.
- Each reading's timestamp is the time it reaches the receiver, not when it was measured.
- There are no tests, and the README documents a
/dataroute that is/api/datain the code.