Skip to content
Dave Schmid edited this page Nov 22, 2024 · 7 revisions

Qingping Air Monitor Lite MQTT to InfluxDB Collector

Welcome to the Qingping Air Monitor Lite MQTT to InfluxDB Collector project! This tool enables you to seamlessly collect, process, and analyze real-time environmental and diagnostic data from Qingping Air Monitor Lite devices. By utilizing MQTT for data streaming and InfluxDB for time-series storage, this collector provides a scalable and reliable solution for environmental monitoring.


Key Features

  • Real-Time Data Collection
    Automatically collects sensor data, including temperature, humidity, CO2 levels, PM2.5/PM10 particulate matter, and battery status.

  • Device Diagnostics
    Retrieves diagnostic information, such as WiFi signal strength, channel, AP details, and firmware versions.

  • Dynamic Device Management
    Automatically registers new devices as they send messages and sets reporting intervals dynamically.

  • Secure and Configurable
    Supports MQTT v5, TLS encryption, and environment-based configuration for flexible and secure operation.

  • Error Handling & Recovery
    Includes robust error handling and reconnection logic to ensure uninterrupted data collection.

  • Performance Optimization
    Batched writes to InfluxDB to reduce overhead and improve storage efficiency.

  • Customizable Timestamps
    Optionally, use the current system time instead of payload timestamps for flexibility in data management.


How It Works

  1. Connects to MQTT Broker
    Subscribes to Qingping device topics (qingping/#) via a configured MQTT broker.

  2. Processes Messages

    • Type 17 (Sensor Data): Environmental metrics like temperature and CO2 levels.
    • Type 13 (Diagnostic Data): Diagnostic details such as WiFi and device versioning.
  3. Writes Data to InfluxDB
    Converts incoming data into structured points with tags and fields, storing it efficiently for querying and visualization.

  4. Manages Device Intervals
    Automatically updates device reporting and collection intervals based on configuration, ensuring optimal data frequency.


Why Use This Collector?

  • Scalable Monitoring: Manage and collect data from multiple Qingping devices simultaneously.
  • Flexible Integration: Compatible with any MQTT broker and InfluxDB instance.
  • Actionable Insights: Integrates seamlessly with visualization tools like Grafana for monitoring trends and generating alerts.
  • Data Privacy: Use your local MQTT broker to retain control over your data.

Get Started

Set your Qingping devices to report data to your local MQTT broker.

Use the provided Docker Compose setup to deploy the collector quickly and efficiently.

Adjust collection intervals, logging levels, and MQTT/InfluxDB parameters to fit your use case.


Useful Links

Clone this wiki locally