[RELEASE] Xiaomi Drivers with Health Status and Zigbee2MQTT

Well, that's going to be an annoyance. When I get a C-8 (I'm dragging my feet) I suspect what I will do is leave my Aqara/Xiaomi devices and some Iris outlets (as repeaters) on a C-7, isolating them from the rest of my Zigbee mesh which I'll move tho the C-8.

That reminds me... when I did a backup migration from my original C-7 to the C-7 with the antenna mod, it took almost a week to get the Aqara devices happy again. They'd continually drop and I'd reset them over and over. Finally it stabilized.

1 Like

Undoubtedly, this will be the best approach. It always works independently of the home automation platform, not just HE.

Interesting, I will follow your experience with the C8 closely. :slight_smile:

All of my Aqara sensors (leak, temperature, contact) made it through the migration without issue and have stayed on the mesh for almost 24 hours. No re-pairing needed. Interestingly, none of the 65 zigbee devices in that mesh are directly connected to the C-8- verified by XCTU.

Repeaters:
6 eWelink outlets
2 XBees
2 Iman's Environmental sensors

2 Likes

What's this antenna mod of which you speak?

I'm still in the process of re-pairing the ones which are dropping, in a frustrating game of whack-a-mole. :slight_smile:

The usually well-behaved light sensor is refusing to pair at all currently, so it'll probably get moved to my AlertMe mesh (where they're happy all the time, this one was a test case). I've only re-paired one of the mini buttons and that's been hit-and-miss, though surprisingly it's still paired this morning.

It's the "wireless remote switches" which I have on the walls that are the important ones, so I'm concentrating on getting them all back. Thankfully the family have chosen to see this round of interruption as amusing for the time being, as everything's controllable through HomeKit via Homebridge anway. Phew.

and

1 Like

Couldn’t keep my hands of an C8 so I ordered and got one a few days ago.
Seems like one button and one motion sensor are giving me some troubles. They have worked flawless for years before.
The rest of my Aqara buttons, motion sensors and temperature sensors works fine.

Well, I've ended up having to rethink.

I could not get the C8 and the Xiaomi gear to work reliably at all. Some devices were absolutely solid and would work perfectly... and others of the same device and firmware version would drop within a couple of hours. And it wasn't even dependent upon proximity to the hub or a repeater - switches within centimetres of one another would have one working, one constantly dropping.

Instead, I've come up with a completely new solution. These drivers now contain compatibility with a Zigbee2MQTT parent driver which I'm planning on releasing. I've got a bunch of devices moved off Hubitat's Zigbee radio and on to Zigbee2MQTT... and it's looking really good.

Once I've given it some more testing I'll throw it out there. It's actually amazing to have an independent Zigbee mesh and then the Hubitat platform to control everything, to the point that I'm wondering why it's not an official thing.

2 Likes

I have the same problem with Aqara device with the new C8. None of them are working but a newer P1 motion the older units will not pair or if they do pair they will drop off within minutes tried all the radio stuff, on the new C8 running the latest software So the newer Aqara p1 motion is fine and doesn't drop, but all the older Aqara devices drop off and have a tough time connecting. I have three devices older Aqara, Motion, buttons wxkg11lm and Contact sensor,MCCGQ1LM, none of these will stay connected and will not pair correctly running on a C8 with firmware 2.3.5.110, Using drivers that worked on the C7 hub and had no issues. So any suggestions would be greatly appreciated, I have tried all the above suggestions only to have them drop off within a few minutes and then will not reconnect.

Well, it's probably not an answer you'll like given you (as I) are C8 owners, but family pressure to operate the lights required a rapid solution, so I came up with this Zigbee2MQTT integration.

I suppose your other option would be to run the C7 and C8 together and use Hub Mesh to share devices between them, with your Xiaomi bits on the C7.

I kind of regret switching my C7 for a C8. Can’t understand how the C8 can fail when the C7 been rock solid in the EXACT same environment and setup.
Unfortunately I can’t blame anyone but myself since a few people already mentioned this…

Hi guys, i'm having problems.
Been trying to get Mi Light Sensor working. Have tried marcus and another persons code but they didn't work. Stumbled upon yours and i'm finally getting a "illuminance" current state but it just says 0.

What i've done:
Installed via HPM 1.8.8.
Clicked configure.
Re-Paired the sensor.
Changed the battery.

It's a GZCGQ01LM.
I only get this info:

Current States

  • illuminance : 0
  • presence : present
  • pushed : 1

State Variables

  • rawLux : 0
  • presenceUpdated : 0

Log file

