The Aqara vibration / sleep sensors are available on aliexpress. I’ve bought a few and will be building DTH and smartapps I have a few ideas on how to uses these: sleep monitoring, count number of persons in bed, count how many people are going upstairs, glass break detection, etc.
I haven’t bought any vibration sensors yet, but @CopyCat73, it would be lovely if you could collaborate on the bspranger/Xiaomi GitHub repository with code for your new DTH. It’s the most up-to-date collection of SmartThings DTHs for Xiaomi devices.
Was curious of the progress as they’ve just popped on Gearbest. Any luck making them work?
The seller (mijia smart home) cancelled the shipment after 3 weeks and did not respond to any messages. Had to get my money back via dispute. Now there are more sellers and the price seems to have dropped from 25 to around 15 but the top seller is still that mijia shop where I refuse to buy now Also there seem to be 2 versions now with a different logo on top. I really don’t see how they can keep that Xiaomi/Aqara hardware vendor puzzle going on…
Yeah, the Xiaomi business model is interesting, it’s made up of competing companies but for the end buyer it’s confusing. I was looking to buy a few sensors from Gearbest, they’re pretty solid so far and they delivered all my sensors intact. They’re selling it at 11 and have some kind of special offer (first 50 buyers each day get it at 5 bucks) but I think I’ll wait a little bit longer for the right people to develop the handler. Thank you anyway.
Just recieved mine from Gearbest. Shipping to Ireland was just over a week.
No DTH and not a clue how to create one so i’ll have to wait till somebody with the knowledge puts one together.
I don’t have the new vibration sensor (yet), but can put a DTH together if you don’t reporting some live logging output.
Pair it and then manually change the DTH to the one for the Aqara Door/Window Sensor on the GitBHub/bspranger/Xiaomi repository.
Then, with the Live Logging window open in the IDE for your hub, try shaking the sensor. You should see log text output as a result. I just need that information to use the Door/Window Sensor DTH to build a new DTH for the Vibration Sensor.
First post but I literally just unpacked mine. I can get you a log momentarily if I know what to look for.
This is what I see after a 3" drop test several time
c8935c46-3ebe-4e4d-b6fe-e21d213b63c9 8:02:24 PM: error java.lang.ArrayIndexOutOfBoundsException
c8935c46-3ebe-4e4d-b6fe-e21d213b63c9 8:02:24 PM: debug S2: reset button press detected
Is this what you’re lookingfor Keith?
26254dd9-1ed2-4445-92d7-39782979e13b 19:12:32: debug Motion test: Parse returned [name:Model, value:]
26254dd9-1ed2-4445-92d7-39782979e13b 19:12:32: debug Motion test: Parsing ‘read attr - raw: 34A20101010A5500210100, dni: 34A2, endpoint: 01, cluster: 0101, size: 0A, attrId: 0055, encoding: 21, value: 0001’
Or maybe this
22:07:19: debug Parsing ‘catchall: 0104 0000 01 01 0100 00 34A2 00 01 115F 0A 01 01FF422E01210D0C0328220421A81305210A0006240600000000082108030A21AE6F982123009921FD029A253C000D0020FC’
Yes that’s what I need, thanks. I’m working on a DTH right now.
Brilliant, I know there is a dth for a vision shock sensor available. Not sure if you can use the bones of it…
Maybe - thanks, and actually the SmartSense Multi-Sensor DTH will also be helpful.
However, the DTH is not going to be so simple to make.
This post on GitHub explains that the new Aqara vibration sensor can report on three things:
- Tilt (likely using an accelerometer)
- Free fall (a drop of at least 3 inches)
From what I have read, while the sensor detects vibration, it sends a message about every minute. No message is sent when vibration is no longer detected. I can code a timer into the DTH to change the status to “no vibration”, 65 seconds after the last vibration detected message was received. The above-linked post also mentions a “bed activity” number that is reported, that seems related to the vibration detection of the sensor, but it’s not clear how it works exactly.
The sensor also appears to send messages with X, Y, Z coordinates (aka, an accelerometer) which may be used for the tilt function.
For all of this data, if I don’t have a sensor myself, I’m going to need to see log output of messages received. I will build v1.0 of the DTH to present unrecognized messages in the live logging window.
Wayne - Was that the log output you saw when you dropped the sensor?
I’m asking because cluster listed in that message,
0101, corresponds to commands / messages for door lock devices! Also, the specific attribute ID given,
0055, isn’t listed in the ZigBee specification documentation.
If true, I’m not terribly surprised because many of Xiaomi’s ZigBee devices do not follow the published standard ZigBee command/message protocols.
Another trick is that SmartThings doesn’t have a “drop” capability, which means a sensor drop event needs to be assigned to another capability that is supported so that events are produced that Smart Apps will recognize to take actions on in whatever automations someone has set up. My thought is to assign drop messages from the sensor to the Acceleration capability, especially since detected vibration will also produce acceleration active events.
People on other Home Automation systems are already reverse-engineering how this peculiar Xiaomi sensor works. Two very good sources I will be using for the SmartThings DTH:
I already had an initial DTH finished, but will have to go back again because it was based on some assumptions that the sensor would use standard published methods of the ZigBee command/message protocol to communicate, and it doesn’t.
I’ll just say right now - it may be next to impossible for me to finish a fully working DTH without one of these in hand to do testing with…
26254dd9-1ed2-4445-92d7-39782979e13b 07:40:39: debug Motion test: Parse returned [name:Model, value:]
26254dd9-1ed2-4445-92d7-39782979e13b 07:40:39: debug Motion test: Parsing ‘read attr - raw: 34A20101010A5500210100, dni: 34A2, endpoint: 01, cluster: 0101, size: 0A, attrId: 0055, encoding: 21, value: 0001’
07:44:14: debugMotion test: Parse returned [name:Model, value:]
26254dd9-1ed2-4445-92d7-39782979e13b 07:44:14: debugMotion test: Parsing ‘read attr - raw: 34A201010112080525780019000CFC, dni: 34A2, endpoint: 01, cluster: 0101, size: 12, attrId: 0508, encoding: 25, value: fc0c00190078’
26254dd9-1ed2-4445-92d7-39782979e13b 07:44:12: debugMotion test: Parse returned [name:Model, value:]
26254dd9-1ed2-4445-92d7-39782979e13b 07:44:12: debugMotion test: Parsing ‘read attr - raw: 34A20101010A5500210300, dni: 34A2, endpoint: 01, cluster: 0101, size: 0A, attrId: 0055, encoding: 21, value: 0003’
07:51:24: debugMotion test: Parse returned [name:Model, value:]
26254dd9-1ed2-4445-92d7-39782979e13b 07:51:24: debugMotion test: Parsing ‘read attr - raw: 34A20101010A5500210300, dni: 34A2, endpoint: 01, cluster: 0101, size: 0A, attrId: 0055, encoding: 21, value: 0003’
07:52:41: debug Motion test: Parsing ‘read attr - raw: 34A20101011208052556001E009B04, dni: 34A2, endpoint: 01, cluster: 0101, size: 12, attrId: 0508, encoding: 25, value: 049b001e0056’