Table of contents
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
- Setup Node.js repository sniffer
sudo curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- Install Node.js and verify the version installed
sudo apt-get install -y nodejs git make g++ gcc node --version npm --version
- Clone Zigbee2MQTT repository
sudo git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt sudo chown -R pi:pi /opt/zigbee2mqtt
- 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