Skip to content

IoT Solution Overview

IoT Solution Overview

This section provides a high-level overview of the IoT solution architecture covered in this training. By the end of this section, you will be able to:

  • Explain the end-to-end IoT architecture and how components work together
  • Describe the role of each technology layer in the stack
  • Relate the architecture to common customer requirements
  • Confidently discuss IoT solution capabilities during customer consultations

An Internet of Things (IoT) solution enables physical devices (sensors, machines, equipment) to collect data and exchange it over a network, allowing remote monitoring, control, and automation. For customers, this typically means:

  • Factory owners wanting to monitor production conditions remotely
  • Warehouse managers tracking inventory and environmental parameters
  • Agricultural customers automating irrigation and greenhouse control
  • Building operators managing energy consumption and security

The architecture presented in this training follows a proven, modular approach that can scale from a single sensor to hundreds of devices across multiple facilities.

The IoT solution is composed of four logical layers:

┌─────────────────────────────────────────────────────┐
│ Visualization & Analytics Layer │
│ Grafana Dashboards + Alerting │
├─────────────────────────────────────────────────────┤
│ Data Storage & Processing Layer │
│ InfluxDB (Time-Series) + MariaDB (Relational) │
├─────────────────────────────────────────────────────┤
│ Automation & Integration Layer │
│ Node-RED Flow Engine │
├─────────────────────────────────────────────────────┤
│ Communication Layer │
│ MQTT Broker (Mosquitto / EMQX) │
├─────────────────────────────────────────────────────┤
│ Device Layer │
│ ESP32 + Sensors + Actuators │
└─────────────────────────────────────────────────────┘

At the edge of the solution, ESP32 microcontrollers connect to various sensors and actuators. The ESP32 was chosen because it offers:

  • Built-in WiFi + Bluetooth: No external communication module required
  • Low power consumption: Deep sleep modes enable battery-powered operation
  • Rich peripheral support: SPI, I2C, I2S, ADC, DAC, GPIO
  • Multiple variants: DevKit (general purpose), CAM (imaging), XIAO (ultra-compact), S3/C3 (next-gen)
  • Mature ecosystem: Extensive library support (Arduino, ESP-IDF, MicroPython)
  • Cost-effective: Retail pricing from $3-10 per unit, making it suitable for both prototyping and production

Common sensors integrated with ESP32 include:

Sensor TypeExamplesApplication
Temperature/HumidityDHT11, DHT22, BME280Environment monitoring
LightPhotoresistor, BH1750Lighting automation
MotionPIR (HC-SR501)Security, presence detection
Distance/LevelUltrasonic, Water level sensorTank monitoring
RFIDRC522Asset tracking, access control
CameraOV2640 (ESP32-CAM)Visual inspection

MQTT (Message Queuing Telemetry Transport) is the communication protocol connecting devices to the backend. It uses a publish-subscribe pattern:

  • Devices publish sensor data to topics (e.g., factory/zone1/temperature)
  • Backend subscribes to relevant topics to receive data
  • Commands flow in reverse: backend publishes control messages, devices subscribe

Key advantages for customer scenarios:

  • Lightweight: Minimal bandwidth usage, suitable for low-cost IoT deployments
  • Asynchronous: Devices can sleep and only connect when sending data
  • Scalable: Single broker can handle thousands of concurrent devices
  • Reliable: Three QoS levels allow balancing reliability vs. overhead

Layer 3: Automation & Integration Layer (Node-RED)

Section titled “Layer 3: Automation & Integration Layer (Node-RED)”

Node-RED serves as the “brain” of the solution, providing:

  • Visual flow programming: Drag-and-drop nodes to create logic without deep coding
  • Protocol translation: Converts between MQTT, HTTP, TCP, UDP, and custom formats
  • Data transformation: Parse, filter, aggregate, and enrich incoming data
  • Integration hub: Connects to databases, cloud APIs, email, SMS, and third-party services
  • Dashboard builder: Create simple web dashboards for demo and testing

For pre-sales engineers, Node-RED is the most important tool for building quick demonstrations. A typical flow might:

  1. Receive MQTT message from ESP32
  2. Parse JSON payload
  3. Apply business rules (threshold checks, data validation)
  4. Store processed data in InfluxDB
  5. Trigger alert if values exceed limits
  6. Update Grafana dashboard in real-time

