Skip to content

bitrate16/qingping-influxdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qingping-influxdb

Simple tool to collect and export qingping MQTT data to influxdb

How does it works

It simple connects to MQTT topic of your device and periodically sends configuration (settings.json) with current time to it. When data arrives from sensor, it is sent to influxdb database.

Usage

Simple compose for local deployment

services:
  qingping-influxdb:
    image: ghcr.io/bitrate16/qingping-influxdb:latest
    restart: always

    environment:
      QINGPING_MQTT_HOST: "mqtt.example.com"
      QINGPING_MQTT_PORT: "1883"
      QINGPING_MQTT_TOPIC: "/sensor/qingping/0001/write"
      QINGPING_MQTT_LOGIN: "qingping"
      QINGPING_MQTT_PASSWORD: "qingping"
      QINGPING_INFLUX_URL: "https://influx.example.com"
      QINGPING_INFLUX_ORG: "myorgname"
      QINGPING_INFLUX_TOKEN: "INFLUXDB_BUCKET_TOKEN"
      QINGPING_INFLUX_BUCKET: "climate"
      QINGPING_INFLUX_TIMEZONE: "Indian/Mayotte"
      QINGPING_INFLUX_MEASUREMENT: "climate"
      QINGPING_SETTINGS: "/app/settings.json"

    volumes:
      - ./settings.json:/app/settings.json

When deploying:

  • Configure environment variables to match your env
  • Add settings.json file with settings being sent to your sensor

Example settings.json:

{
    "temperature_unit": "C",
    "report_interval": 5,
    "collect_interval": 5,
    "co2_sampling_interval": 5,
    "pm_sampling_interval": 5,
    "power_off_time": 0,
    "night_mode_start_time": 0,
    "night_mode_end_time": 0,
    "display_off_time": 0,
    "auto_slideing_time": 60,
    "timezone": 30,
    "screensaver_type": 1,
    "is_12_hour_mode": 0,
    "pm25_standard": 0
}

Here report_interval and collect_interval are related to displaying values on display.

TODO:

  • Support other metrics:
    • Noise level
    • Radiation?
    • TVoC

About

qingping to influxdb data collector

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors