Zigbee2mqtt suddenly stopped working

Hello

Since (I think about 3 weeks) I have a a serious problem with zigbee2mqtt. Suddenly it stopped working. I am using a CC2531 USB stick. The plugin version is 1.9.0 and HA is the newest too. I actually did not have installed an update (as I remember). I have not changed something else.

The plugin shows me this error if I start/restart with the debug flag
"zigbee_herdsman_debug": true:

2020-01-30T20:11:54.150Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,14,97,2,2,0,2,6,3,144,21,52,1,2,0,0,0,0,218]
2020-01-30T20:11:54.152Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 14 - 3 - 1 - 2 - [2,0,2,6,3,144,21,52,1,2,0,0,0,0] - 218
2020-01-30T20:11:54.157Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- SYS - version - {"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}
2020-01-30T20:11:54.161Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.163Z zigbee-herdsman:adapter:zStack:adapter Detected znp version 'zStack12' ({"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608})
2020-01-30T20:11:54.167Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - osalNvRead - {"id":3840,"offset":0,"len":1,"value":{"type":"Buffer","data":[85]}}
2020-01-30T20:11:54.173Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,3,33,8,0,15,0,37]
2020-01-30T20:11:54.183Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,97,8,0,1,85,62]
2020-01-30T20:11:54.184Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,97,8,0,1,85,62]
2020-01-30T20:11:54.185Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 3 - 1 - 8 - [0,1,85] - 62
2020-01-30T20:11:54.189Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- SYS - osalNvRead - {"status":0,"len":1,"value":{"type":"Buffer","data":[85]}}
2020-01-30T20:11:54.190Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.193Z zigbee-herdsman:adapter:zStack:startZnp Item 'hasConfigured' is valid
2020-01-30T20:11:54.198Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - osalNvRead - {"id":3840,"offset":0,"len":1,"value":{"type":"Buffer","data":[85]}}
2020-01-30T20:11:54.200Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,3,33,8,0,15,0,37]
2020-01-30T20:11:54.211Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,97,8,0,1,85,62]
2020-01-30T20:11:54.212Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,97,8,0,1,85,62]
2020-01-30T20:11:54.212Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 3 - 1 - 8 - [0,1,85] - 62
2020-01-30T20:11:54.214Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- SYS - osalNvRead - {"status":0,"len":1,"value":{"type":"Buffer","data":[85]}}
2020-01-30T20:11:54.215Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.217Z zigbee-herdsman:adapter:zStack:startZnp Item 'hasConfigured' is valid
2020-01-30T20:11:54.221Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - osalNvRead - {"id":132,"len":4,"offset":0,"value":{"type":"Buffer","data":[0,8,0,0]}}
2020-01-30T20:11:54.223Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,3,33,8,132,0,0,174]
2020-01-30T20:11:54.241Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,6,97,8,0,4,0,8,0,0,99]
2020-01-30T20:11:54.242Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,6,97,8,0,4,0,8,0,0,99]
2020-01-30T20:11:54.243Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 6 - 3 - 1 - 8 - [0,4,0,8,0,0] - 99
2020-01-30T20:11:54.244Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- SYS - osalNvRead - {"status":0,"len":4,"value":{"type":"Buffer","data":[0,8,0,0]}}
2020-01-30T20:11:54.245Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.247Z zigbee-herdsman:adapter:zStack:startZnp Item 'channelList' is valid
2020-01-30T20:11:54.249Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - osalNvRead - {"id":99,"len":1,"offset":0,"value":{"type":"Buffer","data":[0]}}
2020-01-30T20:11:54.252Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,3,33,8,99,0,0,73]
2020-01-30T20:11:54.266Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,97,8,0,1,0,107]
2020-01-30T20:11:54.267Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,97,8,0,1,0,107]
2020-01-30T20:11:54.268Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 3 - 1 - 8 - [0,1,0] - 107
2020-01-30T20:11:54.269Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- SYS - osalNvRead - {"status":0,"len":1,"value":{"type":"Buffer","data":[0]}}
2020-01-30T20:11:54.271Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.273Z zigbee-herdsman:adapter:zStack:startZnp Item 'networkKeyDistribute' is valid
2020-01-30T20:11:54.276Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SAPI - readConfiguration - {"id":98,"configid":98,"len":16,"offset":0,"value":{"type":"Buffer","data":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13]}}
2020-01-30T20:11:54.278Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,1,38,4,98,65]
2020-01-30T20:11:54.303Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,19,102,4,0,98,16,1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13,0]
2020-01-30T20:11:54.304Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,19,102,4,0,98,16,1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13,0]
2020-01-30T20:11:54.304Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 19 - 3 - 6 - 4 - [0,98,16,1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13] - 0
2020-01-30T20:11:54.305Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- SAPI - readConfiguration - {"status":0,"configid":98,"len":16,"value":{"type":"Buffer","data":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13]}}
2020-01-30T20:11:54.307Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.308Z zigbee-herdsman:adapter:zStack:startZnp Item 'networkKey' is valid
2020-01-30T20:11:54.311Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - osalNvRead - {"id":131,"len":2,"offset":0,"value":{"type":"Buffer","data":[98,26]}}
2020-01-30T20:11:54.312Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,3,33,8,131,0,0,169]
2020-01-30T20:11:54.322Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,4,97,8,0,2,98,26,23]
2020-01-30T20:11:54.323Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,4,97,8,0,2,98,26,23]
2020-01-30T20:11:54.323Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 4 - 3 - 1 - 8 - [0,2,98,26] - 23
2020-01-30T20:11:54.325Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- SYS - osalNvRead - {"status":0,"len":2,"value":{"type":"Buffer","data":[98,26]}}
2020-01-30T20:11:54.326Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.327Z zigbee-herdsman:adapter:zStack:startZnp Item 'panID' is valid
2020-01-30T20:11:54.330Z zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - osalNvRead - {"id":45,"len":8,"offset":0,"value":{"type":"Buffer","data":[221,221,221,221,221,221,221,221]}}
2020-01-30T20:11:54.332Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,3,33,8,45,0,0,7]
2020-01-30T20:11:54.342Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,10,97,8,0,8,221,221,221,221,221,221,221,221,107]
2020-01-30T20:11:54.343Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,10,97,8,0,8,221,221,221,221,221,221,221,221,107]
2020-01-30T20:11:54.343Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 10 - 3 - 1 - 8 - [0,8,221,221,221,221,221,221,221,221] - 107
2020-01-30T20:11:54.345Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- SYS - osalNvRead - {"status":0,"len":8,"value":{"type":"Buffer","data":[221,221,221,221,221,221,221,221]}}
2020-01-30T20:11:54.346Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.348Z zigbee-herdsman:adapter:zStack:startZnp Item 'extendedPanID' is valid
2020-01-30T20:11:54.351Z zigbee-herdsman:adapter:zStack:znp:SREQ --> UTIL - getDeviceInfo - {}
2020-01-30T20:11:54.353Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,0,39,0,39]
2020-01-30T20:11:54.362Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,22,103,0,0,182,170,56,25,0,75,18,0,0,0,7,9,4,101,4,208,170,118,95,146,162,29]
2020-01-30T20:11:54.363Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,22,103,0,0,182,170,56,25,0,75,18,0,0,0,7,9,4,101,4,208,170,118,95,146,162,29]
2020-01-30T20:11:54.364Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 22 - 3 - 7 - 0 - [0,182,170,56,25,0,75,18,0,0,0,7,9,4,101,4,208,170,118,95,146,162] - 29
2020-01-30T20:11:54.369Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- UTIL - getDeviceInfo - {"status":0,"ieeeaddr":"0x00124b001938aab6","shortaddr":0,"devicetype":7,"devicestate":9,"numassocdevices":4,"assocdeviceslist":[1125,43728,24438,41618]}
2020-01-30T20:11:54.370Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2020-01-30T20:11:54.371Z zigbee-herdsman:adapter:zStack:startZnp ZNP is already started as coordinator
2020-01-30T20:11:54.377Z zigbee-herdsman:adapter:zStack:znp:SREQ --> ZDO - activeEpReq - {"dstaddr":0,"nwkaddrofinterest":0}
2020-01-30T20:11:54.379Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,4,37,5,0,0,0,0,36]
2020-01-30T20:11:54.390Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,101,5,0,97]
2020-01-30T20:11:54.390Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,101,5,0,97]
2020-01-30T20:11:54.391Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 5 - 5 - [0] - 97
2020-01-30T20:11:54.392Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- ZDO - activeEpReq - {"status":0}
2020-01-30T20:11:54.393Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
zigbee2mqtt:error 2020-01-30 21:12:04: Error while starting zigbee-herdsman
zigbee2mqtt:error 2020-01-30 21:12:04: Failed to start zigbee
zigbee2mqtt:error 2020-01-30 21:12:04: Exiting...
zigbee2mqtt:error 2020-01-30 21:12:04: Error: AREQ - ZDO - activeEpRsp after 10000ms
    at Timeout._onTimeout (/zigbee2mqtt-1.9.0/node_modules/zigbee-herdsman/dist/utils/waitress.js:44:24)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
npm
 
ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm 
ERR! Failed at the [email protected] 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!     /root/.npm/_logs/2020-01-30T20_12_04_491Z-debug.log
2020-01-30T21:12:07: PM2 log: App [npm:0] exited with code [1] via signal [SIGINT]

The config is the standard config of the plugin. I only changed the mqtt-username and password.

If I use the command ls -l /dev/serial/by-id I see

~ ls -l /dev/serial/by-id
total 0
crw-rw---- 1 root audio 166, 0 Jan 29 20:27 usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001938AAB6-if00

interesting is, that I do not see the link " -> …/…/ttyACM" like in the example here: https://www.zigbee2mqtt.io/information/FAQ.html#which-port-should-i-use-for-cc26x2r1cc1352p-2-devttyacm0-or-devttyacm1
But I do not remember how it looked when it worked.

In the popup Hass.io -> Hardware it displays me:
serial:
/dev/ttyACM0
/dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001938AAB6-if00
/dev/ttyAMA0

I uninstalled and reinstalled the plugin. No change.
If I remove the usb stick, I get a different error message.

The cpu load increased by 20%. I think this is why the plugin tries to restart and restart in a loop.

I have installed my old backups. No change.

Slowly I am desperate. Has somebody an idea?

Thanks very much
Gilbert