Layer 4: Data Storage Layer (InfluxDB + MariaDB)

Section titled “Layer 4: Data Storage Layer (InfluxDB + MariaDB)”

Sensor data is time-series by nature — each reading has a timestamp. InfluxDB is optimized for exactly this workload:

  • High write throughput: Millions of data points per second
  • Automatic retention policies: Age out old data automatically
  • Downsampling: Aggregate historical data to save space
  • SQL-like query language: Familiar syntax for reporting

MariaDB is included for relational data: device configuration, user management, lookup tables, and transactional records.

Grafana transforms stored data into actionable dashboards:

  • Real-time panels: Line charts, gauges, tables, heatmaps
  • Alerting: Threshold-based notifications via email, Telegram, Slack
  • Multi-source: Query InfluxDB, MariaDB, and other data sources simultaneously
  • Shareable: Export dashboards as JSON for reuse across projects
  • Role-based access: Control who sees which data

To understand how all layers work together, consider a factory temperature monitoring scenario:

1. ESP32 reads DHT22 sensor → temperature = 26.5°C
2. ESP32 publishes MQTT: topic "factory/zone1/env", payload {"temp":26.5,"hum":62}
3. Mosquitto broker receives and routes to subscribers
4. Node-RED subscribes to "factory/zone1/env"
5. Node-RED Flow:
a. Parse JSON payload
b. Check temperature against threshold (28°C)
c. If under threshold: write to InfluxDB only
d. If over threshold: write to InfluxDB + send alert
6. InfluxDB stores: {"measurement":"environment","tags":{"zone":"zone1"},"fields":{"temp":26.5,"hum":62}}
7. Grafana queries InfluxDB every 5 seconds and updates dashboard
8. Customer opens Grafana URL → sees real-time temperature, humidity, and trend lines

This entire chain, from sensor reading to dashboard display, takes less than 2 seconds in a typical deployment.

When discussing solutions with international customers, the following points are critical selling advantages:

RequirementHow This Stack Addresses It
Cost-effectiveAll core software is open-source (Mosquitto, Node-RED, InfluxDB OSS, Grafana OSS). ESP32 hardware costs $3-10.
Quick deploymentDocker Compose can deploy the entire backend in under 5 minutes.
ScalableFrom 1 sensor to 10,000+ devices. Add broker clusters and database nodes as needed.
CustomizableModular architecture allows swapping components (e.g., EMQX instead of Mosquitto for larger deployments).
Proven technologyMQTT is ISO standard (ISO/IEC 20922). ESP32 ships 100M+ units annually.
Remote capableTLS encryption enables secure remote monitoring across the internet.
Low maintenanceContainerized deployment with Portainer for visual management.

When customers ask why certain choices were made, here are the key decision factors:

Why ESP32 instead of Raspberry Pi?

  • Lower cost ($3-10 vs $35-75)
  • Lower power consumption (deep sleep: ~10µA vs ~500mA)
  • Real-time GPIO control (hardware timers, interrupts)
  • Better suited for sensor-level tasks; RPi is overkill for simple reading/relay

Why MQTT instead of HTTP?

  • Persistent connection reduces overhead vs. HTTP polling
  • Pub-sub model enables one-to-many data distribution
  • Built-in QoS handles unreliable networks
  • Small packet overhead (2-byte minimum header vs. HTTP’s ~800 bytes)

Why Node-RED instead of writing code?

  • Dramatically reduces development time for integration flows
  • Visual debugging and monitoring
  • Huge library of pre-built nodes (community-contributed)
  • Non-programmers can understand and modify flows

Why InfluxDB instead of traditional SQL?

  • 10-100x better write performance for time-stamped data
  • Automatic data retention and downsampling
  • Native time-based functions (moving averages, derivative, etc.)
  • Designed for the exact workload IoT generates

This section introduced the complete IoT solution architecture across five layers: Devices, Communication, Automation, Storage, and Visualization. The ESP32 + MQTT + Node-RED + InfluxDB + Grafana stack forms a powerful, cost-effective, and scalable foundation for IoT solutions targeting customers.

Key takeaways:

  • The architecture is modular — each layer can be independently upgraded or replaced
  • Understanding the complete data flow enables confident customer conversations
  • The stack is proven in production environments across industries
  • Open-source components keep costs low while maintaining enterprise-grade capabilities