Note: This is a toy project, please use qingping-api-influxdb-forwarder instead.
Tool to parse data from MQTT traffic of Qingping Air Monitor, and print in InfluxDB line protocol.
There are several ways to get data from the monitor:
- The monitor publishes data via (clear text) MQTT. However the interval (normally 15 minutes) cannot be controlled by user.
- Poll HTTP API (used by Qingping+ App) to fetch the latest data. However it requires HTTPS MITM.
- Connect the monitor to MIJIA and use miIO protocol to access the device.
If you can control the network, intercepting MQTT traffic should be the easiest way.
First install libpcap
, then run:
cargo install --git https://github.com/Harry-Chen/qingping-mqtt-interceptor.git
sudo env PCAP_INTERFACE="br-lan" PCAP_FILTER="port 11883" MEASUREMENT="qingping" qingping-mqtt-interceptor
Note: during the initilization of tVOC sensor, no data will be provided.