How to set sensitivity of Xiaomi Aqara vibration sensor in ZHA?

Hi, I tried this buts its not working for me. Any ideas?
https://community.home-assistant.io/t/zha-xiaomi-aqara-vibration-sensor-settings/152917/2


Mar 07 15:43:03 raspi4 hass[5527]: 2020-03-07 15:43:03 DEBUG (MainThread) [homeassistant.components.zha.api] Get bindable devices: source_ieee: [00:15:8d:00:03:9d:ce:a1], bindable devices: [[]]
Mar 07 15:43:10 raspi4 hass[5527]: 2020-03-07 15:43:10 DEBUG (MainThread) [homeassistant.components.zha.api] Requested attributes for: cluster_id: 0, cluster_type: 'in', endpoint_id: 1, response: [{'id': 0, 'name': 'zcl_version'}, {'id': 1, 'name': 'app_version'}, {'id': 2, 'name': 'stack_version'}, {'id': 3, 'name': 'hw_version'}, {'id': 4, 'name': 'manufacturer'}, {'id': 5, 'name': 'model'}, {'id': 6, 'name': 'date_code'}, {'id': 7, 'name': 'power_source'}, {'id': 8, 'name': 'app_profile_version'}, {'id': 16, 'name': 'location_desc'}, {'id': 17, 'name': 'physical_env'}, {'id': 18, 'name': 'device_enabled'}, {'id': 19, 'name': 'alarm_mask'}, {'id': 20, 'name': 'disable_local_config'}, {'id': 16384, 'name': 'sw_build_id'}, {'id': 65293, 'name': 'sensitivity'}]
Mar 07 15:43:10 raspi4 hass[5527]: 2020-03-07 15:43:10 DEBUG (MainThread) [homeassistant.components.zha.api] Requested commands for: cluster_id: 0, cluster_type: 'in', endpoint_id: 1, response: [{'type': 'server', 'id': 0, 'name': 'reset_fact_default'}]
Mar 07 15:43:30 raspi4 hass[5527]: 2020-03-07 15:43:30 DEBUG (MainThread) [zigpy.device] [0x0ea5] Extending timeout for 0x20 request
Mar 07 15:43:30 raspi4 hass[5527]: 2020-03-07 15:43:30 DEBUG (MainThread) [zigpy_deconz.zigbee.application] Sending Zigbee request with tsn 32 under 33 request id, data: b'04531120020dff200f'
Mar 07 15:43:30 raspi4 hass[5527]: 2020-03-07 15:43:30 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_request (24, 33, 0, <DeconzAddressEndpoint address_mode=2 address=0x0ea5 endpoint=1>, 260, 0, 1, b'\x04S\x11 \x02\r\xff \x0f', 2, 0)
Mar 07 15:43:30 raspi4 hass[5527]: 2020-03-07 15:43:30 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x12ef001f001800210002a50e010401000001090004531120020dff200f0200
Mar 07 15:43:30 raspi4 hass[5527]: 2020-03-07 15:43:30 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x12ef00090002002221
Mar 07 15:43:30 raspi4 hass[5527]: 2020-03-07 15:43:30 DEBUG (MainThread) [zigpy_deconz.api] APS data request response: [2, 34, 33]
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0ef0000700a600
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [166, 0]
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_confirm (0,)
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x04f00007000000
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x04f00013000c00222102a50e0101d000000000
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [zigpy_deconz.api] APS data confirm response for request with id 33: d0
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [zigpy_deconz.api] Request id: 0x21 'aps_data_confirm' for <DeconzAddressEndpoint address_mode=ADDRESS_MODE.NWK address=0x0ea5 endpoint=1>, status: 0xd0
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 WARNING (MainThread) [zigpy_deconz.zigbee.application] Error while sending 33 req id frame: 0xd0
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [zigpy.device] [0x0ea5] Delivery error for seq # 0x20, on endpoint id 1 cluster 0x0000: message send failure
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0ea5](lumi.vibration.aq1): failed to set attribute: value: 15 attribute: 65293 cluster_id: 0 endpoint_id: 1 [0x0ea5:1:0x0000]: Message send failure
Mar 07 15:43:40 raspi4 hass[5527]: 2020-03-07 15:43:40 DEBUG (MainThread) [homeassistant.components.zha.api] Set attribute for: cluster_id: [0] cluster_type: [in] endpoint_id: [1] attribute: [65293] value: [15] manufacturer: [4435] response: [None]

I run HA Core 0.106.2 in a Python 3.7 virtual env on Raspbi 4 (Buster) and ZHA with Conbee II. In general ZHA works pretty well in my environment.

Hi @starob did you consider replying in that thread itself? If you do that, then people who have already posted on the topic are more likely to see your question, and this question does seem pretty on topic for that thread. Good luck

With the help of PrairieSnpr I made it work. See this thread again:

https://community.home-assistant.io/t/zha-xiaomi-aqara-vibration-sensor-settings/152917/2

Found this link was the easiest tutorial to follow: https://joshmccarty.com/how-to-increase-sensitivity-on-aqara-vibration-sensor-with-home-assistant-zha/

Have yet to test if it works though (assume it does).

2 Likes

does it have cooldown or something? detected vibration only after connecting it to ZHA and never after that