theengs / app

Theengs mobile application to read BLE sensors and push data to an MQTT broker
https://app.theengs.io
GNU General Public License v3.0
37 stars 7 forks source link

Device IDs adjustment #59

Closed DigiH closed 1 year ago

DigiH commented 1 year ago

Adjusting device IDs for CGG1, CGDK2, CGP1W and CGD1 to correctly only use the second byte.

As described in https://github.com/theengs/app/issues/56

Checklist:

emericg commented 1 year ago

If you are confident the first byte should be ignored, I'm ok with it. Is there any other values than 0x08 and 0x88 that have been seen in the wild?

DigiH commented 1 year ago

AFAIK it can also be 0x04 for some Qingping devices, and whichever additional variations come up in the future or already exist. I'm not sure if this is hardware revisions or region variations, but with the second byte already getting additional variants I think this is enough of a catch up already, unless you want to keep doing that with the first byte as well.

Just doing a quick search here I also found

https://github.com/Bluetooth-Devices/qingping-ble/blob/main/src/qingping_ble/parser.py

which makes me realise we should probably also extend the existing device IDs with these additional variations, affecting CGG1 and CGDN1 for Decoder, with the recent addition of

https://github.com/Bluetooth-Devices/qingping-ble/pull/18/files

emericg commented 1 year ago

Indeed, it looks like 0x04 and 0x80 can occur as well, and I (probably) remember a 0x48, but maybe not from the type of sensor we are interested in.