Bluetooth-Devices / qingping-ble

Qingping BLE support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Brand new Qingping Air Monitor Lite not working

skgsergio opened this issue · comments

Describe the bug

I've just received my brand new Qingping Air Monitor Lite and is not being detected.

Firmware version: 4.3.4 (as reported by Qingping++ app), 2.1.7_0434 (as reported by Xiaomi Home).

Box info:
Model: CGDN1
Production date: 2022.03

To Reproduce

  1. Configure the device with Qingping+ app (or with Xiaomi Home using China server)
  2. Check with nRF Connect or bluetoothctl (BlueZ) that the device is advertising through BLE
  3. Home Assistant is unable to detect it.

Additional context

Add any other context about the problem here.

Advertisement captured by bluetoothctl:

[CHG] Device 7C:C2:94:C9:4D:6D RSSI: -72
[CHG] Device 7C:C2:94:C9:4D:6D ServiceData Key: 0000fdcd-0000-1000-8000-00805f9b34fb
[CHG] Device 7C:C2:94:C9:4D:6D ServiceData Value:
  88 24 6b 4d c9 94 c2 7c 01 04 fc 00 47 02 12 04  .$kM...|....G...
  0a 00 0b 00 13 02 55 02                          ......U.    

Home Assistant log (setting qingping_ble to debug):

2022-09-16 17:37:43.259 DEBUG (MainThread) [qingping_ble.parser] Parsing qingping BLE advertisement data: BluetoothServiceInfoBleak(name='Qingping Air Monitor Lite', address='7C:C2:94:C9:4D:6D', rssi=-77, manufacturer_data={}, service_data={'0000fdcd-0000-1000-8000-00805f9b34fb': b'\x88$kM\xc9\x94\xc2|\x01\x04\xfd\x00I\x02\x12\x04\t\x00\t\x00\x13\x02a\x02'}, service_uuids=[], source='hci0', device=7C:C2:94:C9:4D:6D: Qingping Air Monitor Lite, advertisement=AdvertisementData(local_name='Qingping Air Monitor Lite', service_data={'0000fdcd-0000-1000-8000-00805f9b34fb': b'\x88$kM\xc9\x94\xc2|\x01\x04\xfd\x00I\x02\x12\x04\t\x00\t\x00\x13\x02a\x02'}), connectable=True, time=3804.530211481)
2022-09-16 17:37:43.259 DEBUG (MainThread) [qingping_ble.parser] Device type 36 is not supported

Monkey-patching qingping-ble to include 0x24: QingpingDevice("CGDN1", "Air Monitor Lite") in parser.py's DEVICE_TYPES makes it work:
image

Thanks @skgsergio

Actions will release it in a bit if everything passes