[RELEASE] Xiaomi Mijia Smart Light Sensor GZCGQ01LM (Zigbee 3.0)

Okay will check again tomorrow.

FYI I have occasionally seen battery levels of -999 when first paired but it always resolves itself and starts reporting correctly.
Never had the lux issue though. :thinking:

1 Like

Got bored. So I removed both devices from HE. Restarted the HE (accidentally), and then paired both of them.

Both are showing lux perfectly now. One of them is also showing battery perfectly. The other isn't showing battery yet - but I'm sure it will populate soon (Edit: battery is now also shown)

Strange - don't know what caused this, but it all works well now.

I also don't like waiting :wink: :grin:

Deleted the device, moved it next to the hub and then paired it again and all is working, battery and lux. Maybe it does not light pairing through a repeater? Only thing I can think of?

I had the exact same issue you did when I paired mine a couple of days ago. First no lux then 3576843.
Whether or not it was just luck I ended up changing the minimum reporting interval, initialized it and then repaired and it work straight away.

1 Like

Nice! Does sound like an issue with HE that required device removal and a reboot, but I don't understand that at all. What could be broken for that to have an impact?

This is the part I don't understand, when the device is deleted the risk of not sending all commands on time during pairing is high due to the delay inherent in selecting the driver instead of already having it selected. Great it is working though!

If this could be recreated reliably as an issue it would be something to change, but I don't see how that could be it? Thank you for mentioning it though.

1 Like

Tried all of the above but still get 3576843 IL readout.
After removing device, rebooting hub and reinstalling no IL. After adding again aswithout removing crazy # for IL.
Am i missing a step?

SB

Oddly enough the exact same 1 i installed 2 weeks ago had zero issues.

Can you post the pairing logs? It might help @markus diagnose the issue. When I had this issue with two of them (out of 4), only three BIND confirmation were being received. When they paired correctly (i.e. both lux and battery worked), there were four BIND confirmations ....

The only thing left to try is short-press the button on the device once and wait 5-6 seconds, if that doesn't work try with a 1-2 second interval for 5-6 seconds. This sends the configuration commands again.

This issue is an odd one, try changing "Minimum Update Time" to 60 before doing the above. This really isn't supposed to happen and I can't reproduce.

Oddly enough it's the fresh install hold till reset, then waiti 6 seconds and press that worked. I'd been dpoing push after long press of every 2 seconds (like i do other Aqara devices) that gave it the crazy IL reading,

Working fine now - much thanks for all the help!

SB

2 Likes

I installed my first Mijia Lux sensor today. Everything went smoothly once I read your instructions :slight_smile:

Thanks so much for writing and sharing this code :sunny: :smiley: :+1:

John

2 Likes

Thanks! I just moved one of these over from SmartThings and this seems to be working fine. In fact, I had an easier time pairing it here than over there.

2 Likes

I got two of them, and both have -500% battery, and 3576843.0 Lux.
Tried a few times, already. no luck so far.

dev:3152020-08-29 01:48:26.724 pm infoReceived BIND Confirmation with sequence number 0xA8 (a total minimum of FOUR unique numbers expected, same number may repeat).

dev:3152020-08-29 01:48:26.613 pm infoBattery voltage received - description:read attr - raw: F1AA0100010A20002000, dni: F1AA, endpoint: 01, cluster: 0001, size: 0A, attrId: 0020, encoding: 20, command: 01, value: 00 | parseMap:[raw:F1AA0100010A20002000, dni:F1AA, endpoint:01, cluster:0001, size:0A, attrId:0020, encoding:20, command:01, value:00, clusterInt:1, attrInt:32, valueParsed:0]

dev:3152020-08-29 01:48:26.425 pm infoDevice confirmed LUX Report configuration ACCEPTED by the device

dev:3152020-08-29 01:48:26.317 pm infoReceived BIND Confirmation with sequence number 0x9F (a total minimum of FOUR unique numbers expected, same number may repeat).

dev:3152020-08-29 01:48:25.824 pm infoReceived BIND Confirmation with sequence number 0xB3 (a total minimum of FOUR unique numbers expected, same number may repeat).

dev:3152020-08-29 01:48:25.718 pm infoReceived BIND Confirmation with sequence number 0xB1 (a total minimum of FOUR unique numbers expected, same number may repeat).

dev:3152020-08-29 01:48:25.516 pm infoReceived BIND Confirmation with sequence number 0xA7 (a total minimum of FOUR unique numbers expected, same number may repeat).

dev:3152020-08-29 01:48:25.441 pm infoSending lux event (lux: 3576843.0, change: null)

dev:3152020-08-29 01:48:25.253 pm infoDevice confirmed BATTERY Report configuration ACCEPTED by the device

dev:3152020-08-29 01:48:25.252 pm infoReceived BIND Confirmation with sequence number 0x7F (a total minimum of FOUR unique numbers expected, same number may repeat).

dev:3152020-08-29 01:48:25.106 pm infoDevice confirmed LUX Report configuration ACCEPTED by the device

dev:3152020-08-29 01:48:24.899 pm infoReceived BIND Confirmation with sequence number 0x9F (a total minimum of FOUR unique numbers expected, same number may repeat).

dev:3152020-08-29 01:48:24.836 pm infoReceived BIND Confirmation with sequence number 0x9E (a total minimum of FOUR unique numbers expected, same number may repeat).

I have the same one and have had no issues.

I'm using driver; markus

John

I was pairing them next to the environment sensor repeater, so only 3 out of the 4 bind confirmation were received.
when I moved closer to the hub, they paired and got both battery and lux correctly.

2 Likes

I just wanted so say thank you because it is working so well.

Thank You @markus

2 Likes

I had trouble with one of these. First it joined but I never got the battery or illuminance. Tried rejoining with the same result. Deleted the device from HE and tried rejoining but it would hang up on "Initializing" and never finish. Tried placing the device next to the nearest repeater and got the same result, namely stuck on "Initializing".

Finally placed the device right by my hub, did the long press reset (about 10 secs) and then started the Zigbee join and it found the device and initialized it right away. A single short press click and the battery and lux came through right away.

Just something to try. Thanks for the driver Markus. I was happy when I saw that it was you who wrote it.

Markus, just as an aside I was hoping I could get a sub-second response rate on these to lux changes. My idea was to have the action of a regular light bulb turning on\off act as the trigger for turning other smart devices on\off. In practice I get a response time of about 3 seconds when "Minimum Update Time" is set to 1. I looked at the driver and it seems that the "secondsMinLux" must be an integer in the range of 1 to 3600.

Is there any way to make the response faster? Just curious. I don't have a specific plan but these were only $10 on AliExpress so I bought a couple for the fun of it.

I think something funky is going on, because I get exactly the same thing now - though previously I had the device paired and working perfectly. I would even have described it as my most reliable Xiaomi device!

I will break my own rules and take it to the hub to re-pair, as described by @garyjmilne, to see what happens. :slight_smile: