Zigbee2mqtt: Xiaomi Zigbee (vibration, tilt, fall) sensor Model: DJT11LM

Created on 20 Aug 2018  路  66Comments  路  Source: Koenkk/zigbee2mqtt

New Xiaomi Zigbee sensor just released (not yet supported), I've ordered a couple.

https://www.gearbest.com/robot-vacuum-accessories/pp_009899185513.html?wid=1433363

I should be able to include support, created ticket in-case anyone beats me to it. ;)

Very exciting and unique sensor with many applications.

new device support stale

Most helpful comment

So when will this be merged? I've got 6 of these sensors sitting on my desk ready to be setup. :)

All 66 comments

Interesting....could use for the clothes dryer machine notification. The xiaomi plug cannot handle the amp load, and i am not keen in using a sonoff POW also.

I'm planning to attach one of mine to the cat's automatic kitty litter so I can track their kitty litter usage. 馃悎

So many possibilities!

i just got mine.

devices.js:

    {
        zigbeeModel: ['lumi.vibration.aq1'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'DJT11LM', 
    vendor: 'Xiaomi', 
    description: 'Aqara Movement detection sticker', 
    supports: 'vibration, linkage, remote push. adjustable sensitivity', 
    fromZigbee: [fz.xiaomi_battery_3v,fz.xiaomi_djt11lm_dc_closuresDoorLock,fz.xiaomi_djt11lm_ar_closuresDoorLock,fz.xiaomi_djt11lm_dc_genBasic,fz.xiaomi_djt11lm_ar_genBasic], 
    toZigbee: [], 
    },

fromZigbee.js

    xiaomi_djt11lm_ar_closuresDoorLock: {
        cid: 'closuresDoorLock',
        type: 'attReport',
        convert: (model, msg, publish, options) => {
            return msg.data;
        }
    },
    xiaomi_djt11lm_dc_closuresDoorLock: {
        cid: 'closuresDoorLock',
        type: 'devChange',
        convert: (model, msg, publish, options) => {
            return msg.data;
        }
    },
    xiaomi_djt11lm_ar_genBasic: {
        cid: 'genBasic',
        type: 'attReport',
        convert: (model, msg, publish, options) => {
            return msg.data;
        }
    },
    xiaomi_djt11lm_dc_genBasic: {
        cid: 'genBasic',
        type: 'devChange',
        convert: (model, msg, publish, options) => {
            return msg.data;
        }
    },

Now the devices does not produce any messages anymore.

Nice, but should not there be any return in the converter?

This is just a start, these converter do nothing yet. I do not own a Xiaomi Hub to analyze the messages or the functions of this sensor.

I added the 3v battery as a start.

Now the data is also returned.

Thanks @SargonofAssyria ;-)

"1288" seems to define the tilt in 2 axis. Does anybody have some example readings from these devices on a Xiaomi Hub? Other keys are "85","1283" and "1285".

Please provide your database.db entry(s).
Please provide full log with DEBUG without your own defined fromZigbee converters.

These are the database entries and log part of the DJT11LM after shaking the device.
{"id":11,"type":"EndDevice","ieeeAddr":"0x00158d0002a4aaa9","nwkAddr":53676,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.vibration.aq1","epList":[1,2],"status":"offline","joinTime":null,"endpoints":{"1":{"profId":260,"epId":1,"devId":10,"inClusterList":[0,3,25,257],"outClusterList":[0,3,4,5,25,257],"clusters":{"genBasic":{"dir":{"value":3},"attrs":{}},"genIdentify":{"dir":{"value":3},"attrs":{}},"genGroups":{"dir":{"value":2},"attrs":{}},"genScenes":{"dir":{"value":2},"attrs":{}},"genOta":{"dir":{"value":3},"attrs":{}},"closuresDoorLock":{"dir":{"value":3},"attrs":{}}}},"2":{"profId":260,"epId":2,"devId":24322,"inClusterList":[3,18],"outClusterList":[3,4,5,18],"clusters":{"genIdentify":{"dir":{"value":3},"attrs":{}},"genGroups":{"dir":{"value":2},"attrs":{}},"genScenes":{"dir":{"value":2},"attrs":{}},"genMultistateInput":{"dir":{"value":3},"attrs":{}}}}},"_id":"SC0xs9B1s6OS9RAZ"} {"id":11,"type":"EndDevice","ieeeAddr":"0x00158d0002a4aaa9","nwkAddr":53676,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.vibration.aq1","epList":[1,2],"status":"offline","joinTime":null,"endpoints":{"1":{"profId":260,"epId":1,"devId":10,"inClusterList":[0,3,25,257],"outClusterList":[0,3,4,5,25,257],"clusters":{"genBasic":{"dir":{"value":3},"attrs":{}},"genIdentify":{"dir":{"value":3},"attrs":{}},"genGroups":{"dir":{"value":2},"attrs":{}},"genScenes":{"dir":{"value":2},"attrs":{}},"genOta":{"dir":{"value":3},"attrs":{}},"closuresDoorLock":{"dir":{"value":3},"attrs":{}}}},"2":{"profId":260,"epId":2,"devId":24322,"inClusterList":[3,18],"outClusterList":[3,4,5,18],"clusters":{"genIdentify":{"dir":{"value":3},"attrs":{}},"genGroups":{"dir":{"value":2},"attrs":{}},"genScenes":{"dir":{"value":2},"attrs":{}},"genMultistateInput":{"dir":{"value":3},"attrs":{}}}}},"_id":"SC0xs9B1s6OS9RAZ"}

2018-9-1 10:06:06 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":1}} 2018-9-1 10:06:06 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:06 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:06 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":1}} 2018-9-1 10:06:06 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:06 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:06 - debug: Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":0}} 2018-9-1 10:06:06 - info: MQTT publish, topic: 'zigbee2mqtt/UPS', payload: '{"state":"ON","power":0,"voltage":221,"consumption":25.86,"temperature":37,"linkquality":94}' 2018-9-1 10:06:12 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":3}} 2018-9-1 10:06:12 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:12 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:12 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":3}} 2018-9-1 10:06:12 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:12 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:22 - debug: Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":0}} 2018-9-1 10:06:22 - info: MQTT publish, topic: 'zigbee2mqtt/UPS', payload: '{"state":"ON","power":0,"voltage":221,"consumption":25.86,"temperature":37,"linkquality":94}' 2018-9-1 10:06:23 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[1199,655390]}} 2018-9-1 10:06:23 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:23 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:23 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[1199,655390]}} 2018-9-1 10:06:23 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:23 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:24 - debug: Check online UPS 0x00158d0002161ef0 2018-9-1 10:06:24 - debug: Check online Router 0x00124b0014d9de22 2018-9-1 10:06:24 - debug: Check online Powerplug 0x84182600000f0057 2018-9-1 10:06:28 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":2,"1283":86}} 2018-9-1 10:06:28 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:28 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:28 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":2,"1283":86}} 2018-9-1 10:06:28 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:28 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:28 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[84,4227661913]}} 2018-9-1 10:06:28 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:28 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:28 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[84,4227661913]}} 2018-9-1 10:06:28 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:28 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:32 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":2,"1283":87}} 2018-9-1 10:06:32 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:32 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:32 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1283":87}} 2018-9-1 10:06:32 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:32 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:32 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[87,2819034]}} 2018-9-1 10:06:32 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:32 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:32 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[87,2819034]}} 2018-9-1 10:06:32 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:32 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:33 - debug: Recieved zigbee message with data {"cid":"genOnOff","data":{"onOff":1}} 2018-9-1 10:06:33 - info: MQTT publish, topic: 'zigbee2mqtt/Router', payload: '{"state":true,"linkquality":68}' 2018-9-1 10:06:37 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":2,"1283":88}} 2018-9-1 10:06:37 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:37 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:37 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1283":88}} 2018-9-1 10:06:37 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:37 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:38 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[76,70778872]}} 2018-9-1 10:06:38 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:38 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:38 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[76,70778872]}} 2018-9-1 10:06:38 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:38 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:38 - debug: Recieved zigbee message with data {"cid":"genAnalogInput","data":{"presentValue":0}} 2018-9-1 10:06:38 - info: MQTT publish, topic: 'zigbee2mqtt/UPS', payload: '{"state":"ON","power":0,"voltage":221,"consumption":25.86,"temperature":37,"linkquality":94}' 2018-9-1 10:06:42 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":2,"1283":88}} 2018-9-1 10:06:42 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:42 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:42 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[75,1047671]}} 2018-9-1 10:06:42 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:42 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:42 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[75,1047671]}} 2018-9-1 10:06:42 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:42 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:46 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":3}} 2018-9-1 10:06:46 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:46 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:46 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"85":3}} 2018-9-1 10:06:46 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:46 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:47 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[1200,786462]}} 2018-9-1 10:06:47 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:47 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices 2018-9-1 10:06:47 - debug: Recieved zigbee message with data {"cid":"closuresDoorLock","data":{"1288":[1200,786462]}} 2018-9-1 10:06:47 - warn: Device with modelID 'lumi.vibration.aq1' is not supported. 2018-9-1 10:06:47 - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices

This sensor should also have an input (ability to set the sensitivity). Question is, is it set on the Sensor via Zigbee (most likely) or virtually on the Xiaomi hub.

Look at the description on Gearbest, it shows a picture of it being set.

https://www.gearbest.com/robot-vacuum-accessories/pp_009899185513.html

I got one too, but I cant pair ist with my zigbee stick. Anyone else here got a pairing?

This is the message I got out of the log:
zigbee2mqtt:error 2018-9-1 16:30:43 Cannot get the Node Descriptor of the Device: 0x00158d0002abb211 (Error: Timed out after 10000 ms)

I managed to get it paired. (See log above) After the 5 sec push on the button and the flashing of the blue led. I had to repeatedly (10-20 times) push the button with 1-2 sec interval until it paired.

I was able to pair my sensor exactly the same way, I just had to go near the zigbee stick. Now we have to wait for a code update.

Has anyone paired the sensor with an Aqara hub? I'm working on this PR for deCONS but we can't figure out some fo the values... can someone attach some screenshots of the Aqara / Mi home app? I'm trying to understand if the app exposes any of the values somehow.

@ben423423n32j14e would you mind making a PR?

@Koenkk, sure but whats the purpose?

Btw check the wiki, I added a control panel for Node-Red. :)

@ben423423n32j14e as this device is not supported (DJT11LM), it would be nice if we could add support for it.

I saw your wiki update, great! :smile:

It will be Connected as :
lumi.vibration.aq1 00158d0002a91ead

Errors from .log file

zigbee.0 | 2018-09-07 11:59:14.971 | error | Cannot get the Node Descriptor of the Device: 0x00158d0002a91ead (Error: Timed out after 10000 ms)
zigbee.0 | 2018-09-07 12:01:50.504 | error | Unknown device model lumi.vibration.aq1 emit event attReport with data:{"cid":"closuresDoorLock","data":{"1288":[1201,12]}}

zigbee.0 | 2018-09-07 12:01:50.471 | error | Unknown device model lumi.vibration.aq1 emit event attReport with data:{"cid":"closuresDoorLock","data":{"85":2,"1283":26}}

can u add support for it ?

Ordered on the 20th of August from Gearbest, I'm still waiting for mine to be delivered. :(

Hello guys,

There is another thread where https://github.com/dresden-elektronik/deconz-rest-plugin/issues/748 @veeceeoh, @oltman, @TedTolboom, @paolotremadio and some others discussed the interpretation of the transmitted payload.

I used that input to create a (partly?) working converter for the specified messages, please find the changes below:

devices_changes.txt
fromZigbee_changes.txt

It would be great if some of you might give feedback on it - we can then create a PR later on if it is confirmed to be working.

Interpretation:

  • evt [0x55]: vibration, rotation, freefall (from @paolotremadio)
  • rotationAngle [0x0503] : absolute angle from last position
  • unknownParam [0x0505]: no idea what this does/indicates (maybe someone can help here, just passing it out for easier analysis)
  • xAngle, yAngle and zAngle [0x0508]: "how far from horizontal are the X,Y,Z axis?" (from @oltman)

