eschava / node-red-contrib-xiaomi-ble

Xiaomi Bluetooth4 (BLE) sensors
MIT License
20 stars 15 forks source link

Support for ClearGrass humidity/temerature sensor #15

Open dedors opened 5 years ago

dedors commented 5 years ago

There are 2 new versions of a sensor which also works in the Mi Home app and has e-ink: One is the upgraded LCD version: https://cleargrass.com/cg_temp_rh_monitor/overview

Manufacturer Name: Qingping Technology (Beijing) Co., Ltd. Model Number: CGG1

Using the current node does work but only returns battery value.

somebody got it to work with noble: https://github.com/alexvenom/XiaomiCleargrassInkDislpay

Second one is one with a clock: https://www.aliexpress.com/item/32997941031.html Did nout found any more info about this one yet.

Can these be supported?

michapr commented 5 years ago

What is the model number for the e-ink version of temp/hum sensor? And for the second one? (link is not working more)

dedors commented 5 years ago

Model number of the fist is CGG1. It Identifies as "ClearGrass Temp & RH" on bluetooth scan.

Model number of the second (square with time, humidity and temperature) is LYWSD02MMC. It identifies as "LYWSD02" on bluetooth scan. On this one I also get only battery status. Maybe some reference: http://www.techort.com/how-i-took-data-from-the-ble-thermometer-from-xiaomi-habr/

(Both can only be added on china server in Mi Home so far I think, which I can't login. That means with the second one, I also can't set the correct time.

The fist one reports a battery status of only "12", even on the display it shows full battery (battery symbol with 5 steps))

szappanyos commented 4 years ago

I have integrated the following code and it works: https://github.com/alexvenom/XiaomiCleargrassInkDislpay/blob/master/XiaomiClearGrassInk.js

Here is my branch: https://github.com/szappanyos/node-red-contrib-xiaomi-ble/tree/support-cleargrass-cgg1

I haven't made a PR because I don't think it is integrated correctly and I think it breaks some things. I think it doesn't work if you try to use more devices in parallel.

caobach42 commented 4 years ago

Hi @szappanyos, I couldn't make it works with clear glass version, only get battery 12 sometimes Could you check code?

szappanyos commented 4 years ago

@caobach42 I have made a fix. Also make sure that you are using the support-cleargrass-cgg1 branch.