Try removing your CC2531 and plug it back in (try another USB port). Is the green light burning ?

Hi Francis

I still tried to unplug. I also tried the other USB ports. Unfortunately no change.
And the green light is always burning.

Gilbert

Does your configuration.yaml show like this ?

homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://10.0.0.63'
  user: xxxx
  password: xxxx
serial:
  port: >-
    dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001938AAB6-if00
#   port: >-
#     /opt/zigbee2mqtt/vusb/zigbee_cc2530
advanced:
#  rtscts: false
  pan_id: 6754
  channel: 25

Not really. The config of mqtt mosquitto plugin looks like:

{
  "logins": [
    {
      "username": "mqtt-user",
      "password": "mqtt-pass-yes"
    }
  ],
  "anonymous": false,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "require_certificate": false
}

and the config of the zigbee2mqtt plugin looks like:

{
  "data_path": "/share/zigbee2mqtt",
  "devices": "devices.yaml",
  "groups": "groups.yaml",
  "homeassistant": true,
  "permit_join": false,
  "mqtt": {
    "base_topic": "zigbee2mqtt",
    "server": "mqtt://core-mosquitto",
    "user": "mqtt-user",
    "password": "mqtt-pass-yes"
  },
  "serial": {
    "port": "/dev/ttyACM0"
  },
  "advanced": {
    "pan_id": 6754,
    "channel": 11,
    "network_key": [
      1,
      3,
      5,
      7,
      9,
      11,
      13,
      15,
      0,
      2,
      4,
      6,
      8,
      10,
      12,
      13
    ],
    "availability_blacklist": []
  },
  "ban": [],
  "whitelist": [],
  "queue": {},
  "socat": {
    "enabled": false,
    "master": "pty,raw,echo=0,link=/dev/ttyZ2M,mode=777",
    "slave": "tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5",
    "restartdelay": 1,
    "initialdelay": 1,
    "options": "-d -d",
    "log": true
  },
  "zigbee_herdsman_debug": true
}

In the configuration.yaml I have nothing from mqtt and nothing from zigbee2mqtt.

I was referring to the configuration.yaml of zigbee2mqtt, not the one from HA

try

{
  "data_path": "/share/zigbee2mqtt",
  "devices": "devices.yaml",
  "groups": "groups.yaml",
  "homeassistant": true,
  "permit_join": false,
  "mqtt": {
    "base_topic": "zigbee2mqtt",
    "server": "mqtt://core-mosquitto",
    "user": "mqtt-user",
    "password": "mqtt-pass-yes"
  },
  "serial": {
    "port": "dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001938AAB6-if00"
  },
  "advanced": {
    "pan_id": 6754,
    "channel": 11,
    "network_key": [
      1,
      3,
      5,
      7,
      9,
      11,
      13,
      15,
      0,
      2,
      4,
      6,
      8,
      10,
      12,
      13
    ],
    "availability_blacklist": []
  },
  "ban": [],
  "whitelist": [],
  "queue": {},
  "socat": {
    "enabled": false,
    "master": "pty,raw,echo=0,link=/dev/ttyZ2M,mode=777",
    "slave": "tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5",
    "restartdelay": 1,
    "initialdelay": 1,
    "options": "-d -d",
    "log": true
  },
  "zigbee_herdsman_debug": true
}

I had the exact same issue. Zigbee suddently stopped working and there were no other changes. Same error codes as gilbert-grape. Tried the device based port setting to no avail.
Was able to resolve the problem by reflashing my CC2531. After this everthing magically started working. I have no idea what could have corrupted the flash image on the device. I had recently updated Mosquitto MQTT broker to version 5.1. I am not sure but I suspect the problem may have occurred after the first power reset post the upgrade. Can anyone verify?

I had the Error: AREQ - ZDO - mgmtLqiRsp after 10000ms at Timeout._onTimeout to and none of my 95 devices had a route.
After i flashed my TubesZB coordinator with zStack3x0 20230507 (same version as i was running before the issue started to occur) it worked again.
Thanks for sharing