Skip to content

Files

Latest commit

cdda156 · Nov 1, 2020

History

History
84 lines (63 loc) · 2.98 KB

MCCGQ11LM.md

File metadata and controls

84 lines (63 loc) · 2.98 KB
title description
Xiaomi MCCGQ11LM control via MQTT
Integrate your Xiaomi MCCGQ11LM via Zigbee2MQTT with whatever smart home infrastructure you are using without the vendors bridge or gateway.

To contribute to this page, edit the following file

Xiaomi MCCGQ11LM

| Model | MCCGQ11LM | | Vendor | Xiaomi | | Description | Aqara door & window contact sensor | | Supports | contact | | Picture | Xiaomi MCCGQ11LM |

Notes

Pairing

Press and hold the reset button on the device for +- 5 seconds (until the blue light starts blinking). After this the device will automatically join. If this doesn't work, try with a single short button press.

Troubleshooting: device stops sending messages/disconnects from network

Since Xiaomi devices do not fully comply to the Zigbee standard, it sometimes happens that they disconnect from the network. Most of the times this happens because of the following reasons:

  • Device has a weak signal, you can see the signal quality in the published messages as linkquality. A linkquality < 20 is considered weak.
  • Low battery voltage, this can even happen when the battery still appears full. Try a different battery.
  • The device is connected through a router which cannot deal with Xiaomi devices. This is known to happen devices from: Centralite, General Electric, Iris, Ledvance, OSRAM, Sylvania, SmartThings, Securifi.

More detailed information about this can be found here.

Recommendation

If the contact is being made via a horizontal slide (e.g. the sensor is placed at the top of a sliding door), the sensor may provide three or more messages with conflicting states. To get around this issue, consider using the debounce option in your device specific configuration.

E.g. (devices.yaml)

{% raw %}

'0xabc457fffe679xyz':
    friendly_name: my_sensor
    debounce: 1

{% endraw %}

Manual Home Assistant configuration

Although Home Assistant integration through MQTT discovery is preferred, manual integration is possible with the following configuration:

{% raw %}

sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    unit_of_measurement: "%"
    value_template: "{{ value_json.battery }}"
    device_class: "battery"

binary_sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    value_template: "{{ value_json.contact }}"
    payload_on: false
    payload_off: true
    device_class: "door"

sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    unit_of_measurement: "lqi"
    value_template: "{{ value_json.linkquality }}"
    icon: "mdi:signal"

{% endraw %}