Offset from "reference" position [derived from 0x0505]:
Base position to understand the described directions is: "button in front, battery on bottom."

  • aX: offset on x-axis, 0 = right side, 90 = bottom side ("battery"), 180 = left side (from @TedTolboom)
  • aX: offset on y-axis, 0 = front side, 90 = bottom side ("battery"), 180 = back side (from @TedTolboom)

Hope that helps.

Best,

Tim

Hi i麓m actually sitting in front of this type of device too and work on some rudimental implementation.

This is what i actually do:

devices.js

{
    zigbeeModel: ['lumi.vibration.aq1'],
    model: 'DJT11LM',
    vendor: 'Xiaomi', 
    description: 'Aqara Movement detection sticker', 
    supports: 'vibration, linkage, remote push. adjustable sensitivity', 
    fromZigbee: [fz.xiaomi_battery_3v,fz.ignore_basic_change,fz.ignore_basic_report,fz.DJT11LM_closuresDoorLock_attReport,fz.ignore_closuresDoorLock_change], 
    toZigbee: [],
},

fromzigbee.js

ignore_closuresDoorLock_change: {
        cid: 'closuresDoorLock',
        type: 'devChange',
        convert: (model, msg, publish, options) => null,
},
Code need to develop

From my understanding we need to implement timer for reset vibration return value ...

As i could read you changes .. look good .. will test later :)

Edit1: Your state return is valid .. i do some tests 馃憤
Edit2: Found this cool informations: http://faire-ca-soi-meme.fr/domotique/2018/09/03/test-xiaomi-aqara-vibration-sensor/

@tb-killa I purchased this sensor too and it is on the way.
I do the same like the post above, sniff the packet from Device with Xiaomi gateway when control with app.
But when get the data, it so hard to re-produce with Zigbee2mqtt (Zigate have tool to send raw data to test).
You can see my relate problem here: https://github.com/Koenkk/zigbee2mqtt/issues/294#issuecomment-419636303

@Tim-HD I use your code and support change sensitivity in this PR https://github.com/Koenkk/zigbee-shepherd-converters/pull/74 this should close now. Note: change sensitivity must press button on the sensor to wake it up

So when can we expect this to be released? I just got my vibration sensor today and can't wait to use it.

I'm using the docker version of zigbee2mqtt if that helps.

@adamomg Use edge version off https://github.com/danielwelch/hassio-zigbee2mqtt/tree/master/zigbee2mqtt-edge. But please waiting until it merge

This is great, but I have a (hopefully not dumb) question. Since many use the configuration option "cache_state: true," the last event state is included in the mqtt message when the sensor is, e.g., just updating the battery status (i.e., when no event occurs).

To avoid this, should the code be something like:
if (msg.data.data['85']) {
const data = msg.data.data['85'];
result.event = vibrationLookup[data];
} else {
result.event = 'none';
}

I want to make sure when HA receives the mqtt message, it doesn't mistakenly think an event occurred when it didn't.

So when will this be merged? I've got 6 of these sensors sitting on my desk ready to be setup. :)

So when will this be merged? I've got 6 of these sensors sitting on my desk ready to be setup. :)

yep me too! just waiting on the merge, so that i can update my docker image :)

Same here. My dryer automation is waiting!

is support for this sensor finished ?
I get an action: "vibration", shouldn't we have an action:"no_more_vibration" when it's finished ?
I also get "unknown_data":1835008 from my vibration sensor
looks like it needs more love :-)

I'm waiting for mine to arrive, will also check the implementation then.

from my point of view we should implement timer for vibration like by occupancy as example.
another point i think should be to hidden the actually not fully understand and decode value 0x0505 because it doesn麓t help in any way.

don麓t know if other would also confirm ?

I created a post here describing a problem I'm having with the Vibration Sensor.

Noob question: Am I correct in assuming that I need to shelve these sensors until the issue discussed in this thread is resolved or is the issue discussed here regarding some more advanced features of the vib sensor? I'm on Hassio.

