Skip to content
Brian Rodriguez edited this page Dec 9, 2025 · 2 revisions

XY-MD02 WebApp Documentation

Web-based monitoring dashboard for XY-MD02 Modbus temperature and humidity sensor with data logging and psychrometric calculations.

Quick Links

Features

Core Functionality

  • Real-time Monitoring: Temperature, humidity, dewpoint, absolute humidity
  • Comfort Analysis: Humidex-based comfort scoring (0-6 scale) with visual indicators
  • Production Server: Waitress WSGI server for reliable multi-user access
  • Multi-language: Dutch, English, German, French, Spanish interface

Data Visualization

  • 5 Synchronized Graphs: Temperature, humidity, dewpoint, absolute humidity, comfort score
  • Psychrometric (Mollier) Chart: Interactive diagram with comfort zones and RH curves
  • Historical Replay: Time-travel through past data with interactive slider
  • Adaptive Downsampling: Instant rendering of months/years of data (98-99.99% reduction)

Database & Performance

  • SQLite with WAL Mode: Optimized for concurrent read/write
  • Table-Per-Day Partitioning: Efficient queries and cleanup
  • Configurable Retention: Keep data forever or auto-delete after N days
  • Smart Queries: Only scans relevant tables for time range

Technical

  • Modbus RTU Communication: XY-MD02 sensor via serial port
  • Batch Operations: 30-second buffered writes for database longevity
  • Data Validation: Range checking (-50 to 100°C, 0-100% RH)
  • Error Recovery: Auto-reconnection on communication errors

System Requirements

  • Python 3.10 or higher
  • Windows/Linux/macOS
  • Serial port access for Modbus communication
  • XY-MD02 temperature/humidity sensor

Support

Clone this wiki locally