MCCGQ02HL Xiaomi BT Contact Sensor

Yes, you need the account but only to retrieve the bindkey, after that the connection is local only.

1 Like

Yes, you can use either the custom code in esphome or the HA BT. For me the HA BT often shows offline a few minutes after last state change (open/close), while esphome shows always online, even if sensor state has not changed for days.

It is unreliable for me too, sometimes it works sometimes not.

No, HA BT works also with BT Proxy deployed in esphome device so the range is not limited by the proximity to the HA box.

1 Like

Just got a couple of these and they work great with BT Proxy, outside of the issue of HA restart. At restart, the open/close parameters all revert to unavailable until the door/window is open or closed. Outside of using a input helper, automation and template sensor for EVERY sensor, is there another fix for this? I guess they’d still work as a behind the scenes alarm system (since they’ll still update when something is opened), but not for anything you want displayed in a dashboard.

I just setup two of these and am wondering if there is a better way?
I’ve inserted the config from here

Into an ESPhome Gateway yaml through the ESPhome plugin in Home Assistant.
This seems to have created sensors that are ‘attached’ to the gateway they are configured on.
Is there a way to have them configured so they are not associated to a single gateway?
I have two gateways to cover my house, and although I don’t expect the devices to move, I’m wondering if I have done this correctly.

I assume can be connected to a Bluetooth Mesh with ESP boards, isn’t it?
Want to get some sensors but not sure if will work fine.
Thanks.

Where have you entered the bind key? For me the deviced showed up, but after adding it I can only see the signal strength sensor. No idea where to add the bind key.

Ok I got it.

I connected the sensor with the official Xiaomi app. It asked for a firmware update, which i did.
After that, HA asked for reconfiguration with the bind key. Which I extracted, entered and now everything is working.

1 Like

Hello everyone.

I have a quick question about these sensors.
I have 3 of them and i was able to get the key and firmware update and all.
But they show up in the xiaomi integration and are functional and they show up in the ble integration and dont show a thing.
Is that the outcome that i am looking for or should they just be in ble and not in xiaomi integration?
And if they have to stay in xiaomi, how do i delete old devices from the ble list.

Thx Lot

I have Mi HUB 2 and these sensors… I am unable to make them work at all too :frowning:

I got 5 of these nice little sensors - got 4 of them to work by extracting the key from mi app and then adding through Xiaomi extension. With one of them I tried to update the firmware to 2.1.0_0059 and this one does not take the bind-key in the Xiaomi HA extension… I get the error “The provided bindkey did not work, sensor data could not be decrypted. Please check it and try again.”
Any idea what could be going on? Does the new firmware introduce a new encryption HA cannot deal with?
Thanks :slight_smile:

Solved with waiting a few hours and then a full reboot of HA. Weird…

I’m curious about the range of these devices, how far away can they work ? My HA running on an ASUS Tinkerboard somehow discovers some of these devices (Door/Window sensors) from my neighbor I think, he is at least 20m away ? I guess those are discovered by the bluetooth on my board as I don’t have any hubs or anything else than the board.