@PlayedIn i think it's because you can set the threshold value on sensor, if you use the app Mi Home you can configure the sensibility to Vibration Sensor. I think this type of configuration is not possible with zigbee2mqtt or i'm wrong?

@PlayedIn i think it's because you can set the threshold value on sensor, if you use the app Mi Home you can configure the sensibility to Vibration Sensor. I think this type of configuration is not possible with zigbee2mqtt or i'm wrong?

I think that the payload retrived from the sensor turns vibration into a boolean (with some kind of treshold) instead of a integer (like vibration intensity)

So - are we there yet ? ;) Have one sitting in my iron (decased) and would be great to use it.

It's been supported for about the last month, it's working fine for me (using the dev branch).

You can check the release notes on the stable branch to see if its been added, but it definitely works in the dev branch.

thanks for the update @ben423423n32j14e, guess i need to switch to the dev branch then.

Any update on this making it into the main branch? I just paired one and it seems to be working, but requires a pretty significant movement to register a vibration. Would love to adjust the threshold for the boolean or get a vibration value I can use to change the threshold myself.

Still seeing "unknown_data" value being returned. Anyone know what this value is?

AFAIK this device is fully supported in 1.0.1 and also the sensitivity can be set using https://koenkk.github.io/zigbee2mqtt/information/mqtt_topics_and_message_structure.html#xiaomi-aqara-vibration-sensor-djt11lm

Awesome thanks! I'll take a look at the sensitivity settings.

Is the unknown data something useful? Seems to still be there after the update to 1.0.1.

Can you post logging of this?

This is the line in the log for the vibration sensor which includes the "unknown_data" part.

zigbee2mqtt:info 2018-12-26 11:43:26 MQTT publish: topic 'zigbee2mqtt/0x00158d0002af959b', payload '{"angle_x":6,"angle_y":-77,"angle_z":12,"angle_x_absolute":84,"angle_y_absolute":167,"linkquality":89,"unknown_data":393216,"battery":100,"voltage":3155}'

i have :
Dec 26 19:18:29 ubuntu59 npm[9573]: zigbee2mqtt:info 12/26/2018, 7:18:29 PM MQTT publish: topic 'zigbee2mqtt/dish_washer_sensor', payload '{"battery":100,"voltage":3035,"linkquality":63,"unknown_data":917504,"angle_x":4,"angle_y":1,"angle_z":-86,"angle_x_absolute":86,"angle_y_absolute":89}'

Thanks, removed.

it reports vibration, does it report something like no_more_vibration so we could use it as a binary_sensor in home assistant ?
Or do we have to use automation to achieve this ?

After some tries I have successfully paired my device but it is not recognized Jan 01 15:31:38 raspberrypi npm[10409]: zigbee2mqtt:warn 1/1/2019, 3:31:38 PM Device with modelID 'undefined' is not supported. Jan 01 15:31:38 raspberrypi npm[10409]: zigbee2mqtt:warn 1/1/2019, 3:31:38 PM Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html
I am running on the dev branch and the implementations seems to be in the "zigbee-shepherd-converters" library but it is still not recognized. But it seems like the model ID is missing. Any clues?

EDIT: I tried re-pairing it and then it received a model name. It seems like this model is quite tricky when it comes to pairing!

How sensitive is this supposed to be?
According to this comment it should react to tapping - mine doesn't, I really have to move/shake it. Tilt is reasonably sensitive, but vibration not at all.
I used mosquitto_pub -t zigbee2mqtt/Aqara_Vibration/set -m '{"sensitivity": "high"}' to increase sensitivity but didn't notice a difference. (I pressed its button before, but maybe it still didn't work, sadly there's no "sensitivity": "read" to check.)
Does 'high' correspond to a threshold that could be lowered further?

@vogler are you sure that the command succeeded? This is shown in the logging. Note that the device has to be awake while this command is executed (which can be done by pressing a button on the device).

Tried again and got this:
~
zigbee2mqtt:info 1/11/2019, 9:08:07 AM Zigbee publish to device '0x00158d0002b127f4', genBasic - write - [{"attrId":65293,"dataType":32,"attrData":1}] - {"manufSpec":1,"disDefaultRsp":1,"manufCode":4447} - null
~

