[Deprecated] Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)

Just noticed the following error messages on a couple of devices:

  1. Original xiaomi round button on latest driver 0.8.5:

[error] java.lang.NullPointerException: Cannot invoke method getAt() on null object on line 73 (parse)

and

2} Aqara temperature and humidity sensor (square version) on 0.8.2:

[error] java.lang.NullPointerException: null (parse)

I have no idea what the issues might be unfortunately.

Hi I am a new Hubitat owner.

I have many of Aqara Smart Wireless Curtain Motor (B1) ZNCLDJ12LM any way driver is available for these ?

I have never seen any out-of-bounds humidity values reported from any of the Xiaomi or Aqara Temperature-Humidity sensors.

It's concerning that you're seeing that value as often as you are. The raw read attribute message is correct correctly formatted for a humidity value report, but the last two bytes - the message payload with the humidity value itself - make no sense.

What are the surrounding reported values like? High or low?



These errors are from non-useful messages that the drivers weren't written to ignore. I need to add code to skip them which would get rid of the annoyance of the errors. However, those errors won't stop the driver from working as expected otherwise.



I don't personally own any Aqara Curtain Motors, so I would have no way to test a driver. It's possible to port the SmartThings device handlers, though. It would require some end-user testing to get it working.

Hi,

I have the Xiaomi original motion sensor but it only detects motion once per minute. I can set it to become inactive after x seconds, but it only detects motion again after 60 seconds and it only become active again after that time.
Is this the normal behavior? or is there any way to change this?

