Aqara Temp Sensor WSDCGQ11LM wont pair with Zigbee

Hi,

I have Zigbee2Mqtt plugin installed and working on Hassio, config section has permit_join as true. I have a Aqara WSDCGQ11LM temp sensor which just will not pair!!!

I go to CONFIGURATION - INTEGRATIONS - CONFIGURE on ZIGBEE - +
It says searching for Zigbee devices, I press and hold the button on the temp sensor but nothing is found…

What am I doing wrong?

Any help appreciated…

CONFIGURATION - INTEGRATIONS - CONFIGURE on ZIGBEE - +

Doesn’t belong to Zigbee2Mqtt.

Have a look into GitHub - danielwelch/hassio-zigbee2mqtt: Hass.io add-on for zigbee2mqtt

Other than that:

  • stay close to your ZigBee router
  • for some Aqara devices I had to regularly push the button during pairing (every 3 seconds) but I don’t remember if it was this sensor
  • I have 4 of them paired so it should work in general
  • check the log of zigbee2mqtt

Either you use zigbee2mqtt or ZHA, you can’t use both with the same stick.

If using zigbee2mqtt:

Stop zigbee2mqtt, remove you CC2531, plug it back in,restart zigbee2mqtt, try pairing again, using the tips from extatic.

Thank you eXtatic for your response.

I dont understand? This is my integrations screen…


from here i click on Configure and get this

I dont understand anything from these instructions, this is what I need help with…
If I shouldnt use the integrations screen to pair then how do I pair?

The log on the pairing screen just remains empty…?
The log on the add on screen is pasted below:

ERR!
 
code
 ELIFECYCLE
npm
 
ERR!
 
errno
 1
npm
 
ERR!
 [email protected] start: `node index.js`
npm
 
ERR!
 Exit status 1
npm
 
ERR!
 
npm
 
ERR!
 Failed at the [email protected] start script.
npm
 
ERR!
 This is probably not a problem with npm. There is likely additional logging output above.
npm
 
ERR!
 A complete log of this run can be found in:
npm
 
ERR!
     /root/.npm/_logs/2020-08-28T23_05_06_581Z-debug.log
