Qingping light & pir sensor only showing raw data

I’ve added the Qingping light and pir sensor (CLEARGRASS Qingping BLE CGPR1 PIR and luminance sensor - OpenMQTTGateway compatible) to my home, and my existing esp32 BLE OMG (0.9.7) isnt showing the lux or presence values, only service data. For testing purposes i’ve flashed a new esp32 to the newest 0.9.16 and the result is the same. This is what is published:
N: Send on /BTtoMQTT/… msg {“id”:“…”,“mac_type”:0,“name”:“Qingping Motion & Light”,“rssi”:-87,“servicedata”:“3058830abcc33660342d5808”,“servicedatauuid”:“0xfe95”}
Can anyone with the sensor confirm?

Hi @IRo ,

There has just been a change to this decoder, but the changes haven’t propagated into a Decoder release or an OpenMQTTGateway version yet. Do you use pre-built binaries, or are you building your OMG binaries yourself? If the latter you can change the Decoder URL in platformio.ini from

decoder = https://github.com/theengs/decoder.git#v0.6.2

to

decoder = https://github.com/theengs/decoder

to have the latest changes from the development branch of Decoder.

BTW, could you also post a current message which you are receiving, but which has

“servicedatauuid”:“0xfdcd”

Thanks

Thanks for the quick reply!
I’m not building my own binaries at the moment. I did for my existing OMG devices, but for the testing device i just used the web flasher on the website. it’s been a long while since i’ve updated all the libraries related to OMG and i just know that i’ll run into issues if i try and compile the latest version. I think i’ll chuck the sensor into the junk drawer and revisit it once the decoder is updated on the main version.

I’m not seeing any such messages. all the ones I’m seeing from the device have the save uuid of 0xfe95

Thanks again!

It may need to be provisionned with the qingping app instead of the xiaomi one to get the compatibility with OMG.

Had some time this weekend so I built the binaries with the change you’ve suggested to the decoder and now it works! Thanks again!
I haven’t seen a battery state message yet though, waiting to see if it’s transmitted once an hour or something.

Also, I’ve turned on discovery for home assistant, as manual configs are becoming deprecated soon, so I have no idea how to set a timeout for the presence property. The device doesn’t send a false flag for it, just no property when there is no presence, and property true when there is presence. On HA I just see presence property remaining as true. Any idea?

Btw here’s the service data you wanted

Glad to hear you got it working :slight_smile:

Thanks, but now I’m also wondering what kind of data this is in your post. Did that undecoded message appear while you other messages were properly decoded with the motion/presence property and all? So far this 28 long servicedata is not caught by the decoder - might actually possibly be a motion/presence OFF message you are looking for :wink: Otherwise - as I am not a HA user myself - is there not a functionality of a timer you can set to change the status to false after a certain time, and if the motion/presence messages keep coming in the timer keeps restarting?

As I don’t have the device myself would you mind sharing a few more messages like the above, and when they occur, alomng with some of the correctly decoded messages when motion/presence is deteced?

Thanks

P.S.

There is not battery decoding so far, as we don;t think the battery level is being transmitted. If you think/know otherwise, we’d have to do more analysing of the servicedata.
CORRECTION - @1technophile also has the device and we just found the battery information in the data. So that will be in an update to the decoder soon :wink:

Hello,

Was this with a presence detected or without ?

Also could you check your firmware version mine is 2.2.0, and I tested also with 2.3.4

Those messages are interspersed with proper lux and presence messages. I’m not seeing any clear pattern.

Unfortunately HA only allows to mark a sensor as stale and change the value to “unavailable” if it hasn’t changed for a while. That’s as far as I’m aware.

The device went dark for 2 hours. Seems like it doesn’t transmit if there hasn’t been movement for a while (it was stuck on the last lux measurement even though the lighting has changed). Once I passed by it I immediately got 3 messages with lux and presence


Then it kept sending these same undecoded messages interspersed with lux measurement. Sometimes a few in a row between lux measurements.

I see no further fdcd messages at the moment.

When I connected to the device with the telink flasher, either the original by Aaron, or the new one from pvvx, the device shows lux, motion 0 or 1,and battery percent.

@1technophile I see the version on mihome as 1.1.1_0234

1 Like

Thanks a lot for the additional messages.

If you want to try the changed version, with battery, and correct true/false motion detection, you can change the Decoder URL to

decoder = https://github.com/theengs/decoder

Thanks

Battery works with V0.8 of the decoder. Thanks!
Still getting the fe95 messages if that’s relevant

That is expected, but not an issue.