Thanks for that (and also for the time you've put into the drivers! :+1:)

On a new note I know you've mentioned somewhere that we have no control over the reporting frequency for the aqara temp/humidity sensors but it's the only xiaomi device that seems to burn through batteries (1-2 months max, whereas my other sensors are still running 1 year on). Would the original xiaomi ones be a better bet? I really don't need to know the temps every other minute :grinning:

Yes.

Yes to that too.

There is a mod out there in one of the threads that will allow the sensor to be ready to report motion every 5 seconds instead of the default 60 seconds.
Have a search you may find it or can someone else point us in the right direction?

Here it is.

1 Like

It is the normal behavior, and can't be changed programmatically. However...

It can be changed with a fairly simple hardware modification, if you're not afraid to open up the motion sensor:

And here are some additional notes by Hubitat user @SmartHomePrimer:



Hmm, I have bunches of both the Xiaomi and Aqara-branded Temp-Humidity Sensors and all of their batteries have lasted well over a year, with the one exception being an Aqara sensor I've mounted just outside my front door. I am not surprised by the shortened battery life on that one because of the colder temperatures.

Either way, the Xiaomi-branded sensor reports based on temperature / humidity changes, the same as with the Aqara one, so you wouldn't see much difference in the frequency of reporting. I honestly don't have enough data with battery life to know which of the two lasts longer given the same battery brand / age.

1 Like

Thank you for your answers, seems like a simple hack and I'm going to try it.
I will let you know how it went

1 Like

No worries thanks. I've only got the one aqara sensor but have a couple of the originals on the way to compare.

I have 65 Aqara Temp/Humidity/Press sensors running for about six months now, the only ones where the batteries show a significant voltage drop are outside in the cold. The indoor sensors have an initial voltage drop during first week or two then stabilize.

1 Like

Holy mackerel! That's a lot!!

I notice this with both temperature and humidity on one of my sensors as well, but it's one that I've kept outdoors (covered, but outdoors) and just figured the weather finally got to it. It did it even when I took it inside for a while (wasn't sure if sub-0-degrees C temperatures were special; I know they've been problematic before). None of my other sensors--all of which have remained indoors the whole time they've been in use--have been doing this.

I'm not sure exactly how these two anecdotes would connect unless perhaps the bathroom has excessive humidity on occasion or it's very near a water source (I wouldn't doubt that there's been condensation on or at least near my outdoor sensor at some point). I told myself that at this price, I don't care too much...but I am trying to figure out how to get the several-hundred-degrees-below-zero readings out of my Home Assistant history graphs. :slight_smile:

1 Like

Yep, I bought 100 on Alibaba with two day DHL shipping. I've got 4 Hubitats and one zigbee2mqtt system. 24 condos and 30,000 sq ft.

1 Like

All the surrounding values are normal. It would report in something like "37.5, 38.0, 37.5, 37.0, 654.4, 37.5, 37.0 etc" It shows up almost every hour and the correct humidity is reported almost right after as well. So its like this message is a status message of some sort.

The raw command is always the same when it send in that weird reading. Its doing it on all of my sensors so I'm wondering if its something that was changed in 2.1.7. I'm usually running the latest beta but that one is now released to all.

For now I just filter out that value so it doesn't affect me, but something to keep an eye out for. I only noticed it because my bathroom fan automation was kicking in randomly and this is the reason why.

Just out of curiosity, have you had any issues with those sensors?

  • falling off the Zigbee mesh (i.e. not reporting every hour)?
  • just going "off the air"?

No more dropouts since increasing the mesh from 6 to 11 routers per building. Not sure if my heterogeneous mixture of routers has anything to do with it.
4 IKEA plug outlets per building
6 CC2531 routers per building
1 Aqara plug per building paired only as a device

Parent child parameters
EzspGetParentChildParametersResponse [childCount=0, parentEui64=0000000000000000, parentNodeId=65535]

Child Data

Neighbor Table Entry
[IKEA RouterPlug 206, 09A2], LQI:223, age:3, inCost:5, outCost:7
[DIY Router 204, 1472], LQI:255, age:3, inCost:1, outCost:1
[DIY Router 203, 3856], LQI:254, age:3, inCost:1, outCost:3
[DIY Router 201, 769A], LQI:255, age:3, inCost:1, outCost:1
[IKEA RouterPlug 205, 7A5A], LQI:234, age:3, inCost:5, outCost:7
[DIY Router Spare 202, 81E0], LQI:253, age:3, inCost:3, outCost:5
[IKEA RouterPlug 202, A9FE], LQI:255, age:3, inCost:1, outCost:5
[IKEA RouterPlug 201, C426], LQI:254, age:3, inCost:1, outCost:7
[DIY Router 206, DF76], LQI:250, age:3, inCost:3, outCost:7
[AqaraPlug Router 205, E4FF], LQI:187, age:3, inCost:7, outCost:0

Route Table Entry
status:Active, age:64, routeRecordState:0, concentratorType:None, [AqaraPlug Router 205, E4FF] via [DIY Router 206, DF76]
status:Active, age:64, routeRecordState:0, concentratorType:None, [DIY Router 206, DF76] via [DIY Router 206, DF76]
status:Active, age:64, routeRecordState:0, concentratorType:None, [DIY Router 201, 769A] via [DIY Router 204, 1472]
status:Active, age:64, routeRecordState:0, concentratorType:None, [DIY Router 203, 3856] via [DIY Router 203, 3856]
status:Active, age:64, routeRecordState:0, concentratorType:None, [DIY Router Spare 202, 81E0] via [DIY Router 201, 769A]
status:Unused
status:Unused
.......
Notice how the Hubitat prefers CC2531 (DIY) routers

1 Like

Well here's an indication of how busy I've been since the summer: My hub is still running 2.1.5.124, though I could swear I had updated to 2.1.6.

Anyhow, I've looked through all the release notes of 2.1.6 and 2.1.7 and see nothing that would indicate a change to the Zigbee stack, which is the only thing I can think of that would alter how messages received from the sensor are parsed.

I've backed up some hours of old logs from a couple of my T/H sensors, and will now update to 2.1.7.125 to see if there's a change. My suspicion is that there may be some messages which are part of the hourly check-in that were previously filtered out but are now passed on to the driver as of firmware 2.1.7. If true, then I just need to add code to filter out the non-useful messages that are producing the out-of-bounds values.

I'll report back when I've seen enough logs to know either way.

1 Like

I'm on 2.1.7 and have ~15 of the temp/humidity sensors. I haven't received any weird readings (humidity or temperature). Since going to 2.1.7.

I know that doesn't help @gavincampbell, but I thought another data point may be useful.

2 Likes

Definitely helps.

Interestingly enough, three of my sensors eventually had their battery die and I replaced the batteries.. I just looked at my past logs and have not seen it report on those threerecently. However my two other sensors are still kicking the error every now and then.

Just a wild thought but wonder if its related to the battery about to die. I'm going to keep an eye on things and see if these other two sensors are going to die any time soon.

I am on Xiaomi Temperature and Humidity Sensor and using Version 0.8.2 of the driver by veeceeoh.

I notice that after adding it to Hubitat, the sensor stops reporting readings 1-2 hours later. For example, after adding the sensor at 5AM, I receive readings whenever there are changes in temperature/humidity. This goes on until 1-2 hours later when it goes silent.

I tried to use 'Discover Devices' and Hubitat was able to detect the sensor and readings are reported fine but this time, the readings only lasted for 30 minutes or so.

Battery level is 100% and I had removed and re-added the sensor as well.

Just wondering if there's any step I had missed out:

  1. Activate device discovery on Hubitat
  2. Long press button on Xiaomi temperature sensor
  3. Hubitat found sensor and tried to add it (in my 2nd attempt to re-add the sensor, I had also short press the sensor repeatedly to keep it awake)

Appreciate any advice, thanks!