===== What? ===== Notes on using some sensors via Zigbee, on Linux. * **bridges** * I got a CC2531 USB stick as coordinator (bridge) to communicate with Zigbee devices from Linux. [[https://www.amazon.de/dp/B0CFJTCB4V|link]]. Other coordinator, recommended at selfhost podcast 113: https://tubeszb.com/ . * magazine c't recommends "Sonoff Zigbee USB Dongle Plus" (usb-connected, available i.e. [[https://www.amazon.de/dp/B09KXTCMSC|here]]) and "Smartlight SLZB-06" (ethernet or wlan connected) in c’t 1/2024 * **sensors** * Aqua temperature sensor [[https://www.amazon.de/dp/B07D37FKGY|link]] * SONOFF ZigBee SNZB-02 Indoor Temperature Sensor [[https://www.amazon.de/dp/B08XB2QC3S|link]] **Note:** while Zigbee can do mesh networking, typical sensors are not acting as 'routers' to extend range. Light bulbs etc. might act as router, or CC2530/CC2531 devices that are flashed with router firmware and plugged into a USB charger [[https://github.com/Koenkk/zigbee2mqtt/issues/2155|src]]. ===== Setup ===== # Connect the CC2531 on Linux, and /dev/ttyACM0 becomes available ll /dev/ttyACM0 crw-rw----. 1 root dialout 166, 0 Dec 19 20:54 /dev/ttyACM0 # Next, install mosquito as MQTT broker dnf -y install mosquitto nodejs nodejs-npm # Fedora apt install mosquitto nodejs node-npm # Debian systemctl start mosquitto # Now, ensure Node.js is installed in right version node --version # v10.X or later should be installed npm --version # 6.X or later should be installed # Now install zigbee2mqtt git clone -b dev https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt cd /opt/zigbee2mqtt npm install # activate graphical frontend less data/configuration.example.yaml vi data/configuration.yaml # frontend: true # Now run Zigbee2mqtt npm start # Now, to subscribe to all mqtt messages mosquitto_sub -t '#' -v # To send an example message mosquitto_pub -m '' -t 'path/to/topic' ===== Debugging ===== With the Thinkpad T590, I had mqtt and zigbee2mqtt running nicely, multiple sensors reporting. After initial setup in a Raspi400, all was running too. Then, it started failing when I did setup an AccessPoint hosted by the Raspi - sensors were no longer reporting, and could also not be interviewed. [[https://www.zigbee2mqtt.io/guide/faq/|link1]] and [[https://www.zigbee2mqtt.io/advanced/zigbee/02_improve_network_range_and_stability.html|link2]] help very much. The issue seems to have been interference: using a USB extension cable solved the issue. Also, the device I use is known for bad quality, [[https://www.zigbee2mqtt.io/guide/adapters/#recommended|here]] are recommended ones.