SmartThings Community

Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)

(Super Mouse Dv) #969

:slight_smile:

Summary

No problem I thought it was TOO much information and made the posts too long :slight_smile:

1 Like

(Super Mouse Dv) #970

I went and shortened both of my Last LONG Log out put posts
LOVE this way of hiding information so

People have to click here

To see the extra INFORMATION without over loading the forum…

1 Like

(Mark Poole) #971

Not sure if you want to bother with this but I’m seeing this in the log running the latest DTH for Xiaomi Aqara Temperature Humidity Sensors on Hubitat, not Smartthings.

0 Likes

(Keith G) #972

If you’re using Xiaomi devices with a Hubitat hub, you should post on the Hubitat Community Forums. There is a specific thread for my set of Hubitat device drivers I’ve shared which is here.

When you post over there I’ll need more details like which device driver code you’re using, because the line specified in that log error message doesn’t correspond to the Hubitat device driver code.

See you over there!

1 Like

(Stavros Fourfourianakis) #973

A question.
I would like to use the vibration sensor as part of my smartthing alarm. But, the classic app I am using doesn’t give me an option to use it (I want to use it on a glass door. I already has an open/close sensor there, but I dont’ always feel safe). Is there any way that I can do it?

0 Likes

#974

I recently paired two xiaomi Aqara motion sensors. Everything paired fine but after a hour or so the battery on both report 0% battery. Two days later they still report 0% but work fine.
Any ideas?
TIA

0 Likes

(Super Mouse Dv) #975

I have a funny story (yes its related) So I have been having issues with Sensors dropping off my ST Hub since I started this journey. Could not figure out what the heck was going on. Even with Repeaters Most things that dropped off were Aqara devices… a Few days ago I went in to reset my hub because I figured it was acting up and I noticed something that made me laugh. Ages ago I had bought a Dicast enterprise model its nearly 1 foot long you can take the top off and see the bridge (TOS Version) It was DIRECTLY above my ST Hub on the same shelf I moved it 2 feet away, I have not had a single sensor or switch or bulb drop off my network. SO if your having issues with anything be it GE to Aqara devices check what is over or around your hub you may be blocking the signal…

0 Likes

(Super Mouse Dv) #977

For me to join the device to the hub What I did was install the DH first. Then after that put ST in to add a thing mode. Then hold the button on the Aqara till it stops flashing wait about 10 seconds then click the button fast 10 times. What you want is the light flashing nearly every time you click. Wait about 30 seconds if it does not show up try the 10 clicks again . If it fails to do so after about 4 tries hold the button till the flashing stops (about 10 seconds) then follow the above instructions. Hope that helps…

0 Likes

(Alwas) #978

Thanks for the clear instructions @SuperMouseDV, however the Vibration alert is not being cleared, so I’ve deleted and reset the device 3 times now. And the battery icon is blank, but everything else is working great. On the second reset i had the battery icon working. So that and the constant blue “Vibration detected”.
Edit. battery icon arrived, now showing 83%.
Edit 2 battery returned tp 100 via 92% very neat DTH, I’ve never seen so many capabilities available in webCoRE from a single device before! The possibilities are endless. Looking forward to the DTH maturing, I’m assuming the main tile should clear when vibration/movement ends. The battery is tiny though, not sure how long they will last, I can see a battery mod coming along.

0 Likes

#979

Hi could any one help me to connect the aqara wall switch 1 gang to the st
I can’t find any device handler that works good

0 Likes

(Rob) #980

Look what I just did. :smile: Dumb doorbell turned smart(er)

2 Likes

(Darren) #981

@Equis Love it. I have the ST one, but its too big for my door chime, thus what I hope the Xiaomi can do, ie basically stick it in like you did :slight_smile:

0 Likes

(Keith G) #982

When the DTH for the vibration sensor is finished, yes. I don’t know what SmartApp you’re using for your “alarm” but in any SmartApp you’d want to select the Vibration sensor as a Motion Detector to trigger whatever automation action you want to happen. So if there’s a sudden shock, the vibration sensor would send a “Motion - Active” event, to trigger the alarm you’ve set up.

However, the DTH is in beta, and the “Motion - Active” event isn’t cleared in the current beta version. That will be addressed in the next beta version release. So after that you could test it, if you’ve got a vibration sensor already.

The vibration detected status being stuck will be fixed in the next beta DTH release. There’s actually two things going on, which is the main tile can display multiple statuses/events, but in the events list for the device, you’ll see different events match up with specific sensor capabilities, which are cleared out after different periods of time, like this:

UI displays SmartThings event Time until status is reset ST event on reset
Vibration/Shock Detected Motion = active User-set (default = 65 sec) Motion = inactive
Tilt Detected Acceleration = active 2 seconds Acceleration = inactive
Drop Detected Button 1 = pushed 2 seconds n/a

*** NOTE: The above will apply to the next beta DTH release

For vibration / shock detected events, the default time to reset both the UI to “Stationary” and Motion to inactive is 65 seconds because if the vibration continues, the sensor sends a new vibration/shock message every 60 seconds. So this allows the use case of only taking action when the vibration finishes (such as when a washing machine is finished with a load of clothes). But if the sensor is going to be used to detect shock events (something hitting the sensor or what it’s attached to), the reset period can be custom set to a shorter time, if desired. Just remember that even if there are multiple shock events soon after the first one, the sensor won’t send any vibration/shock detected message for 60 seconds after the first.

For tilt detected events, the reset time is set to 2 seconds to allow it to appear on the UI, and for any automated actions to take place based on the Acceleration = active event. But since each tilt detected message only happens after the sensor stops being tilted, this is just a one-time event as opposed to a continuous state. But the Acceleration capability supports states, so the DTH will also reset Acceleration to inactive, so that a SmartApp can take appropriate actions each time an Acceleration = active event occurs. For example, I might use it on my mailbox, and would expect to see two tilt detected events within a minute of each other - one for when the delivery person opens the mailbox to put the mail in, and the second when the mailbox door is closed. I could set up a notification if only one tilt occurs.

For drop detected events, only the user interface is reset to “Stationary” after 2 seconds (again so the user gets to see it appear in the UI). Only the UI is reset because the associated Button capability does not support a " Button released" state. It only supports trigger events of Button XX = pushed.

In addition to the above feature, in a subsequent beta release, I will also be adding the Contact sensor capability, which has open and closed states. This will make use of the Accelerometer XYZ data to determine open and close positions that the user will be able to set in the UI. Then the UI will display the current open / close state, and a SmartThings event will be sent when it changes. However, I still have to decide how to present that along with all of the other features. I may make a user preference setting to put the DTH in “Open - Close” position mode so that the UI can be simplified to focus on that functionality.

As for battery reports from Xiaomi devices, you need to wait until they send the first check-in/battery report message, which happens 50-60 minutes after pairing. In my experience, the SmartThings hub may also miss that, so it may take put to a little over 2 hours to see the battery percentage reported.

Firstly, are you using the newest Aqara Motion Sensor device handler from the bspranger/Xiaomi GitHub repository, linked in the first post of this thread?

If no, then make sure to get the DTH code from here, install it in your IDE, and make sure your motion sensor is using it.

If yes, then it’s possible that there’s a newer version of the Aqara Motion Sensor which reports battery data in a different way. Because Xiaomi sensors report battery voltage every 50-60 minutes, I would need to see at least two hour’s worth of Live Logging output by the sensor to be able to troubleshoot any further.

Also - are you using the “Classic” SmartThings mobile app or the new one?

0 Likes

#983

Thanks for the reply. It was the DTH. For some reason it didn’t save when I loaded it. Everything is working fine now.
Thanks to all who write the code and help getting these xiaomi devices working. Its greatly appreciated.

2 Likes

(Super Mouse Dv) #984

Trying out the Motion Sensor DH… Wonder if there is an active wiki that shows all DH’s in development and when they were last updated and a link to them … Something simple just to allow a quick glance at development. I know we could have something very detailed showing abilities and the like but just a sorta live update status for everything would be cool…

1 Like

(Stavros Fourfourianakis) #985

Thanks for you response. Yes, I have a vibration sensor already.

0 Likes

(Darren) #986

@SuperMouseDV click directly into the got hub reports, and you will be able to see when the live ones were last updated.

For the wip ones again git hub and see what has been checked out, also their git hub development repo forum is brilliant for seeing what is currently been worked on, issues encountered, ideas and concepts been shared

0 Likes

(Michael Beatty) #987

I just want to throw my appreciation out there for the work you do for the community. I’ve had a couple of these sensors for about two weeks now and have been watching these threads pretty close. Really happy with the progress you’ve made. I’m sure there are more of us in the same boat.

1 Like

(Keith G) #988

[BETA UPDATE] Xiaomi Aqara Vibration Sensor (Model DJR11LM) SmartThings DTH v0.7b

I have uploaded the newest beta device handler code, and after a bunch of testing I feel comfortable calling this the first “stable” beta version.

The new DTH code can be grabbed from here.

Changes

  • The UI main tile now displays correct vibration, tilt, and drop events as they happen
  • Main UI tile displays these statuses: “Stationary”, “Vibration/Shock”, “Tilt”, or “Drop”
  • The secondary information in the main UI tile has been changed to display the date/time of the most recent event of any kind
  • The other UI tiles have been rearranged to 3-Axis & Battery in first row, Angle Change, Vibration Level, and Sensitivity Level in the second, followed by the Battery Changed date in the last row
  • Events for vibration (Motion = active), tilt (Acceleration = active), and drop (Button = pushed) correctly occur and are displayed in events list
  • Added user preference setting for time until Vibration/Shock status is cleared and Motion state reset to inactive. The default is 65 seconds.
  • Tilt (Acceleration = active) events are now automatically reset after 2 seconds to “Stationary” / Acceleration = inactive
  • Drop event status is now automatically reset after 2 seconds to “Stationary”
  • The hardware sensitivity level setting can now be changed by pressing the “Sensitivity Level:” UI tile. The preference setting for setting the sensitivity level has been removed. I cannot confirm whether the level change command is actually taking effect, however.
  • Fixed parsing of model name message when reset button is short-pressed
  • Changed device Health Check interval time to 3 hours, 2 minutes to allow two missed check-ins before Health Check (if enabled) marks the sensor as “offline”
  • Changed battery report log message from [debug] to [info] log message type
  • Minor fixes to formatting of event / log message output

Still to do

  • Implement open/close position functionality, using Accelerometer XYZ values to store user-set positions, which trigger Contact = open / close events
  • Find some way to make use of the reported “vibration level” values
  • Clean up of UI

Screenshot of new UI tile arrangement:

NOTES:

As mentioned in my post a few days ago, it’s important to understand the relationship between the status displayed in the mobile app user interface (“vibration/shock”, “tilt”, & “drop”) and what events these are generating in SmartThings to make use of in your home automation SmartApps. While the main tile can display multiple statuses/events, in the events list for the device, you’ll see they match up with specific sensor capabilities, which are cleared out after different periods of time, as follows:

UI displays SmartThings event Time until status is reset ST event on reset
Vibration/Shock Detected Motion = active User-set (default = 65 sec) Motion = inactive
Tilt Detected Acceleration = active 2 seconds Acceleration = inactive
Drop Detected Button 1 = pushed 2 seconds n/a

This sensor is a fairly complicated and quirky device, and it’s difficult working with the way that it sends messages that can interrupt previous events. For example, after a vibration detection message is sent, both tilts and drops can be detected almost immediately after, but if the sensor continues to be on a vibrating surface, a subsequent vibration detected message may or may not come 60 seconds later. So how the sensor is to be used and properly mounting it to get the events you need will be important considerations.

Unfortunately, there is no feedback message when the command to change the hardware sensitivity level is sent. So I’m still not sure if it’s working or not. Repeat shock tests with a consistent level of force aren’t easy to do, and that would be a good way to check if the sensitivity level is actually changing. Any “field testing” of this would be greatly appreciated.

Many thanks to @CopyCat73 and @ oltman (on GitHub) for input and code change suggestions that went into this latest beta version.

2 Likes

Aqara vibration sensors available
(Alwas) #989

Not sure if this is valid, but as the 3 Axis numbers are difficult to decipher, can it also say “rear side up, front side up, left side up…” like it does in WebCore? Thinking of putting one in a cube.

0 Likes