Fix sensitivity for lumi_vibration_aq1#7208
Fix sensitivity for lumi_vibration_aq1#7208manup merged 3 commits intodresden-elektronik:masterfrom ebaauw:vibration
Conversation
SwoopX
left a comment
There was a problem hiding this comment.
I'd advise some changes here:
- Change
refresh.intervalfrom 600 to 3600 - We only want a forced read if the special reporting didn't come in. Most likely, the following special report will provide the values anyway before the actual read kicks in. A smaller value does not make much sense either way as the device is a deep sleeper - Add
"state.timeout": 2to the write function - This is barely documented, I know, but it speeds up the state change when the device is awake and chances are high that the whole state change can finish within the few seconds the device is awake. - Add
"change.timeout": 3600to the write function - This grants the state change a life time of 1h rather than the default 2 or 3 mins. So, whenever you change sensitivity and do not explicitly wake the device, the change will be applied when it wakes up later.
Other than that, the values changes look fine to me 👍
Done. I suppose we would need to check this for other Xiaomi DDFs for this as well, as they all do periodic reporting only on the special attribute.
Done. Not sure I understand what this does exactly. What operation is timing out here, and how does the code react to this? In what circumstances, for devices with what characteristics, should be we adding this?
Done. This makes very much sense, and, I suppose should be added to all deep sleepers with changeable |
Changes as suggested by @SwoopX
|
Note to myself: It's time to better document how the Special care needs to be taken for the For example a Xiaomi device that sleeps for one hour and sends the special report, should have the But here comes the hard part: To know that a device is truly awake when a certain ZCL command is received can only be seen in the sniffer! Awake is only true if a device sends a ZCL command and does a MAC Data Request (aka parent poll) afterwards to check if there is any response/ message to receive. This is not always the case, some Xiaomi devices report sensor values without doing a MAC Data Request, which means sending anything to the device will timeout because it's sleeping. That's the reason why not every item should have The |
|
Note: instead of sniffing, you could also get this info from the deCONZ log, if the coordinator device is the parent of the sensor (which is probably achieved easiest when its the only router in the network). |
|
@ebaauw, without this issue being fixed, is there a way to correctly configure the sensitivity? The Internet is full of the 1-21 value range, where 1 is considered the most sensitive, most likely based on https://dresden-elektronik.github.io/deconz-rest-doc/devices/xiaomi/aq_vibration_sensor/#config-attributes. I'm asking because I recently had to replace one of the sensors I have at home and the new one seems to randomly trigger. Since in my case this is connected to a security system, I'd really like to avoid false positives, otherwise my neighbours will hate me. Thank you! (and sorry for not actually contributing to the issue) |
|
You can write any raw value to the corresponding Zigbee attribute (0xFF0D in the Basic cluster) from the deCONZ GUI, bypassing the API altogether. Press the button to wake the device to have deCONZ send the Write Attributes command. Press the button again, and read back the attribute, to make sure the value sticks. As I've mentioned on Discord:
I would love to hear your experience, at what setting the false positives stop if they still appear at 3. |
|
Could someone please summarize if this fix creates the need of users to actually change something? |
|
Iam a little bit confused. Which values can i now use for sensitivity ??. I need less sensitivity. Before this change i use 11. |
Never got answered here unfortunately. But according to the (updated?) docs here it seems the answer to your question is: |
See Discord, upon sniffing the Aqara app / Hub M2, it appears that the Xiaomi vibration sensor uses Zigbee values 1: High, 2: Medium, 3: Low.
The device seems to accept and report back any value, even higher then 21. This was carried over from the C++ code when the sensor was supported initially, but, apparently, never verified.
See also: