[OBSOLETE] Xiaomi Sensors and Button (beta)

I don’t believe so. On that same Aqara sensor, the reported voltage went down to 3.015V before it dropped its connection:

Also Frédéric Dubois post most definitively identified those two bytes as the ones which report the current voltage, both by monitoring the value drop over time, and by applying a known voltage.

Hey guys, any idea how I can get this to work. The sensor detects smoke and beeps, and the device handler you guys provided (both of them tested), is added, but never registers smoke. It is always clear, and it does not report last tested status. how do you test it by the way? from the app or by holding the button on device?
nevermind, it worked! however, it essentially made every single zigbee device I have to stop functioning.

I meant the voltage provided under this message.

Attribute OxFF01 could be the max voltage.

Ah… I see.

Well, other log entry I saw right before the one reporting the battery voltage was this:

12:22:01 AM: debug Xiaomi Aqara Door Sensor: Parsing CatchAll: 'SmartShield(clusterId: 0x0000, command: 0x0a, data: [0x01, 0xff, 0x42, 0x1d, 0x01, 0x21, 0xc7, 0x0b, 0x03, 0x28, 0x11, 0x04, 0x21, 0xa8, 0x13, 0x05, 0x21, 0xce, 0x00, 0x06, 0x24, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x21, 0x00, 0x00, 0x64, 0x10, 0x01], destinationEndpoint: 0x01, direction: 0x01, isClusterSpecific: false, isManufacturerSpecific: true, manufacturerId: 0x115f, messageType: 0x00, number: null, options: 0x0100, profileId: 0x0104, senderShortId: 0xd353, sourceEndpoint: 0x01, text: null)'

The 0xFF01 attribute is there as well (0x01, 0xff = 0xFF01) and the voltage bytes are #7&8 of the data portion of the parse (0xc7, 0x0b = 0x0BC7 = 3015 --> 3.015V).

So I really think you’ve got the correct bytes to read the voltage in the DH.

Add this DH: https://github.com/snalee/Xiaomi/blob/master/devicetypes/a4refillpad/xiaomi-zigbee-button.src/xiaomi-zigbee-button.groovy

Delete your button from the device list and then re-pair. See if that works. It will take 10-20 seconds after pairing for the Smartthings app to show the device.

So over the last few days I have tried to pair my 7 Temp/Hum sensors. What I have done is that every time that the sensor gets lost I do the catch all again. SO over the last 3-4 days of the 7, 3 have been connected for the entire time. 2 I have had to reconnect 3 times, one I have had to connect 5 times and one I can’t keep connected. On the catch all I never deleted the Device. I kept on just putting in the new network ID. I put all of these in the same place so that environment would have no effect. All provide all the information. Battery’s are getting low on a few and the one that I can’t keep adding the battery is down to 66%. What was interesting is that the three that have stayed on since the start have had fresh batteries installed. SO my next step, for the one that will not stay connected, would be to replace the battery and see if that has an effect.

So when I added the new DH and tried to pair the button through the app, it comes as “Thing”, and when I add it the device just says “Tiles Missing” and I cant do anything with it in the app. In the IDE it shows up as device type “Unknown”. If I delete the device and add in manually as Xiaomi zigbee button it works as it did before. Same results. Worked fine for the first couple hours (still no battery read out) but tested this morning and not seeing button presses anymore in activities log.

Pair via the app, not the catchall. When you pair via the app you will see a zbjoin in the hub events once you have succeeded.

Did you remove the other DH from the Device Handler list? Most likely you have more than one DH with the same fingerprint.

Adding manually is most likely why it’s dropping for the Aqara. Adding it using the App and with proper fingerprinting, the device will get its zigbee id stored. After I did this with one of my sensors that kept dropping, it never dropped again.

Yes I removed the old DH before adding this one.

I would like to pair from the tool but I can never get it added that way. I would need to turn off a LOT of zigbee devices to do that from what I understand it the process to use the app.

Well I knew it was to good to be true. Two of the seven just went TU. That makes a total of three There has got to be a better way then turning off every Zigbee device I have. Maybe I will only have three that drop…Fingers crossed

When you pair the device, look at the hub “list events” and see if there’s a catchall followed by a zbjoin (just keep refreshing until you either see it after a short time or you never will). If you don’t see that message, then it’s probably going to be hit or miss whether the device stays connected. If you do see zbjoin for that network id found in the catchall, then paste the value here.

OK will give it a shot tonight

Ill get one of these after Christmas (the New Version) and make a holder for it too.

I happened to be right in the middle of trying to pair my first Xiaomi Button while you were chatting. Almost gave up if I hadn’t randomly seen this. The key is looking in the HUB event log and not the general Live Logging tab, which shows nothing of the new device. I used it with the handler from a4refillpad and got it to work quickly once I found the correct catchall.

Thanks for this, I was about to trash the thing :slight_smile:

Last night I moved one of my aquara temp sensors to a new location and it worked all night. I know this because I am controlling a room heater with these temperature sensor readings and a virtual thermostat.

I am not sure why, but after working all night perfectly, it dropped in the morning. I didnt delete the device physically, it just kept on saying that cannot reach device etc. All my other devices were working fine.
Just now I tried looking at the status of that sensor and seems like it is back online. I am not sure what exactly happened, but has anyone seen any issues like this before? If so, is there a known fix for this?

Try it with my handler: https://github.com/snalee/Xiaomi/blob/master/devicetypes/a4refillpad/xiaomi-zigbee-button.src/xiaomi-zigbee-button.groovy

You should delete and re-pair it after publishing the DH code and it should show up as a Xiaomi device when paired.

Hi,

I’ve just received a batch of Aqara Motion sensors today from Gearbest. I’ve only had my hub a week, so a bit of a noob currently.

I’ve added the device handler, and I’m spamming the button whilst searching for things, and it’s picking up my ‘thing’. However, it’s not detecting it as a sensor and there are no events showing the ide.

It’s showing the following which doesn’t appear to match what is in the DTH code:

model: lumi.sensor_motion.aq2
application: 05
manufacturer: LUMI
endpointId: 01

Raw Description: 01 0104 0107 01 07 0000 FFFF 0406 0400 0500 0001 0003 02 0000 0019

Have I got a new version of the sensor which isn’t supported yet, or is it just not pairing properly? I’ve tried editing the device in the IDE to select Xiaomi Aqara Motion Sensor but it doesn’t do anything.

Thanks for any help.

Try this DH version: https://github.com/snalee/Xiaomi/blob/master/devicetypes/a4refillpad/xiaomi-aqara-motion-sensor.src/xiaomi-aqara-motion-sensor.groovy

Delete and re-pair after publishing the above DH. Try to do a normal pairing (not the manual catch-all method).

1 Like