Notes on using some sensors via Zigbee, on Linux.
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 src.
# 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 '<PAYLOAD>' -t 'path/to/topic'
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.
link1 and 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, here are recommended ones.