- Platform information:
- Hardware: Raspberry Pi 4
- OS: Openhabian 3.3.0
- Java Runtime Environment: which java platform is used and what version
- openHAB version: 3.3.0
I’ve recently started using Zigbee around my house with the Mosquitto broker and Zigbee2MQTT (Z2M) service to integrate into OpenHAB. I’m using the Tubes CC2652P2 based Zigbee to Ethernet/USB Serial Coordinator and everything seems to be fine until OH needs a restart. At that point, the LED indicator on the coordinator goes dark and the logs in Z2M just say
2022-10-25 15:28:19 Saving state to file /opt/zigbee2mqtt/data/state.json
over and over again; commands to zigbee devices from the Z2M interface return failure errors. It’s taken some luck to figure out what was triggering it but now I can’t figure out why it’s happening. Running a sudo service zigbee2mqtt status
and sudo service mosquitto status
shows that the two are “active (running)” but Z2M has the following errors:
● zigbee2mqtt.service - Zigbee2MQTT
Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-10-25 14:55:49 CDT; 21min ago
Main PID: 7246 (npm)
Tasks: 23 (limit: 4915)
CPU: 10.331s
CGroup: /system.slice/zigbee2mqtt.service
├─7246 npm
├─7257 sh -c node index.js
└─7258 node index.js
Oct 25 15:12:51 openhabian npm[7258]: at Timeout._onTimeout (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
Oct 25 15:12:51 openhabian npm[7258]: at listOnTimeout (internal/timers.js:557:17)
Oct 25 15:12:51 openhabian npm[7258]: at processTimers (internal/timers.js:500:7)
Oct 25 15:12:51 openhabian npm[7258]: (node:7258) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch b>
Oct 25 15:15:53 openhabian npm[7258]: Zigbee2MQTT:debug 2022-10-25 15:15:53: Saving state to file /opt/zigbee2mqtt/data/state.json
Oct 25 15:16:11 openhabian npm[7258]: (node:7258) UnhandledPromiseRejectionWarning: Error: SRSP - ZDO - mgmtPermitJoinReq after 6000ms
Oct 25 15:16:11 openhabian npm[7258]: at Timeout._onTimeout (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
Oct 25 15:16:11 openhabian npm[7258]: at listOnTimeout (internal/timers.js:557:17)
Oct 25 15:16:11 openhabian npm[7258]: at processTimers (internal/timers.js:500:7)
Oct 25 15:16:11 openhabian npm[7258]: (node:7258) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch b>
The status errors begin to appear during the startup of OH as the MQTT devices begin to initialize. Thankfully, I can clear the issue with a sudo service zigbee2mqtt restart
but it would be nice to have this handled automatically. Any ideas how to troubleshoot?