[RELEASE] Xiaomi Sensors and Button (beta)

Ofc I used the DTH posted here, tried adding it countless times, still can’t get a reading.

There are 2 dth for the temperature sensors did you alternate between the 2 of them in the IDE, I was having the same issue by alternating the dth I starting receiving a reading.

@cscheiene Line number didn’t look the same in the DH now, if you can tell the code from “XXX” to yours, that will be easier for us to locate…

Thanks in advance.

@Necromancer, have you pair the device with catchall in this link [RELEASE] Xiaomi Sensors and Button (beta) ?

what two DTH?

I only see one

EDIT: tomtong
adding exactly that way.

Do you have events listed under your device like the attached?

https://github.com/bspranger/Xiaomi/tree/master/devicetypes/a4refillpad
There are 2 of them, one for the Aqara and one for the non Aqara.

I guess your reading is from a paired device, this is my reading

tried all of the DTH…

@Necromancer, from the events, I think you did paired the device but no event after that. If you don’t mind me asking, have you publish your dth?

?

pretty sure it is published

Have you try a short press on the reset button after the pairing? Some ppl
said that will help…
BTW, I used Aqara dth myself.

Yeah it blinks twice and I guess it suppose to wake up the sensor but the hub doesn’t get any comms

I have just received my Aqara Curtain Motor and I am happy to report that the device automatically pairs with Smartthings although with a generic device handler (i.e., no need to search for a catchall). You just need plug the motor to electric power, click ADD THING on the APP and press the motor button for 5 seconds until the blue light starts flashing rapidly. I replaced the default device handler with the one for Xiaomi Outlet and the Aqara Curtain Motor works perfectly! Unfortunately I have not received yet the curtain rails, once I have them I will draft a more specific device handler.

2 Likes

Please forgive my long post. By the way there are some questions at the bottom :grin:

So, just paired down 4 brand new Aquara Temp sensors successfully using bspranger’s DH and a slight distinct approach based on catchall’s procedure.

  • I opened the IDE, went to ‘My Hubs’, selected my hub and then clicked on ‘List Events’
  • I opened the Smartthings app on my iPad and clicked on Add a Thing
  • I held the reset button until it stopped flashing and then released the button. One more flash. Then, once more clicked the reset button until I saw 3 flashes
  • Went back to the IDE ‘List Events’ and found several messages including a “deviced Add” | “Thing added”. Got excited but no cigar. I couldn’t see any new Devices/Things. Maybe bspranger’s DH deviceID wasn’t correct (still don’t know)
  • From ‘Displayed text’ column I copied the zbjoin message to notepad. Here goes an example:

zbjoin: {“dni”:“BFE0”,“d”:“00158D0001DBD285”,“capabilities”:“80”,“endpoints”:[{“simple”:"01 0104 5F01 01 06 0000 0003 FFFF 040…

I highlighted some fields I found interesting. More about them down below.

  • Back to the IDE, I decided to manually create a Device. I used dni as Device Network ID and d as Zigbee Id. Device created. Humm, so far so good.
  • Waited a little, quick pressed on the reset button (two flashes) and voilà, I could see the temperature, humidity and pressure (no battery status yet).
  • Decided to go back to Smartthings app and click on Add a Thing again. It found the device (not sure if it was for real or just a side effect)
  • After some time (several minutes) the battery status showed up

Now the odd part.

All 4 devices show on my IDE and I can see frequent activity. I am testing ActionTiles and the 4 devices show all the information (including battery status).

However, the Smartthings app on my iPad and Android phone only show 3 things and not 4. Any idea why? Any tips? Should I delete the device and re-pair it once more?

Another point. I was reading bspranger’s DH code and found the following line:

fingerprint profileId: “0104”, deviceId: “0302”, inClusters: “0000, 0003, FFFF, 0402, 0403, 0405”, outClusters: “0000, 0004, FFFF”, manufacturer: “LUMI”, model: “lumi.weather”, deviceJoinName: “Xiaomi Aqara Temp Sensor”

I am guessing the 0104 is the same from zbjoin line and I was able to match the inCluster, outCluster, manufacturer and model values with the ones from zbjoin line (under “simple”). So, using the same line of thought, I believe the deviceId should be replaced by 5F01. Is this a correct assumption?

Any comments will be much appreciated.

Have you tried persisting with pairing these devices via ‘add a thing’? The Mijia (older Xiaomi) devices are difficult to pair, but the Aqara devices are less so. I ended up doing the catchall process for half the Mijia devices I have had, but haven’t had to with the 10 Aqara devices I’ve got at all. This isn’t to say it worked straight away - but usually within 5 minutes of doing a full reset (hold button for 5 secs, wait 5 secs, 2 sec press, wait 5 secs, 2 sec press etc)

For that one that is missing, you could check the device is published, assigned to your hub and isn’t duplicating the network ID/zigbee ID of another device… but if I were you I’d delete it and try the method mentioned above.

I am using the moisture sensors and any pleased with them. One question though, one sensed moisture (correctly), I fixed the problem, but the sensors still says wet. How do I reset it?

I tried to pair them down until my finger got sore, although I have to confess I didn’t hold and wait for 5 seconds (most likely 2 ou 3).

Regarding the missing device, oddly when I got it from his final resting place (inside my beer fridge) it showed up in the Smartthings app. I waited for 30 minutes to see if it something would happen and put it back inside the fridge. It has been working well since then, so not sure exactly what happened.

I need to buy some more of those Aqara devices and will try your suggestion to pair them down. Hopefully, this time I will make it work without the whole manual process I described.

I have seen it recommended that they should be left near the hub for 24 hours after pairing. I know mine dont report battery use for a few hours after initial pairing, so you may have seen a side effect of that.

1 Like

Hey Tim,

Did you get yours working? I am struggling with the same problem!

I am trying to use this DTH and it’s detecting my Xiaomi Aqara open/close sensor as a motion sensor. I used another custom DTH and it picked it up as a button press sensor. What am I missing here? Can I force ST to receive the right signals or am I using the wrong DTH?

Apologies as I’m new to ST and there’s a lot to learn when trying something that isn’t plug and play. :slight_smile:

thanks.

Edit: I guess I copied the wrong code. I feel dumber than normal…