I’ve started work on a DTH for this new Xiaomi device, as discussed over on this thread. Although it’s not exactly the right term, I’m going to stick with calling it the Aqara Vibration Sensor, because it will be too confusing to call it a motion sensor when there’s already a Xiaomi (PIR-style) Motion Sensor. It does detect motion, just physical motion of the sensor itself rather than detecting motion of other objects by visual means.
The Aqara Vibration Sensor can detect three types of motion:
Tilt (likely using an accelerometer)
Free fall (a drop of at least 3 inches)
Also, there are 3 levels of sensitivity which the sensor can be set to.
People using other Home Automation platforms are still working on reverse-engineering the non-standard way in which Xiaomi has implemented these functions, and I don’t have one of these sensors (yet!) so it may take a little while to complete a fully finished and functional DTH.
The method to calculate the temperature in that device handler is incorrect for negative values.
You should try using the much more up-to-date device handler from the bspranger/Xiaomi GitHub repository. Also, there is a SmartThings forum thread dedicated to those newer updated device handlers for Xiaomi Zigbee sensors & buttons:
I was using my >Xiaomi motion sensor for a while and it was working with no issues.
Today I noticed that it showed as "unavailable " on the mobile app.
It actually shows the motion states but shows up as unavailable.
When I check on the IDE its state is HUB_DISCONNECTED
I then removed the sensor from hub and re-paired with the catchall method.
The Network ID has changed but it still shows motion states. However it still shows up as “unavailable”
My experience is that is doesn’t work correctly with Xiaomi devices due to the different way they check in as compared to other Zigbee devices. Device Health lists them as “unavailable” when they are actually still connected and working fine.
Unless you have a real need for the Device Health feature, I’d recommend turning it off if you’re bothered by the “unavailable” status on Xiaomi devices.
I run a number of original non Aqara Xiaomi sensors (motion, temp and door) and have device health turned on. None of then report as unavailable. I am using the original a4refillpad DTHs for all of them.
Perhaps you’re one of the lucky ones. I should mention that I didn’t have the “unavailable” Device Health status all of the time - just a number of times. When I looked for information about it at the time (late last year), what I found was that Device Health only officially supports devices that use SmartThings DTH code.
Having worked extensively on the bspranger/Xiaomi DTHs, I can say that the code of setting up the device health check time interval is exactly the same as it is in the a4refillpad DTHs.
Based on recent troubles that people have been having, though, I think maybe it might be a good idea to remove that code completely until SmartThings announces formal support of Device Health for devices using custom DTH code.
SmartThings has publicly admitted troubles with Device Health last week, and they claim that everything is resolved now:
@tommyincville Please forgive my ignorance, but (If you would share it) I would like to use your refined “Humidity focused” xiaomi humidity sensor code. I can only find reference to it and cannot find anywhere that I can copy and paste the entire code from. Can I use it? of so, will you email it to me or post it so I can copy it? Please advise (either way).
Could someone help me out regarding the original xiaomi button. Obviously there is something I am missing/not understanding here; I paired the button successfully but when I add the “smart lightning” in the classic app and select it as a dimmer I can only change between “turn on” and “turn on and set level”. The set level seems to be a static value.
I would love to be able to long press it and have the levels go up and down. Is this possible?
I am trying to change the dimming levels on an ikea trådfri bulb.
I also have tried using the LONG press and single and double press with these buttons. No luck but haven’t reached out to see if its even possible. If it is then it opens up Many possibilities . But the New Samsung buttons they do what you want. Sorry to say but also they seem to be V3 hub only…
In order to use a held button action to ramp up or down the level of a dimming bulb, there would need to be a separate “button - held” event at the start, and a “button - released” event at the end.
Both the A4refillpad and bspranger/Xiaomi device handlers for the original Xiaomi button only send the “button - pushed” or “button - held” event when the button is released. Also, the SmartThings button implementation doesn’t support a “button - released” event, which explains why the Smart Lighting app doesn’t have an option to raise / lower the level of a dimmable switch/bulb when button XXX is held.
There are workarounds for this which involves using other SmartApps or WebCoRE and assigning “button 1 - held” to the start of raising/lowering the level of a dimming switch or bulb, and then “button 2 - held” to stop changing the level. In the device handler, it would have to send the corresponding events when the button device is held and then released after being held, but it only really works if the button hardware itself can recognize the difference between a press and being held and sends different messages for those two actions. The original Xiaomi button hardware does not support sending a button held message.
As explained above, both device handlers for the original Xiaomi button support “button - pushed” (short press) and “button - held” (long press), but those event messages only happen when the button is released. However, double-press of the original Xiaomi button is not supported in SmartThings.
I’m new forum member and I still don’t have ST hub .
The Xiaomi DH is super critical for me as I read that not only the prices are great but they are very good sensors .
I read that ST v3 has issues with Xiaomi sensors .
The problem is that I can’t find affordable ST v3 Europe as they out of stock in some online stores or very expensive .
Saying this, I have 2 questions:
Is it possible to make ST v3 compatible with Xiaomi sensors ?
If not, where can I buy ST v2 Europe frequencies in reasonable price that also send to Israel .