IoT projects fail in the gap between prototype and operations — a demo on a breadboard is not a system your facilities team will trust at 2 a.m.
A production stack needs reliable ingestion, durable storage, sub-minute alerting, and a dashboard language your stakeholders already understand. This article walks through the complete architecture from ESP32 edge nodes to Grafana dashboards in production.
Edge hardware: ESP32
Espressif's ESP32 features a dual-core Xtensa LX6 processor at up to 240 MHz, 520 KB SRAM, and built-in Wi-Fi (802.11 b/g/n) and Bluetooth 4.2 — all in a module costing USD 5–10. It is the dominant choice for industrial IoT nodes in the sub-USD 20 budget tier.
For firmware, the ESP-IDF (Espressif IoT Development Framework) provides FreeRTOS-based task scheduling, OTA update support, and TLS-secured MQTT out of the box. Production deployments should version firmware and automate rollback on boot failure.
Transport: MQTT over TLS
MQTT is a lightweight publish-subscribe protocol standardised as ISO/IEC 20922:2016. Its binary packet overhead is as low as 2 bytes per message, making it suitable for constrained devices on metered cellular connections.
Use a topic naming convention such as {site}/{zone}/{device_id}/{metric} so that ACL rules, Grafana queries, and alert routing stay predictable as you scale beyond 50 nodes. Require TLS (MQTTS on port 8883) and mutual certificate authentication for any production deployment.
Cloud ingestion and time-series storage
AWS IoT Core acts as a fully managed MQTT broker. It supports up to 500,000 concurrent device connections per account and prices at USD 0.30 per million messages in the first tier. For private cloud or edge-heavy deployments, a self-hosted Mosquitto cluster is a proven alternative.
Route messages via AWS IoT Rules into InfluxDB 2.x or TimescaleDB. InfluxDB is purpose-built for time-series: its columnar storage engine achieves roughly 60× higher ingest throughput than PostgreSQL for sensor payloads (InfluxData internal benchmarks). Define retention policies to auto-expire raw data after 30 days while keeping 1-hour aggregates for 2 years.
Grafana dashboards and alerting
Grafana OSS (open-source, self-hostable) has over 900,000 active instances as of 2024 and supports InfluxDB, TimescaleDB, Prometheus, and 100+ other data sources natively. Operators can read charts without reading code — a key requirement when handing over to non-engineering facility teams.
Configure alert rules directly in Grafana: set thresholds for pump failure, temperature excursion, or connectivity loss, and route notifications to LINE Notify, Slack, or PagerDuty. Target end-to-end latency under 60 seconds from sensor reading to alert delivery.
What WD-Quality delivers in one engagement
A standard WD-Quality IoT engagement covers ESP32 firmware, MQTT broker configuration, cloud ingestion pipeline, Grafana dashboard templates, alert rule sets, and a runbook for the operations team — so handover is clean and your team owns the system from day one.
References & Credits
- 1Espressif ESP32 Technical Reference Manual — Dual-core 240 MHz, 520 KB SRAM, Wi-Fi + Bluetooth specs
- 2MQTT Specification — ISO/IEC 20922:2016 — Lightweight pub-sub protocol standard, 2-byte minimum header
- 3AWS IoT Core Pricing — USD 0.30 per million messages; 500,000 concurrent connections per account
- 4InfluxDB Time-Series Performance — InfluxData benchmark comparing ingest throughput to PostgreSQL
- 5Grafana OSS Documentation — Open-source dashboarding platform with 900,000+ active instances (2024)
- 6ESP-IDF Programming Guide — FreeRTOS-based firmware framework with OTA and MQTT-TLS support
Share or explore more insights
Talk to our team