My current contact sensors use zigbee and use an USB drive I have to talk to openhab. I bought a new sensor that uses Zigbee2Mqtt from Aqara, I’ve successfully added it as a new zigbee thing but I can’t figure out the mqtt part. The contact switch only shows as a on/off switch in the paperUI.
I tried following tutorials and went to my “nano /opt/zigbee2mqtt/data/configuration.yaml” file but the file was empty. How can I finish the Mqtt part of the setup?
I am attempting to start zigbee2mqtt, but I keep getting the following error:
pi@raspberrypi:/opt/zigbee2mqtt $ npm start
> firstname.lastname@example.org start /opt/zigbee2mqtt
> node index.js
Zigbee2MQTT:info 2020-11-23 17:19:39: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-11-23.17-19-37' filename: log.txt
Zigbee2MQTT:info 2020-11-23 17:19:39: Starting Zigbee2MQTT version 1.16.1 (commit #4978d09)
Zigbee2MQTT:info 2020-11-23 17:19:39: Starting zigbee-herdsman...
Zigbee2MQTT:error 2020-11-23 17:20:01: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2020-11-23 17:20:01: Failed to start zigbee
Zigbee2MQTT:error 2020-11-23 17:20:01: Exiting...
Zigbee2MQTT:error 2020-11-23 17:20:01: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:94:31)
at Generator.throw (<anonymous>)
at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:25:65)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! email@example.com start: `node index.js`
npm ERR! Exit status 1
npm ERR! Failed at the firstname.lastname@example.org start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-11-24T01_20_01_315Z-debug.log
I tried editing the config with and tried ttyUSB0 and ttyUSB1, but both still cause the error.
My issue is my Zigbee contact sensors die or become out or range and don’t notify me. I researched ones that will alert that and was told Mqtt communicates with them constantly and would alert me when they lose connection.