New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xiaomi Door/Window sensor: in_clusters and out_clusters inverted in binary_sensor/zha ? #15477
Comments
Hey, I have a similar issue where the motion sensor (binary_sensor) is added but not triggered. |
Good detailed Analysis @jeromelaban, same issue here with door/window sensors; in the other hand, I have a Aqara Temp/Humidity sensor working fine. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 |
@jeromelaban I am working on improving Xiaomi devices and how they are handled by ZHA. if you take a look here: https://github.com/dmulcahey/zha-device-handlers/blob/master/quirks/xiaomi/aqara_open_close_sensor.py you can see how you can tweak your current installation to make this particular sensor work better. I am working on getting first class support for these sensors added to ZHA in HA. |
@dmulcahey your link is a 404 atm |
@tehbra1n whoops: https://github.com/dmulcahey/zha-device-handlers/ that being said, support has now been added to HA. @jeromelaban are you on the latest HA? and if so is this still an issue for you? |
Will close on Friday if there are no further comments. |
Not sure about door/window sensors but Xiaomi motion sensors now work perfectly fine using zha as of .87 Edit: HA version .87 NOT .88 |
Awesome to hear! |
closing because no feedback being given. |
Hi, I've been having this exact same issue with a door sensor, Aqara MCCGQ11LM. The in/out clusters become inverted on HA restart therefore the entity becomes a switch instead of a binary sensor. Also the battery cluster disappears. Is there something I can give you to debug this? Normal HA logs during restart don't seem to show anything relevant... |
Home Assistant release with the issue:
0.73.1
Last working Home Assistant release (if known):
None, this never worked properly.
Operating environment (Hass.io/Docker/Windows/etc.):
Linux XXXX 4.13.0-43-generic #48-Ubuntu SMP Wed May 16 12:18:01 UTC 2018 i686 i686 i686 GNU/Linux
Component/platform:
zha, switch/zha and binary_sensor_zha
Description of problem:
For the first one, it looks like this is inverted: jeromelaban@8916972#diff-3117ca794cf7c83eeb69e9ce82903ee6
As I understand, an Input cluster is an data input on the sensor itself, which means that a non-reporting switch would only have an output cluster.
Detection log:
For the second one, jeromelaban@8916972#diff-703075fd5213171ebce4a964b8b1329e seems to be the issue, where the bind command fails upon restart. Skipping it make the switch work properly anyways. Seems like the binary_sensor has this safe workaround in place (https://github.com/jeromelaban/home-assistant/blob/8916972053e4bfb0f667e5c8b26a613346783ca1/homeassistant/components/binary_sensor/zha.py#L80)
This is the generated error in the logs:
And the last point, while by the current implementation, the current switch implementation shows the proper status of the door/window sensor (albeit being discovered incorrectly) it uses the on/off status as an input cluster. In the binary_sensor implementation though, the on/off status is tentatively searched in the output cluster, which fails and never adds the sensor properly. Doing this change: jeromelaban@8916972#diff-e027da3cf460e2d27c7c7e7727df9ea3 fixes the issue, and the status is reported properly.
Does this make sense, or is just that the Xiaomi door/window sensor is incorrectly reporting its clusters inverted ?
Additional information
Here's what the zigpy library reports:
The text was updated successfully, but these errors were encountered: