Home / Work / ESP32 environmental telemetry

05 / Embedded sensing · Prototype

ESP32 environmental telemetry

A DHT22 and ESP32 sensor reporting pipeline designed to make measurements inspectable and testable through a small Python HTTP service.

System outline

A MicroPython node samples temperature and humidity, then sends structured JSON telemetry to a Flask service over Wi-Fi. The server validates readings, timestamps accepted messages in UTC, and exposes a bounded recent-data endpoint.

Software design and test boundaries

  • Explicit supported temperature and humidity ranges and structured error responses.
  • Limited in-memory data history and health endpoint.
  • Configurable node ID, connection retries, and safe HTTP-response cleanup.
  • Separation of sample Wi-Fi settings from source code.
  • Automated tests for malformed values, API key behavior, and reading history.
Verification boundary: Tests exercise server behavior; they do not establish DHT22 sensor calibration, environmental accuracy, or real ESP32 Wi-Fi reliability. This service is designed for a trusted private LAN, not public HTTP deployment.

Next verification steps

Characterize readings against a reference thermometer and hygrometer, observe missed transmissions over a sustained Wi-Fi test, and measure sampling interval and end-to-end latency. Server regression tests alone do not verify the physical sensing chain.