dev:1722023-03-15 07:00:44.055 PMwarnLux : Presence : Waiting for first presence report.
dev:1722023-03-15 06:56:40.939 PMtraceLux : Trace Logging : Automatically Disabled
dev:1722023-03-15 06:50:44.022 PMwarnLux : Presence : Waiting for first presence report.
dev:1722023-03-15 06:40:44.318 PMwarnLux : Presence : Waiting for first presence report.
dev:1722023-03-15 06:36:40.946 PMtraceLux : Trace Logging : true
dev:1722023-03-15 06:36:40.946 PMdebugLux : Debug Logging : true
dev:1722023-03-15 06:36:40.945 PMinfoLux : Info Logging : true
dev:1722023-03-15 06:36:40.944 PMinfoLux : Preferences updated.
dev:1722023-03-15 06:36:40.852 PMinfoLux : Configuration complete.
dev:1722023-03-15 06:36:40.836 PMtraceLux : sendZigbeeCommands received : [zdo bind 6664 0x01 0x01 0x0000 {04CF8CDF3C819A78} {}, zdo bind 6664 0x01 0x01 0x0001 {04CF8CDF3C819A78} {}, zdo bind 6664 0x01 0x01 0x0003 {04CF8CDF3C819A78} {}, zdo bind 6664 0x01 0x01 0x0400 {04CF8CDF3C819A78} {}, zdo bind 0x6664 0x01 0x01 0x0001 {04CF8CDF3C819A78} {}, delay 2000, he cr 0x6664 0x01 1 32 32 3600 3600 {} {}, delay 2000, zdo bind 0x6664 0x01 0x01 0x0400 {04CF8CDF3C819A78} {}, delay 2000, he cr 0x6664 0x01 1024 0 33 3 3600 {6400} {}, delay 2000]
dev:1722023-03-15 06:36:13.340 PMtraceLux : Trace Logging : true
dev:1722023-03-15 06:36:13.339 PMdebugLux : Debug Logging : true
dev:1722023-03-15 06:36:13.338 PMinfoLux : Info Logging : true
dev:1722023-03-15 06:36:13.337 PMinfoLux : Preferences updated.

Please tell me what obvious thing i'm doing wrong.
If I pair it to my old smartthings hub it works and updates the lux changes very quickly. I've tried 3 other driver codes and now this package but cannot get any form of decent data out of the sensor.

Also on an unrelated note, how do I change my username?

Hi,

You may need to pair the Aqara Light sensor again to the Hubitat hub. Don't delete the device, just pair it again with this driver already assigned.

On the username change - you can send a direct message to @ bobbyD .

Didn't realize you could do that. It's an Xiaomi/Lumi sensor btw.
So I re-paired the sensor without deleting it. The only thing that changed was the presence updated.

State Variables

  • presenceUpdated : 1678878006037

I clicked on configure and it says complete.
This is the log.

dev:1722023-03-15 09:02:29.473 PMinfoLux : Preferences updated.
dev:1722023-03-15 09:02:29.330 PMinfoLux : Configuration complete.
dev:1722023-03-15 09:00:06.045 PMinfoLux : Configuration : Received by device.
dev:1722023-03-15 08:59:59.996 PMtraceLux : Trace Logging : false
dev:1722023-03-15 08:59:59.995 PMdebugLux : Debug Logging : false
dev:1722023-03-15 08:59:59.994 PMinfoLux : Info Logging : true
dev:1722023-03-15 08:59:59.993 PMinfoLux : Preferences updated.
dev:1722023-03-15 08:59:59.915 PMinfoLux : Configuration complete.
This is where I re-paired the device.
dev:1722023-03-15 08:50:44.019 PMwarnLux : Presence : Waiting for first presence report.
dev:1722023-03-15 08:40:44.020 PMwarnLux : Presence : Waiting for first presence report.
dev:1722023-03-15 08:30:44.062 PMwarnLux : Presence : Waiting for first presence report.
dev:1722023-03-15 08:20:44.068 PMwarnLux : Presence : Waiting for first presence report.
dev:1722023-03-15 08:10:44.024 PMwarnLux : Presence : Waiting for first presence report.
dev:1722023-03-15 08:00:44.061 PMwarnLux : Presence : Waiting for first presence report.

This might be helpful too. I don't know. Pulled from event log when re-pairing.

id: 4022184
Date: 2023-03-15 21:10:20.561
Name: configuration
isStateChange: true
physical: false
digital: false
source: DEVICE
value: received
deviceId: 172

This info is under device details

  • endpointId: 01
  • application: 1B
  • driver: v1.16 (10th March 2023)
  • encoding: Zigbee
  • manufacturer: XIAOMI
  • model: lumi.sen_ill.mgl01

Hmm, odd. I've not got time right now, but I'll try this with my test sensor later on and get back to you. We've both got identical devices. :+1:

1 Like

I'm using THIS driver from for the same sensor which works fine.

Yeah I think I've already used every other driver available on the internet. I spent hours yesterday reading through multiple forums and trying each piece of code but this sensor is putting up a fight.
Here are the driver codes I've tried.
https://www.dropbox.com/sh/268neu5007du7pj/AADn3nH0cqp9BHGC0bAeoK_sa?dl=0

As far as Ive found I'm having the EXACT same issue as AlanB from the forum below. If you want to know what outcomes came from other drivers I got the same results as him.

Here's a question for you, @ShaunTheBaa... which Hubitat hub are you using?

I have the Xiaomi Mija Smart Light Sensor and I've been using the Oh La Labs driver since I first installed it a few years ago, works w/out issue.

Maybe my model is different?
image

Hubitat Elevation C7.
Just tried updating it too.

Currently running version: 2.3.5.102

New version available: 2.3.5.110

Then re-paired but no difference.