2020-08-29T09:05:08: PM2 log: App [npm:0] exited with code [1] via signal [SIGINT]
2020-08-29T09:05:08: PM2 log: App [npm:0] starting in -fork mode-
2020-08-29T09:05:08: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.14.3
> node index.js
Zigbee2MQTT:info  2020-08-29 09:05:09: Logging to console and directory: '/share/zigbee2mqtt/log/2020-08-29.09-05-09' filename: log.txt
Zigbee2MQTT:info  2020-08-29 09:05:10: Starting Zigbee2MQTT version 1.14.3 (commit #unknown)
Zigbee2MQTT:info  2020-08-29 09:05:10: Starting zigbee-herdsman...
Zigbee2MQTT:error 2020-08-29 09:05:10: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2020-08-29 09:05:10: Failed to start zigbee
Zigbee2MQTT:error 2020-08-29 09:05:10: Exiting...
Zigbee2MQTT:error 2020-08-29 09:05:10: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B000FFB7947-if00'
    at Znp.<anonymous> (/zigbee2mqtt-1.14.3/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:136:32)
    at Generator.next (<anonymous>)
    at /zigbee2mqtt-1.14.3/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (/zigbee2mqtt-1.14.3/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)
    at SerialPort.<anonymous> (/zigbee2mqtt-1.14.3/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:134:49)
    at SerialPort._error (/zigbee2mqtt-1.14.3/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
    at /zigbee2mqtt-1.14.3/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
npm
 
ERR!
 
code
 ELIFECYCLE
npm
 
ERR!
 
errno
 1
npm
 
ERR!
 [email protected] start: `node index.js`
npm
 
ERR!
 Exit status 1
npm
 
ERR!
 
npm
 
ERR!
 Failed at the [email protected] start script.
npm
 
ERR!
 This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-28T23_05_10_215Z-debug.log
2020-08-29T09:05:11: PM2 log: App [npm:0] exited with code [1] via signal [SIGINT]
2020-08-29T09:05:11: PM2 log: App [npm:0] starting in -fork mode-
2020-08-29T09:05:11: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.14.3
> node index.js
Zigbee2MQTT:info  2020-08-29 09:05:12: Logging to console and directory: '/share/zigbee2mqtt/log/2020-08-29.09-05-12' filename: log.txt
Zigbee2MQTT:info  2020-08-29 09:05:12: Starting Zigbee2MQTT version 1.14.3 (commit #unknown)
Zigbee2MQTT:info  2020-08-29 09:05:12: Starting zigbee-herdsman...

Huh? Isnt ZHA zigbee? I thought zigbee2mqtt was just the interface between mqtt and zigbee?
I’m completely confused now.

I tried removing the code in my configuration.yaml

zha:
usb_path: /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B000FFB7947-if00
database_path: /config/zigbee.db

But made no difference, do I need this or not?

What is the correct way to pair if not from the integrations screen?

No

Zigbee Home Automation (ZHA) and zigbee2mqtt are two different ways to talk to zigbee devices and get their data into HA.

HA ↔ MQTT ↔ zigbee2mqtt ↔ CC2531 ↔ WSDCGQ11LM

or

HA ↔ ZHA ↔ CC2531 ↔ WSDCGQ11LM

You can’t do both.

1 Like

OK, well, I have zigbee2mqtt plugin installed so what is the next step?
How do I pair?

Assuming you have MQTT installled and configured, your zigbee2mqtt configuration should look something like this:

data_path: /share/zigbee2mqtt
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://core-mosquitto:1883'
  user: YOURMQTTUSERNAME
  password: YOURMQTTPASSWORD
serial:
  port: >-
    /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B000FFB7947-if00
advanced:
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blacklist: []
ban: []
whitelist: []
queue: {}
socat:
  enabled: false
  master: 'pty,raw,echo=0,link=/dev/ttyZ2M,mode=777'
  slave: 'tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5'
  restartdelay: 1
  initialdelay: 1
  options: '-d -d'
  log: false

Start zigbee2mqtt and check the log. If you don’t get any errors, stop zigbee2mqtt and change permit_join: false in the configuration to permit_join: true. Follow the pairing instructions, but also the recommendations from eXtatic. Watch the log. If pairing is successful, the log will tell you so. If successful, you stop zigbee2mqtt, change permit_join: back to false, restart zigbee2mqtt .

The range of the CC2351 isn’t great, especially through walls, so keep the sensor close and see how far away you can place it before you loose connection.

And there is a nice package available on the zigbee2mqtt website that let you change permit join without restarting zigbee2mqtt all the time :

You should get something like this with the package

What pairing instructions?
This is where I am stuck

1 Like

Is this how you pair?
I have tried pasting that into my config.yaml file but just gives errors…?

can not read a block mapping entry; a multiline key may not be an implicit key at line 189, column 6:
title: Zigbee2MQTT

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: -28.389010
  longitude: 153.564590
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Australia/Sydney
  # Customization file
  customize: !include customize.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:


light:
 -  platform: flux_led
#    automatic_add: true
    devices:
      192.168.1.112:
        name: Bedroom Bedhead


api:

esphome:

http:
#  base_url: http://192.168.1.6
  base_url: https://philwashere.duckdns.org
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

discovery:






#
# MQTT Connection Code for Bundled Option
#
mqtt:
  broker: a0d7b954-mqtt
  username: xxx
  password: xxx
  client_id: home-assistant


# Input select for Zigbee2MQTT debug level
input_select:
  zigbee2mqtt_log_level:
    name: Zigbee2MQTT Log Level
    options:
      - debug
      - info
      - warn
      - error
    initial: info
    icon: mdi:format-list-bulleted

# Input text to input Zigbee2MQTT friendly_name for scripts
input_text:
  zigbee2mqtt_old_name:
    name: Zigbee2MQTT Old Name
  zigbee2mqtt_new_name:
    name: Zigbee2MQTT New Name
  zigbee2mqtt_remove:
    name: Zigbee2MQTT Remove

# Scripts for renaming & removing devices
script:
  zigbee2mqtt_rename:
    alias: Zigbee2MQTT Rename
    sequence:
      service: mqtt.publish
      data_template:
        topic: zigbee2mqtt/bridge/config/rename
        payload_template: >-
          {
            "old": "{{ states.input_text.zigbee2mqtt_old_name.state | string }}",
            "new": "{{ states.input_text.zigbee2mqtt_new_name.state | string }}"
          }
  zigbee2mqtt_remove:
    alias: Zigbee2MQTT Remove
    sequence:
      service: mqtt.publish
      data_template:
        topic: zigbee2mqtt/bridge/config/remove
        payload_template: "{{ states.input_text.zigbee2mqtt_remove.state | string }}"

# Timer for joining time remaining (120 sec = 2 min)
timer:
  zigbee_permit_join:
    name: Time remaining
    duration: 120

sensor:
  # Sensor for monitoring the bridge state
  - platform: mqtt
    name: Zigbee2MQTT Bridge state
    state_topic: "zigbee2mqtt/bridge/state"
    icon: mdi:router-wireless
  # Sensor for Showing the Zigbee2MQTT Version
  - platform: mqtt
    name: Zigbee2MQTT Version
    state_topic: "zigbee2mqtt/bridge/config"
    value_template: "{{ value_json.version }}"
    icon: mdi:zigbee
  # Sensor for Showing the Coordinator Version
  - platform: mqtt
    name: Coordinator Version
    state_topic: "zigbee2mqtt/bridge/config"
    value_template: "{{ value_json.coordinator }}"
    icon: mdi:chip

# Switch for enabling joining
switch:
  - platform: mqtt
    name: "Zigbee2MQTT Main join"
    state_topic: "zigbee2mqtt/bridge/config/permit_join"
    command_topic: "zigbee2mqtt/bridge/config/permit_join"
    payload_on: "true"
    payload_off: "false"

automation:
  # Automation for sending MQTT message on input select change
  - id: zigbee2mqtt_log_level
    alias: Zigbee2MQTT log level
    initial_state: "on"
    trigger:
      platform: state
      entity_id: input_select.zigbee2mqtt_log_level
    action:
      - service: mqtt.publish
        data:
          payload_template: "{{ states('input_select.zigbee2mqtt_log_level') }}"
          topic: zigbee2mqtt/bridge/config/log_level
  # Automation to start timer when enable join is turned on
  - id: zigbee_join_enabled
    alias: Zigbee Join Enabled
    trigger:
      platform: state
      entity_id: switch.zigbee2mqtt_main_join
      to: "on"
    action:
      service: timer.start
      entity_id: timer.zigbee_permit_join
  # Automation to stop timer when switch turned off and turn off switch when timer finished
  - id: zigbee_join_disabled
    alias: Zigbee Join Disabled
    trigger:
      - platform: event
        event_type: timer.finished
        event_data:
          entity_id: timer.zigbee_permit_join
      - platform: state
        entity_id: switch.zigbee2mqtt_main_join
        to: "off"
    action:
      - service: timer.cancel
        data:
          entity_id: timer.zigbee_permit_join
      - service: switch.turn_off
        entity_id: switch.zigbee2mqtt_main_join
  - id: "zigbee2mqtt_create_notification_on_successfull_interview"
    alias: Zigbee Device Joined Notification
    trigger:
      platform: mqtt
      topic: 'zigbee2mqtt/bridge/log'
    condition:
      condition: template
      value_template: '{{trigger.payload_json.type == "pairing" and trigger.payload_json.message == "interview_successful"}}'
    action:
      - service: persistent_notification.create
        data_template:
          title: Device joined the Zigbee2MQTT network
          message: "Name: {{trigger.payload_json.meta.friendly_name}},
                    Vendor: {{trigger.payload_json.meta.vendor}},
                    Description: {{trigger.payload_json.meta.description}}"

The following is an example lovelace card configuration.

title: Zigbee2MQTT
type: entities
show_header_toggle: false
entities:
  - entity: sensor.zigbee2mqtt_bridge_state
  - entity: sensor.zigbee2mqtt_version
  - entity: sensor.coordinator_version
  - entity: input_select.zigbee2mqtt_log_level
  - type: divider
  - entity: switch.zigbee2mqtt_main_join
  - entity: timer.zigbee_permit_join
  - type: divider
  - entity: input_text.zigbee2mqtt_old_name
  - entity: input_text.zigbee2mqtt_new_name
  - entity: script.zigbee2mqtt_rename
  - type: divider
  - entity: input_text.zigbee2mqtt_remove
  - entity: script.zigbee2mqtt_remove


notify:
  - name: Phils_Phone
    platform: simplepush
    device_key: 8SsZpC





######################################
#                                    #
#     INPUT BOOLEAN DEFINITIONS      #
#                                    #
######################################

input_boolean:



#input_boolean:
  pool_pump_timer_status:
    name: Signify when pump is in 15 min timer status
    initial: "OFF"


#input_boolean:
  letterbox_full:
    name: Signify when letterbox is full or empty
    initial: "OFF"

#input_boolean:
  garage_door_open:
    name: Signify when Garage Door is Open
    initial: "OFF"
    








######################################
#                                    #
#              SWITCHES              #
#                                    #
######################################

switch:



#switch:
  - platform: mqtt
    name: "MQTT Test Switch"
    state_topic: "test/test/test"
    command_topic: "test/test/test"
    payload_on: "ON"
    payload_off: "OFF"


 

######################################
#                                    #
#             SENSORS                #
#                                    #
######################################

sensor:



#
# Calculating Daily Run Time of Pool Pump
#

#sensor:
  - platform: history_stats
    name: Pool Pump ON Today
    entity_id: switch.brilliant_3
    state: 'on'
    type: time
    start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
    end: '{{ now() }}'


#
# MQTT Test Sensor
#
  - platform: mqtt
    state_topic: "test/test/test"
    name: "MQTT Test"


#
# MQTT Letterbox Sensor
#
  - platform: mqtt
    state_topic: 'letterbox'
    name: 'Time Mail Delivered'


#
# Solar Inverter Sensors
#

  - platform: rest
    resource: http://192.168.1.180/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
    method: GET
    name: "Current Power"
    value_template: >-
      {% if is_state('sun.sun', 'above_horizon') %}
        {{ (value_json.Body.Data.PAC.Value /1000 | int )|round(2) }}
      {% else %}
        0
      {% endif %}
    unit_of_measurement: kWh
    force_update: true
  - platform: rest
    resource: http://192.168.1.180/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
    method: GET
    name: "Total Power Today"
    value_template: >-
      {% if is_state('sun.sun', 'above_horizon') %}
       {{ (value_json.Body.Data.DAY_ENERGY.Value /1000 | int )|round(2) }}
      {% else %}
        0
      {% endif %}
    unit_of_measurement: kWh
    force_update: true

#sensor:
  - platform: pvoutput
    system_id: 52237
    api_key: readphilsplace
    scan_interval: 120
  - platform: template
    sensors:
      power_consumption:
        value_template: '{% if is_state_attr("sensor.pvoutput", "power_consumption", "NaN") %}0{% else %}{{ states.sensor.pvoutput.attributes.power_consumption }}{% endif %}'
        friendly_name: 'Using'
        unit_of_measurement: 'Watt'
      energy_consumption:
        value_template: '{{ "%0.1f"|format(states.sensor.pvoutput.attributes.energy_consumption|float/1000) }}'
        friendly_name: 'Used'
        unit_of_measurement: 'kWh'
      power_generation:
        value_template: '{% if is_state_attr("sensor.pvoutput", "power_generation", "NaN") %}0{% else %}{{ states.sensor.pvoutput.attributes.power_generation }}{% endif %}'
        friendly_name: 'Generating'
        unit_of_measurement: 'Watt'
      energy_generation:
        value_template: '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(states.sensor.pvoutput.attributes.energy_generation|float/1000) }}{% endif %}'
        friendly_name: 'Generated'
        unit_of_measurement: 'kWh'




######################################
#                                    #
#             IMAGE CARDS            #
#                                    #
######################################



#
# Defining Water Tank Images
#

  - platform: template
    sensors:
      watertank_card:
        value_template: >-
          {% if states.sensor.tank_sensor.state | float >0.01 and states.sensor.tank_sensor.state | float <0.25 %}
           watertank_full
          {% elif states.sensor.tank_sensor.state | float >0.24 and states.sensor.tank_sensor.state | float <0.40 %}
           watertank_90
          {% elif states.sensor.tank_sensor.state | float >0.39 and states.sensor.tank_sensor.state | float <0.54 %}
           watertank_80
          {% elif states.sensor.tank_sensor.state | float >0.53 and states.sensor.tank_sensor.state | float <0.68 %}
           watertank_70
          {% elif states.sensor.tank_sensor.state | float >0.67 and states.sensor.tank_sensor.state | float <0.82 %}
           watertank_60 
          {% elif states.sensor.tank_sensor.state | float >0.81 and states.sensor.tank_sensor.state | float <0.96 %}
           watertank_50 
          {% elif states.sensor.tank_sensor.state | float >0.95 and states.sensor.tank_sensor.state | float <1.10 %}
           watertank_40 
          {% elif states.sensor.tank_sensor.state | float >1.09 and states.sensor.tank_sensor.state | float <1.24 %}
           watertank_30 
          {% elif states.sensor.tank_sensor.state | float >1.23 and states.sensor.tank_sensor.state | float <1.38 %}
           watertank_20 
          {% elif states.sensor.tank_sensor.state | float >1.37 and states.sensor.tank_sensor.state | float <1.52 %}
           watertank_10  
          {% elif states.sensor.tank_sensor.state | float >1.51 and states.sensor.tank_sensor.state | float <2.0 %}
           watertank_empty 
           
          {% endif %}



#
# Defining Letterbox Images
#

  - platform: template
    sensors:
      letterbox_card:
        value_template: >-
          {% if is_state("input_boolean.letterbox_full", "on") %}
           youve_got_mail
           {% elif is_state("input_boolean.letterbox_full", "off") %}
           youve_got_no_mail
          {% endif %}



#
# Defining Garage Door Images
#

  - platform: template
    sensors:
      garage_door_card:
        value_template: >-
          {% if is_state("input_boolean.garage_door_open", "on") %}
           garage_door_open
           {% elif is_state("input_boolean.garage_door_open", "off") %}
           garage_door_closed
          {% endif %}



tts:
  - platform: google_translate
    service_name: google_say
    base_url: https://philwashere.duckdns.org

#
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

Better remove it again from your configuration.yaml, it looks like a mess like that.

in /config , create a directory packages

in your configuration.yaml, add a line under homeassistant, so it looks like this :

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: -28.389010
  longitude: 153.564590
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Australia/Sydney
  # Customization file
  customize: !include customize.yaml
  packages: !include_dir_named packages

Then, in/config/packages packages, create a file zigbee2mqtt.yaml, and add the following :

# Input select for Zigbee2mqtt debug level
input_select:
  zigbee2mqtt_log_level:
    name: Zigbee2mqtt Log Level
    options:
      - debug
      - info
      - warn
      - error
    initial: info
    icon: mdi:format-list-bulleted

# Input text to input Zigbee2mqtt friendly_name for scripts
input_text:
  zigbee2mqtt_old_name:
    name: Zigbee2mqtt Old Name
  zigbee2mqtt_new_name:
    name: Zigbee2mqtt New Name
  zigbee2mqtt_remove:
    name: Zigbee2mqtt Remove

# Scripts for renaming & removing devices
script:
  zigbee2mqtt_rename:
    alias: Zigbee2mqtt Rename
    sequence:
      service: mqtt.publish
      data_template:
        topic: zigbee2mqtt/bridge/config/rename
        payload_template: >-
          {
            "old": "{{ states.input_text.zigbee2mqtt_old_name.state | string }}",
            "new": "{{ states.input_text.zigbee2mqtt_new_name.state | string }}"
          }
  zigbee2mqtt_remove:
    alias: Zigbee2mqtt Remove
    sequence:
      service: mqtt.publish
      data_template:
        topic: zigbee2mqtt/bridge/config/remove
        payload_template: "{{ states.input_text.zigbee2mqtt_remove.state | string }}"

# Timer for joining time remaining (120 sec = 2 min)
timer:
  zigbee_permit_join:
    name: Time remaining
    duration: 120

sensor:
  # Sensor for monitoring the bridge state
  - platform: mqtt
    name: Zigbee2mqtt Bridge state
    state_topic: "zigbee2mqtt/bridge/state"
    icon: mdi:router-wireless
  # Sensor for Showing the Zigbee2mqtt Version
  - platform: mqtt
    name: Zigbee2mqtt Version
    state_topic: "zigbee2mqtt/bridge/config"
    value_template: "{{ value_json.version }}"
    icon: mdi:zigbee
  # Sensor for Showing the Coordinator Version
  - platform: mqtt
    name: Coordinator Version
    state_topic: "zigbee2mqtt/bridge/config"
    value_template: "{{ value_json.coordinator }}"
    icon: mdi:chip
  - platform: mqtt
    name: ZigBee Log Level
    state_topic: "zigbee2mqtt/bridge/config"
    value_template: "{{  value_json.log_level }}"
  - platform: mqtt
    name: ZigBee Permit Join
    state_topic: "zigbee2mqtt/bridge/config"
    value_template: "{{  value_json.permit_join }}"
    icon: mdi:location-enter        

# Switch for enabling joining
switch:
  - platform: mqtt
    name: "Zigbee2mqtt Main join"
    state_topic: "zigbee2mqtt/bridge/config/permit_join"
    command_topic: "zigbee2mqtt/bridge/config/permit_join"
    payload_on: "true"
    payload_off: "false"

automation:
  # Automation for sending MQTT message on input select change
  - alias: Zigbee2mqtt Log Level
    initial_state: "on"
    trigger:
      platform: state
      entity_id: input_select.zigbee2mqtt_log_level
    action:
      - service: mqtt.publish
        data:
          payload_template: "{{ states('input_select.zigbee2mqtt_log_level') }}"
          topic: zigbee2mqtt/bridge/config/log_level
  # Automation for sending MQTT message on input select change
  - id: '1595654450786'
    alias: Sync Zigbee log level input_select
    description: Sync Zigbee log level input_select
    mode: single  
    trigger:
    - entity_id: sensor.zigbee_log_level
      platform: state
    condition: []
    action:
    - service: automation.turn_off
      entity_id: automation.zigbee2mqtt_log_level  
    - service: input_select.select_option
      data_template:
        option: '{{states("sensor.zigbee_log_level")}}'
        entity_id: input_select.zigbee2mqtt_log_level
    - service: automation.turn_on
      entity_id: automation.zigbee2mqtt_log_level         
  # Automation to start timer when enable join is turned on
  - id: zigbee_join_enabled
    alias: Zigbee Join Enabled
    trigger:
      platform: state
      entity_id: switch.zigbee2mqtt_main_join
      to: "on"
    action:
      service: timer.start
      entity_id: timer.zigbee_permit_join
  # Automation to stop timer when switch turned off and turn off switch when timer finished
  - id: zigbee_join_disabled
    alias: Zigbee Join Disabled
    trigger:
      - platform: event
        event_type: timer.finished
        event_data:
          entity_id: timer.zigbee_permit_join
      - platform: state
        entity_id: switch.zigbee2mqtt_main_join
        to: "off"
    action:
      - service: timer.cancel
        data:
          entity_id: timer.zigbee_permit_join
      - service: switch.turn_off
        entity_id: switch.zigbee2mqtt_main_join

Now, in lovelace, choose configure ui

image

Again, choose raw configuration editor

image

and paste the following :

      - entities:
          - input_select.zigbee2mqtt_log_level
        title: Input select
        type: entities
      - entities:
          - input_text.zigbee2mqtt_old_name
          - input_text.zigbee2mqtt_new_name
          - input_text.zigbee2mqtt_remove
        title: Input text
        type: entities
      - entities:
          - script.zigbee2mqtt_rename
          - script.zigbee2mqtt_remove
        title: Script
        type: entities
      - entities:
          - entity: sensor.zigbee2mqtt_version
          - entity: sensor.zigbee2mqtt_bridge_state
          - entity: binary_sensor.zigbee2mqtt
          - entity: sensor.zigbee_log_level
          - entity: sensor.zigbee_permit_join
        type: entities
      - entities:
          - entity: switch.zigbee2mqtt_main_join
        title: Switch
        type: entities        

Restart, set the switch to on

image

Then you can pair :

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.

  • stay close to your ZigBee router
  • for some Aqara devices I had to regularly push the button during pairing (every 3 seconds)
1 Like

Thank you for the post, greatly appreciated.
I am up to the stage where we add a card to lovelace, but not sure what card type to use, see below error…

You did not select ‘raw configuration editor’. It are 5 entities cards.

If I try to past straight into the Raw configuration editor, well rather, at the end of my existing content then it gives errors…?

What entity card should I use, i tried a few but still didnt work

An entities card for :

          - input_select.zigbee2mqtt_log_level
        title: Input select
          - input_text.zigbee2mqtt_old_name
          - input_text.zigbee2mqtt_new_name
          - input_text.zigbee2mqtt_remove
        title: Input text
          - script.zigbee2mqtt_rename
          - script.zigbee2mqtt_remove
        title: Script
          - entity: sensor.zigbee2mqtt_version
          - entity: sensor.zigbee2mqtt_bridge_state
          - entity: binary_sensor.zigbee2mqtt
          - entity: sensor.zigbee_log_level
          - entity: sensor.zigbee_permit_join
     - entity: switch.zigbee2mqtt_main_join
        title: Switch

Choosing an Entities Card and pasting I just get this…

Either you past it in the raw configuration editor, in the correct section, or you create entities card and don’t past, but select manually.

I am doing a manual card and going select all, paste, this is what i get

Manual card -> don’t past.
Select your entities from the drop down.