Skip to content

Latest commit

 

History

History
109 lines (87 loc) · 3.86 KB

ZNCLDJ12LM.md

File metadata and controls

109 lines (87 loc) · 3.86 KB
title description
Xiaomi ZNCLDJ12LM control via MQTT
Integrate your Xiaomi ZNCLDJ12LM 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 ZNCLDJ12LM

| Model | ZNCLDJ12LM | | Vendor | Xiaomi | | Description | Aqara B1 curtain motor | | Supports | open, close, stop, position | | Picture | Xiaomi ZNCLDJ12LM |

Notes

Device type specific configuration

How to use device type specific configuration

  • invert_cover: By default the position/tilt values mean: open = 100, closed = 0. This can be inverted by setting this option to true (so open = 0, close = 100).

Configuration of device attributes

By publishing to zigbee2mqtt/[FRIENDLY_NAME]/set various device attributes can be configured:

{
    "options":{
        "reverse_direction": xxx,
        "hand_open": xxx,
        "reset_limits": xxx
    }
}
  • reverse_direction: (true/false, default: false). Device can be configured to act in an opposite direction.
  • hand_open: (true/false, default: true). By default motor starts rotating when you pull the curtain by hand. You can disable this behaviour.
  • reset_limits: (true/false, default: false). Reset the motor. When a path was cleared from obstacles.

You can send a subset of options, all options that won't be specified will be revered to default.

After changing reverse_direction you will need to fully open and fully close the curtain so the motor will re-detect edges. reverse_direction will get new state only after this recalibration.

Lost configuration on long power outage

If motor is used without battery it may lose configuration after long power outage. In that case you need to perform end stops calibration again publishing the following command sequence with topic zigbee2mqtt/[FRIENDLY_NAME]/set:

  1. { "options": { "reset_limits": true } }
  2. { "state": "close" }
  3. Wait here for curtain closure.
  4. { "state": "open" }

Home Assistant automation example:

- alias: Calibrate curtain
  trigger:
  - platform: homeassistant
    event: start
  action:
  - service: mqtt.publish
    data:
      topic: zigbee2mqtt/<FRIENDLY_NAME>/set
      payload: "{ 'options': { 'reset_limits': true } }"
  - service: cover.close_cover
    entity_id: cover.<COVER_ID>
  - delay:
      seconds: 13 #wait for closure complete
  - service: cover.open_cover
    entity_id: cover.<COVER_ID>

Motor leaves calibration mode automatically after it reaches the both open and close curtain position limits. Calibration is mandatory for proper position reporting and ability to set intermediate positions.

Manual Home Assistant configuration

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

{% raw %}

cover:
  - platform: "mqtt"
    availability_topic: "zigbee2mqtt/bridge/state"
    command_topic: "zigbee2mqtt/<FRIENDLY_NAME>/set"
    value_template: "{{ value_json.position }}"
    set_position_template: "{ \"position\": {{ position }} }"
    set_position_topic: "zigbee2mqtt/<FRIENDLY_NAME>/set"
    position_topic: "zigbee2mqtt/<FRIENDLY_NAME>"

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

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 %}