Internet of Things System for Collecting, Storing and Visualizing Biometric Data from Wearable Devices

IoT Integration via ESP32 and Azure Cloud

Nikolaos Tournatzis
Electrical and Electronics Engineering - Thesis 2026

ESP32 Bluetooth LE Azure Cloud MQTT Grafana InfluxDB

Abstract

This thesis develops a complete Bluetooth Low Energy (BLE) to cloud monitoring system that bridges commercial wearable health devices with Azure-hosted analytics infrastructure. Using an ESP32 microcontroller as an edge gateway, the system connects to a Coospo HW807 heart rate monitor and transmits real-time health data through MQTT to a cloud-based stack featuring Mosquitto, Telegraf, InfluxDB, and Grafana.

Project Overview

This project creates a production-ready IoT health monitoring system that integrates BLE wearables with professional cloud infrastructure. The system enables continuous data collection, time-series storage, and real-time visualization accessible from anywhere via web browser.

Key Features

Edge Gateway

ESP32 bridges BLE to WiFi/MQTT

Cloud Stack

Azure VM with Docker containers

Time-Series DB

InfluxDB for efficient data storage

Visualization

Grafana dashboards with HTTPS access

System Architecture

Edge Layer - Wearable Device

Coospo HW807 Heart Rate Monitor

  • Bluetooth Low Energy 4.0+
  • Standard HR Service (0x180D)
  • Battery Service (0x180F)
↓ BLE Connection
Edge Gateway

ESP32-WROOM-32E

  • BLE GATT Client (device connection)
  • WiFi Client (network connectivity)
  • MQTT Publisher (data transmission)
  • JSON data formatting
↓ WiFi/MQTT
Network Layer

WiFi Router + Internet

  • Local network connectivity
  • Internet gateway
  • Firewall and routing
↓ Internet (MQTT Port 8883)
Cloud Layer - Azure VM (Docker Host)
Mosquitto
MQTT Broker
Message routing
Telegraf
MQTT Agent
Data collection
InfluxDB
Time-Series DB
Data storage
Grafana
Visualization
Dashboards
↓ HTTPS
User Access

Web Browser

  • Secure HTTPS access to Grafana
  • Real-time dashboard viewing
  • Historical data analysis

System Components

Hardware Components

Component Specification Role
Coospo HW807 BLE 4.0+ HR armband Health data sensor
ESP32-WROOM-32E Dual-core 80MHz, WiFi+BLE Edge gateway (BLE to WiFi bridge)
WiFi Router 2.4GHz 802.11 b/g/n Network connectivity
Azure VM Cloud compute instance Docker host for cloud services

Software Stack

Component Purpose
Mosquitto MQTT broker for message queuing and routing
Telegraf MQTT agent for data collection from broker
InfluxDB Time-series database for efficient data storage
Grafana Web-based dashboards for data visualization
Docker Container orchestration for cloud services

Development Environment

  • Platform: PlatformIO with VS Code
  • Framework: Arduino for ESP32
  • Libraries: PubSubClient (MQTT), ArduinoJson, BLEDevice
  • Cloud: Microsoft Azure (VM with Docker)

Implementation Details

ESP32 Edge Gateway

The ESP32 implements a complete BLE-to-MQTT bridge with the following features:

  • Automatic BLE device scanning and connection
  • GATT service discovery (HR 0x180D, Battery 0x180F)
  • Real-time notification subscription
  • WiFi connectivity with automatic reconnection
  • MQTT client with TLS encryption
  • JSON data formatting and publishing

Cloud Infrastructure

The Azure VM hosts a Dockerized stack providing:

  • Mosquitto: Receives MQTT messages from ESP32, provides pub/sub topics
  • Telegraf: Subscribes to MQTT topics, parses JSON, writes to InfluxDB
  • InfluxDB: Stores time-series health data with efficient compression
  • Grafana: Provides web dashboards with real-time updates and historical analysis

Data Format

MQTT Topic: home/esp32/data

JSON Payload:

{
  "heart_rate": 72,
  "battery_level": 85,
  "device_id": "ESP32-001",
  "timestamp": 1736607600
}

Results

Key Findings

  • Complete IoT pipeline successfully operational from edge to cloud
  • Real-time visualization achievable through Grafana dashboards
  • InfluxDB efficiently handles time-series health data storage
  • Docker containerization simplifies cloud deployment and scaling
  • System suitable for multi-user health monitoring applications

Advantages of Cloud Architecture

  • Scalability: Docker containers can scale horizontally
  • Accessibility: Data accessible from anywhere via HTTPS
  • Storage: InfluxDB handles large-scale time-series data
  • Visualization: Professional dashboards with Grafana
  • Maintenance: Centralized updates and monitoring

Conclusion

This thesis successfully demonstrates a production-grade BLE health monitoring system integrating edge devices with cloud infrastructure. The ESP32 edge gateway effectively bridges commercial wearables with Azure-hosted services, enabling real-time data collection, storage, and visualization.

The implementation showcases a complete IoT pipeline using industry-standard tools (Mosquitto, Telegraf, InfluxDB, Grafana) and achieves reliable performance suitable for continuous health monitoring. The Docker-based cloud architecture provides scalability and accessibility for multi-user scenarios.

This work provides a practical reference architecture for IoT health monitoring systems and demonstrates the viability of integrating consumer wearables with professional analytics platforms.

Future Enhancements

  • Multi-Device Support: Connect multiple wearables to a single gateway
  • Mobile App: Develop companion app for direct access
  • Machine Learning: Add predictive analytics using collected data
  • Kubernetes: Migrate from Docker to Kubernetes for better orchestration

Acknowledgments

Special thanks to my thesis advisor for guidance throughout this project, the Electrical and Electronics Engineering department for laboratory facilities and Azure cloud resources, and the open-source community for essential libraries and tools.