Expose metrics from a Qingping Lite air quality monitor.
MQTT broker + Prometheus exporter.
To set up your device to send metrics to a remote MQTT broker follow the steps:
-
Create a QingPing account in the Qingping+ app.
-
Add your device to the app.
-
Log in with the account to the developers portal.
-
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-mqttlistens to all topics. -
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.
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-mqttBinary
make buildDocker image
make dockerThe list of exposed metrics can be found in metrics.go.