Using the USB devices CC2531 and CC2652P Zigbee, you can connect various Zigbee devices such as Xiaomi, Samsung SmartThings, Philips, Sonoff, Yale, Tuya, and more to Hass. You can also use the LAN Hub Zigbee CC2652P as a coordinator to connect Zigbee devices on each floor.

References: Zigbee2mqtt documentation: https://www.zigbee2mqtt.io/

Installation:

  1. Prepare the CC2531 or CC2652P USB device with the flashed firmware as a coordinator.
  2. Add the repository URL to the Hassio Add-on Store: https://github.com/zigbee2mqtt/hassio-zigbee2mqtt
  3. Find and install the “zigbee2mqtt” add-on in Hass.
  4. Identify the serial port of the connected CC2531 or CC2652P USB on your Pi:
    • The CC2531 USB will be recognized as “ttyACM0”.
    • The CC2652P USB will be recognized as “ttyUSB0”.
  5. Update the IP, user, and password of the MQTT (if you haven’t installed an MQTT broker, refer to the MQTT broker setup) in the zigbee2mqtt add-on configuration:
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://192.168.1.x'      # Replace with your MQTT IP.
  user: mqtt_user                    # Replace with your MQTT user.
  password: mqtt_pass                # Replace with your MQTT password.

serial:
  port: /dev/ttyUSB0

advanced:
  log_level: info
  channel: 11                         # Zigbee channel.

Save the configuration file and start the add-on. Click “REFRESH” to view the logs.

It’s recommended to enable the “Watchdog” and “Show in sidebar” options to display the “Zigbee2mqtt” section in the left menu.

  1. Pair Zigbee devices with Hass:After starting zigbee2mqtt, click on the “Zigbee2mqtt” section in the left menu. The Zigbee2mqtt interface will appear. Select “Permit Join (All)” to allow Zigbee device pairing. Once the pairing is complete, select “Disable” again.

    Reset the Zigbee device to enter pairing mode.

    The CC2531 or CC2652P module will search for devices and add them to Hass. Refresh the log to see messages like the following:

zigbee2mqtt:info 2020-02-21 23:53:40: Device '0x00158d00022f7fec' joined
zigbee2mqtt:info 2020-02-21 23:53:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"0x00158d00022f7fec"}}'
zigbee2mqtt:info 2020-02-21 23:53:40: Starting interview of '0x00158d00022f7fec'
zigbee2mqtt:info 2020-02-21 23:53:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_started","meta":{"friendly_name":"0x00158d00022f7fec"}}'
zigbee2mqtt:info 2020-02-21 23:53:43: MQTT publish: topic 'homeassistant/binary_sensor/0x00158d00022f7fec/contact/config', payload '{"payload_on":false,"payload_off":true,"value_template":"{{ value_json.contact

At this point, the MQTT Integration of Hass will recognize the new Zigbee device. Go to Configuration > Integrations > MQTT. You can add the new Zigbee device to the GUI.

Since Zigbee and Wi-Fi operate in the same 2.4 GHz frequency band, to ensure stable Zigbee network operation, consider the Wi-Fi signal strength (RSSI) and the operating channels of both Wi-Fi and Zigbee networks. Choose an appropriate channel for the Zigbee network based on these factors.