Still behaves the same - I have to hit the table really hard to trigger it.

I've had a vibration sensor monitoring my two cats kitty litter for around a couple of months now.

Thanks to being able to see the x y z values, and combining timing data, I've been able to build it such that there is zero chance of false positives. :)

kittycycles

Can you share how you're using those values to accomplish that?

@icouper, here is the Node-Red flow I'm using (licensed as GNU 3)

The values have been tuned to my specific setup, I've got the sensor attached to a Scoopfree Ultra.

[{"id":"530d5d9f.5093b4","type":"mqtt in","z":"f962b96d.7044c8","name":"zigbee2mqtt/out","topic":"zigbee2mqtt/tiltsensorkittylitter","qos":"2","broker":"6e165f21.f7645","x":340,"y":520,"wires":[["3e7b496c.47da76"]]},{"id":"3e7b496c.47da76","type":"json","z":"f962b96d.7044c8","name":"","property":"payload","action":"","pretty":false,"x":490,"y":520,"wires":[["9c2b4c34.56b38"]]},{"id":"50f44b51.8bf294","type":"mqtt out","z":"f962b96d.7044c8","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"cd51966f.aa7e38","x":790,"y":520,"wires":[]},{"id":"9c2b4c34.56b38","type":"function","z":"f962b96d.7044c8","name":"Format Data","func":"// Variables\nvar anglex = msg.payload.angle_x;\nvar angley = msg.payload.angle_y;\nvar anglez = msg.payload.angle_z;\nvar anglexabsolute = msg.payload.angle_x_absolute;\nvar angleyabsolute = msg.payload.angle_y_absolute;\nvar rssi = msg.payload.linkquality;\nvar batt = msg.payload.battery;\nvar time = Math.round((new Date()).getTime() / 1000);\n\n// Store battery level in context if received\nif (typeof batt !== 'undefined' && batt !== null && batt >= 1){\n context.set(\"storedbatterylevel\", batt);\n}\n\n// Get data from context\nvar previousposition = context.get(\"position\");\nvar lastseen = context.get(\"lastseen\");\nvar battery = context.get(\"storedbatterylevel\");\n\n// Variable\nvar secondssincelastseen = (time - lastseen);\n\n// Store position events\nif(angleyabsolute >= 155) {\n context.set(\"position\", 'Down');\n var currentposition = 'Down';\n}else if(angleyabsolute < 155) {\n context.set(\"position\", 'Up');\n var currentposition = 'Up';\n}\n\n// Conditions for part trigger\nif(currentposition !== previousposition && angleyabsolute > 135 && angleyabsolute < 180 && anglexabsolute > 75 && anglexabsolute < 90) { \n\n// Store time last seen\ncontext.set(\"lastseen\", time);\n\n// Clear unwanted objects\nmsg.payload = {}\n\n// Conditions to send to Domoticz\nif(secondssincelastseen >= 17 && secondssincelastseen <= 23){\n\ncontext.set(\"lastseen\", time);\nmsg.payload.idx = 1275 ;\nmsg.payload.svalue = 'On';\nmsg.payload.nvalue = 1;\nif (typeof battery !== 'undefined' && battery !== null){msg.payload.Battery = Math.round(battery)}\nmsg.payload.position = currentposition;\nrssi = Math.round(rssi / 11);\nif (rssi > 11) {rssi = 11;}\nmsg.payload.RSSI = rssi;\nreturn msg;\n}\n}","outputs":1,"noerr":0,"x":630,"y":520,"wires":[["50f44b51.8bf294"]]},{"id":"6e165f21.f7645","type":"mqtt-broker","z":"","name":"MQTT","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"domoticz/bridge/state","birthQos":"0","birthPayload":"online","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"cd51966f.aa7e38","type":"mqtt-broker","z":"","name":"MQTT","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Is it possible to send sensitivity to high with developer options in iobroker Adapter?

https://picload.org/view/dciwgalp/screenshot_2019-01-28-20-24-27.png.html

@vogler do you succeed in setting sensitivy?

@adrianmihalko According to the log yes, but I didn't notice any change.
Sent mosquitto_pub -t zigbee2mqtt/Aqara_Vibration/set -m '{"sensitivity": "high"}'
Got zigbee2mqtt:info 1/11/2019, 9:08:07 AM Zigbee publish to device '0x00158d0002b127f4', genBasic - write - [{"attrId":65293,"dataType":32,"attrData":1}] - {"manufSpec":1,"disDefaultRsp":1,"manufCode":4447} - null

V 1.1.1
For some reason, the model identifier is not determined by me and therefore the sensor is not added.

2019-2-7 16:53:21 - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"connecting with device"}'
2019-2-7 16:53:21 - info: Device incoming...
2019-2-7 16:53:21 - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'
2019-2-7 16:53:21 - info: New device with address 0x00158d0002af70bd connected!
2019-2-7 16:53:21 - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":"0x00158d0002af70bd"}'
2019-2-7 16:53:21 - warn: Device with modelID 'undefined' is not supported.
2019-2-7 16:53:21 - warn: Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html
2019-2-7 16:53:21 - warn: Device with modelID 'undefined' is not supported.
2019-2-7 16:53:21 - warn: Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html

After rollback to version 0.2.0, the device was successfully added

2019-2-7 18:25:40 - info: New device with address 0x00158d0002af70bd connected!
2019-2-7 18:25:40 - info: MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"device_connected","message":"0x00158d0002af70bd"}'
2019-2-7 18:25:51 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0002af70bd', payload: '{"action":"vibration","linkquality":134}'
2019-2-7 18:25:54 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0002af70bd', payload: '{"action":"tilt","angle":13,"linkquality":136}'
2019-2-7 18:25:59 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0002af70bd', payload: '{"angle_x":-2,"angle_y":-5,"angle_z":84,"angle_x_absolute":92,"angle_y_absolute":95,"linkquality":136}'

