Trouble setting sensitivity of Aqara vibration sensor

I successfully paired an Xiaomi Aqara vibration sensor (DJT11LM) using zigbee2mqtt. I have it stuck on a magnet on the front of my washer and an automation that alerts me if a timer triggered by vibration detected by the sensor expires. Unfortunately the sensor barely triggers and I am trying to increase the sensitivity following this link. However when I send
zigbee2mqtt/0x00158d0003135593/set
with a payload of
{ "sensitivity": "high"}
I get the following error in the log:

zigbee2mqtt:info 10/16/2019, 11:06:18 AM MQTT publish: topic 'zigbee2mqtt/0x00158d0003135593', payload '{"angle":18,"linkquality":86,"angle_x":1,"angle_y":0,"angle_z":89,"angle_x_absolute":89,"angle_y_absolute":90,"battery":100,"voltage":3015}'
  zigbee2mqtt:info 10/16/2019, 11:06:22 AM Zigbee publish to device '0x00158d0003135593', genBasic - write - [{"attrId":65293,"dataType":32,"attrData":1}] - {"manufSpec":1,"disDefaultRsp":1,"manufCode":4447} - 1
  zigbee2mqtt:error 10/16/2019, 11:06:28 AM Zigbee publish to device '0x00158d0003135593', genBasic - write - [{"attrId":65293,"dataType":32,"attrData":1}] - {"manufSpec":1,"disDefaultRsp":1,"manufCode":4447} - null failed with error Error: AF data request fails, status code: 240. MAC transaction expired.
  zigbee2mqtt:info 10/16/2019, 11:06:28 AM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Error: AF data request fails, status code: 240. MAC transaction expired.","meta":{"entity":{"ID":"0x00158d0003135593","type":"device","friendlyName":"0x00158d0003135593"},"message":"{ \"sensitivity\": \"high\"}"}}'

I do wake up the sensor by pressing the button before publishing.

Can anyone tell me what I am doing wrong?

Thanks

1 Like

Turns out I had to press the button on the sensor longer more often or longer. Either way it worked. Leaving this here for posterity

2 Likes

Did this change of sensitivity make it functional as a dryer/washer sensor?

It did, but made it too sensitive. So I am now detecting washer/dryer operation using a history_stats sensor:

  - platform: history_stats
    name: vibe_count
    entity_id: sensor.aqara_vib_action
    state: 'vibration'
    type: count
    end: '{{ now() }}'
    duration: 00:10:00

that activates my notification automation once vibe_count goes over 5. Once the value goes back below 2 I get notified.

Note that I have a stacked unit and I am used a disk magnet taped to the sensor stuck to the dryer door (which is on top).

1 Like

Hi @nanobra1n
I’m trying to change the sensitivity on my vibration sensors. I had luck with 2 but I bought 2 more and can’t seem to change it.
Do you remember exactly what you did with the button?
I can change the setting via postman. And see it (the new value) and the pending list says: Sensitivity.
But no matter what I do I can’t ‘unpending’ it.
Are you double clicking, triple clicking the button? what kind of interval betwen clicks?
Thanks :slight_smile:

If I remember correctly pressing the button once per second for 10 - 15 seconds kept the sensor awake long enough for the setting to finally take.

Thanks.
but no luck. Maybe I’ve got a couple of duds… :confused:
(I tried one second apart clicks for 10 mins! :stuck_out_tongue: )

I’ve tried all the solutions on the forum here, can’t seem to get it to work. Always getting below error messages. I’ve tried it through the Z2MQTT GUi, as well as HA, as well as self publishing it on the topic. Any ideas?

Info `MQTT publish: topic 'zigbee2mqtt/aqara_vibr_1', payload '{"action":null,"angle":32,"angle_x":2,"angle_x_absolute":88,"angle_y":-6,"angle_y_absolute":96,"angle_z":83,"battery":100,"linkquality":207,"sensitivity":null,"strength":114,"vibration":false,"voltage":3135}'`

Info `MQTT publish: topic 'zigbee2mqtt/aqara_vibr_1', payload '{"action":null,"angle":32,"angle_x":2,"angle_x_absolute":88,"angle_y":-6,"angle_y_absolute":96,"angle_z":83,"battery":100,"linkquality":215,"sensitivity":null,"strength":114,"vibration":false,"voltage":3135}'`

Error `Publish 'set' 'sensitivity' to 'aqara_vibr_1' failed: 'Error: Write 0x00158d0006d524d8/1 genBasic({"65293":{"value":1,"type":32}}, {"sendWhenActive":false,"timeout":35000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (no response received)'`

Info `MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'sensitivity' to 'aqara_vibr_1' failed: 'Error: Write 0x00158d0006d524d8/1 genBasic({\"65293\":{\"value\":1,\"type\":32}}, {\"sendWhenActive\":false,\"timeout\":35000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":true,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":4447,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (no response received)'","meta":{"friendly_name":"aqara_vibr_1"},"type":"zigbee_publish_error"}'`

Wow… This is weird. Out of frustration I pushed the button 5 times and re-enabled the JOIN function and now it reports high sensitivity!

hmm interesting, have to try this. also stuck with this, set to high sensitivity but it’s low at best. But what’s worse is there seems to be some sort of pause once it has detected any vibration, it just doesn’t detect for another minute or so.

Check out this link for the method to change the sensitivity: Xiaomi DJT11LM control via MQTT | Zigbee2MQTT

Also try out the vibration_timeout option described there

1 Like

Hey thanks. I tried messing with the vibration_timeout, but that works fine. It times on time but then it stills waits a minute or so before detecting again.

Also, in zigbeemqtt it’s set to high now. Can’t really see the difference to be honest, but that might be skewed by me having to wait for a minute or so :slight_smile:

I’m having the same problem. If it wasn’t ordered weeks ago I’d have it sent back.
It doesn’t report when it needs to report vibration, and when literally nothing is moving, it suddenly reports as such.

hi,
i cant set sensitivity on aqara sensors… any idea? almost the same issue Sensors stopped to work? even are visible in Map