Link Search Menu Expand Document Moon Sun
Table of contents
  1. Zigbee Adapter CC2531
    1. Installation
    2. Configuring
    3. Starting Zigbee2MQTT
    4. Setup Zigbee2MQTT as service

Zigbee Adapter CC2531

The CC2531 is a USB enabled true system-on-chip (SoC) solution for IEEE 802.15.4, ZigBee and RF4CE applications. CC2531 is Cheap but not very powerful and has a limited rang of ~30 m line of sight.

Installation

  1. Setup Node.js repository sniffer
    sudo curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
    
  2. Install Node.js and verify the version installed
     sudo apt-get install -y nodejs git make g++ gcc
    
     node --version
    
     npm --version
    
  3. Clone Zigbee2MQTT repository
     sudo git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
    
     sudo chown -R pi:pi /opt/zigbee2mqtt
    
  4. Install dependencies (as user “pi”)
     cd /opt/zigbee2mqtt
     npm ci --production
    

If everything went correctly the output of npm ci will show you the number of package and seconds. npm ci produces some warning which can be ignored.

Configuring

Before starting Zigbee2MQTT the configuration file configuration.yaml need to be edited. Open the configuration file with the command: nano /opt/zigbee2mqtt/data/configuration.yaml, update MQTT Server url and authentication (if applicable) and then save the file and exit. It is also recommended to use a custom network key. This can be done with following command:

echo "\n\nadvanced:\n    network_key: GENERATE" >> /opt/zigbee2mqtt/data/configuration.yaml

Starting Zigbee2MQTT

Run:

cd /opt/zigbee2mqtt
npm start

Setup Zigbee2MQTT as service

sudo systemctl enable zigbee2mqtt.service