This custom component integrates the Qingping devices with Home Assistant, allowing you to monitor various environmental parameters in realtime.
- MQTT integration installed and configured.
- Enable MQTT on Qingping devices using instructions below.
- HACS installed.
- Automatic discovery of Qingping devices *
- Real-time updates of air quality data
- Configurable offsets
- Configuration entites
- Adjustable update interval
- Automatic unit conversion for temperature
- Device status monitoring
- Battery level monitoring
Note
Before you begin you must enable mqtt on the device. Follow the instructions provided by GreyEarl here.
Client ID, Up Topic and Down Topic must be filled out extacly as shown in example.
After that is complete continue with HACS installation.
- Use HACS to install this integration:
- Download the Qingping repository.
- Restart Home Assistant
- Go to "Configuration" -> "Integrations" and click "+" to add a new integration
- Search for "Qingping" and follow the configuration steps
- The integration supports automatic discovery of Qingping devices.
⚠️ For discovery: JSON devices must be actively sending data, while TLV devices require a 2-second button press to appear in the list. - Make sure to select the correct model from dropdown in order to get the correct sensors.
- If your device is not discovered automatically, you can add it manually by providing the MAC address.
⚠️ Do not include : in your MAC address. example: 532D38701E1F
-
Device Discovery: The integration uses MQTT to discover Qingping devices on your network. It listens for messages on the MQTT topic
qingping/#to identify available devices. -
Configuration: Once a device is discovered, you can add it to your Home Assistant instance through the UI. The integration will prompt you to enter a name and model for the device and confirm its MAC address.
-
Sensors: The integration creates several sensors for each Qingping CGS1/CGS2/CGDN1 device:
- Temperature
- Humidity
- CO2 level
- PM2.5
- PM10
- TVOC (ppb, ppm and mg/m³)
Only on CGS1 - eTVOC (ppb, VOC index and mg/m³)
Only on CGS2 - Noise level
Only on CGS2, CGR1PW, CGR1W - Temp & Humidity Offsets
- PM2.5 Offsets
- PM10 Offsets
- TVOC Offsets
Only on CGS1 - eTVOC Offsets
Only on CGS2 - Pressure Offset
Only on CGP23W - CO2 Offsets
- CO₂ Interval
Only on CGP22C - Auto Sliding
Only on CGDN1 - Auto CO2 Calibration
Only on CGDN1, CGP22C, CGR1PW, CGR1W - Manual Calibration
Only on CGDN1, CGP22C, CGR1PW, CGR1W - Night Mode
Only on CGDN1 - Power Off Time
Only on CGDN1, CGP22C - Screensaver
Only on CGDN1 - Timezone
Only on CGDN1 - Pressure
Only on CGP23W - Light/Illuminance
Only on CGR1PW, CGR1W - Battery Charging State
- Battery level
- Device status (online/offline)
- Firmware version
- Report type (realtime /historic)
⚠️ TLV Devices real-time mode only work when device is USB powered - MAC address
-
TVOC Sensor: The sensor can be set to 3 different measurement units, by default it is ppb. The component converts from ppb to get ppm and mg/m³.
- ppm = ppb/1000
- mg/m³ = ppb/218.77
eTVOC Sensor: The sensor can be set to 3 different measurement units, by default it is VOC index. The component converts from voc index to get ppb and mg/m³.
- ppb = ( math.log ( 501 - voc_index ) - 6.24) * -2215.4
- mg/m³ = ( ppb * 4.5 * 10 + 5 ) / 10 / 1000
-
Data Updates: The component subscribes to MQTT messages from the device. When new data is received, it updates the relevant sensors in Home Assistant.
⚠️ Configuration changes only work when device is USB poweredOnly on TLV Devices⚠️ Real-time mode only work when device is USB poweredOnly on TLV Devices
-
Offset Adjustments: The integration allows you to set offset values for sesor readings. These offsets are applied to the device before it's displayed in Home Assistant.
-
Reporting: You can configure how often the device should report new data.
- Update Interval: This is done through a number entity that allows you to set the update interval in seconds.
Only on JSON Devices, JSON devices only support realtime data on this integration - Report Interval: How often device sends data (10-60 minutes, historic mode only)
Only on TLV Devices - Sample Interval: How often device reads sensors (10-300 seconds, historic mode only)
Only on TLV Devices - Report Mode: Manual override for real-time/historic mode
Only on TLV Devices
- Update Interval: This is done through a number entity that allows you to set the update interval in seconds.
-
Configuration Publishing: The integration periodically publishes configuration messages to the device via MQTT. This ensures that the device maintains the correct reporting interval, realtime reporting and other settings.
⚠️ Note: For battery operating TLV devices, configuration changes only work while device is plugged into USB power -
Status Monitoring:
- Real-time mode: Offline after 5 minutes of no activity.
JSON and TLV Devices - Historic mode: Offline after 15 minutes of no activity.
Only on TLV Devices
- Real-time mode: Offline after 5 minutes of no activity.
-
Unit Conversion:
- The integration automatically converts temperature readings to the unit system configured in your Home Assistant instance (Celsius or Fahrenheit).
Only on JSON Devices - Temperature Unit: Switch between Celsius (°C) and Fahrenheit (°F) on device page
Only on TLV Devices ⚠️ Time format (12h/24h) cannot be changed via MQTT Yet.Only on TLV Devices
- The integration automatically converts temperature readings to the unit system configured in your Home Assistant instance (Celsius or Fahrenheit).
-
Automatic Report Mode Switching:
Only on TLV Devices- Real-time mode: Automatically enabled when USB powered (fast updates every 3-5 seconds)
- Historic mode: Automatically enabled when on battery (slower updates, battery friendly)
-
TLV Protocol Support: Newer devices use TLV (Type-Length-Value) binary format instead of JSON:
- Automatic detection of message format
- Support for historical data buffering (CMD 0x42)
- Always displays most recent sensor readings
- Enhanced configuration options via TLV commands
If you encounter any issues:
- Check that your Qingping device can send data via MQTT
- Ensure MQTT is set up on each device as instructed
- Ensure that MQTT is properly set up in your Home Assistant instance
- Check the Home Assistant logs for any error messages related to this integration
Contributions to this project are welcome! Please feel free to submit a Pull Request.
If you have any questions or need help, please open an issue on GitHub.
Special thanks to the Qingping team for their technical support and for providing sample devices to help improve this integration for the community. Their collaboration has been invaluable in bringing enhanced support for TLV protocol devices and advanced configuration features to Home Assistant users.