Why is that?

@tweaker
I've had a rough time getting these to pair successfully. Usually I have to be very close to the hub, press and hold the sync button for 5-15 seconds, then press it every second after that for 20 seconds+. Even then I get modelID "undefined" errors often.

After 5+ tries I finally got it to sync. I've never had that much trouble with other sensors.

Also changing the battery sometimes helps.

@icouper
When rollback to 0.2.0, the sensor without problems immediately connected

I've been trying to get this sensor to work on a cat door - using tilt to tell if it's opening in or out. However it doesn't seem to be sensitive enough (even on high setting) to detect the tilt unless I hold the door open much longer than it would be when the cat goes through.

Starting to think this sensor won't work for anything that I want to use it for.

@icouper use node red, the sensitivity you are seeing may not be the raw output from the sensor.

@icouper use node red, the sensitivity you are seeing may not be the raw output from the sensor. It should work well for the use case you mentioned. If still fail then use the magnetic door sensor.

@ben423423n32j14e I do use node red, but how would that improve the sensor's sensitivity?

AFAIK this device is fully supported in 1.0.1 and also the sensitivity can be set using https://koenkk.github.io/zigbee2mqtt/information/mqtt_topics_and_message_structure.html#xiaomi-aqara-vibration-sensor-djt11lm

Hi, I'm trying to set the sensitivity but the link is no longer available.

@CMDR-Sloma If you visit https://koenkk.github.io/zigbee2mqtt/ you can see it has moved to another domain. It is still available at https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#xiaomi-aqara-vibration-sensor-djt11lm

I don't expect github pages support a smart 301 permanently moved mechanism :)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@adrianmihalko According to the log yes, but I didn't notice any change.
Sent mosquitto_pub -t zigbee2mqtt/Aqara_Vibration/set -m '{"sensitivity": "high"}'
Got zigbee2mqtt:info 1/11/2019, 9:08:07 AM Zigbee publish to device '0x00158d0002b127f4', genBasic - write - [{"attrId":65293,"dataType":32,"attrData":1}] - {"manufSpec":1,"disDefaultRsp":1,"manufCode":4447} - null

@vogler Were you ever able to get the sensor to report vibration more accurately? I attached it to my dryer and it only responds when I open and close the door.

Was this page helpful?
0 / 5 - 0 ratings