Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 2.07 KB

File metadata and controls

65 lines (46 loc) · 2.07 KB

QingPing MQTT

Codecov Go Report CI

Expose metrics from a Qingping Lite air quality monitor.

MQTT broker + Prometheus exporter.

Set up the device

To set up your device to send metrics to a remote MQTT broker follow the steps:

  1. Create a QingPing account in the Qingping+ app.

  2. Add your device to the app.

  3. Log in with the account to the developers portal.

  4. Go to "Private Configuration" and add a configuration:

    • Private Type: Self-built MQTT
    • Host/Port: listen address of qingping-mqtt
    • Up topic: qingping/your-device-name/up
    • Down topic: qingping/your-device-name/down

    qingping-mqtt listens to all topics.

  5. Go to "Push Configuration" and add the configuration from the previous step for your device.

Known problems:

  • Once your device is set, it will work fine until the first reboot. After a reboot it will stop sending any metrics for an unknown reason. The only way to fix this is to do a hard reset and set up everything from scratch.

Run

Download and run a pre-built binary (releases)

./qingping-mqtt \
    -http-addr 0.0.0.0:8080 \
    -mqtt-addr 0.0.0.0:1883 \

Or run in Docker (image tag)

docker run -d -p 8080:8080 -p 1883:1883 \
    ghcr.io/tetafro/qingping-mqtt

Build from source

Binary

make build

Docker image

make docker

Metrics

The list of exposed metrics can be found in metrics.go.