Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms) #2997

Closed
fantasyjqc opened this issue Feb 25, 2020 · 177 comments
Closed
Labels
stale Stale issues

Comments

@fantasyjqc
Copy link

#Bug Report

What happened
zigbee2mqtt cannot connect to adpater

zigbee2mqtt:info  2020-02-25 09:27:08: Starting zigbee2mqtt version 1.
10.0-dev (commit #ad59ff5)
zigbee2mqtt:info  2020-02-25 09:27:08: Starting zigbee-herdsman...
zigbee2mqtt:error 2020-02-25 09:27:16: Error while starting zigbee-her
dsman
zigbee2mqtt:error 2020-02-25 09:27:16: Failed to start zigbee
zigbee2mqtt:error 2020-02-25 09:27:16: Exiting...
zigbee2mqtt:error 2020-02-25 09:27:16: Error: Failed to connect to the 
adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.<anonymous> (/opt/zigbee2mqtt3/node_modules
/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:72:2
3)
    at Generator.throw (<anonymous>)
    at rejected (/opt/zigbee2mqtt3/node_modules/zigbee-herdsman/di
st/adapter/z-stack/adapter/zStackAdapter.js:6:65)

What did you expect to happen
zigbee2mqtt

How to reproduce it (minimal and precise)
homeassistant: false
permit_join: true
mqtt:
base_topic: zigbee2mqtt3
server: 'mqtt://192.168.123.133:1883'
serial:
port: 'tcp://192.168.123.139:8881'

ping and telnet is ok:

image

image

Debug Info
zigbee2mqtt version: 1.10.0-dev (commit #ad59ff5)
CC2530 firmware version: CC2530_SOURCE_ROUTING_20190619.zip

@mibas74
Copy link

mibas74 commented Mar 2, 2020

i confirm this issue after upgrade to 1.11.0:

`● zigbee2mqtt.service - zigbee2mqtt
Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-03-02 21:31:58 CET; 52s ago
Main PID: 6915 (npm)
Tasks: 13 (limit: 2319)
Memory: 13.7M
CGroup: /system.slice/zigbee2mqtt.service
├─6915 npm
└─6926 sh -c node index.js

Mar 02 21:32:02 openhab npm[6915]: zigbee2mqtt:info 2020-03-02 21:32:02: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-03-02.21-32-02' filename: log.txt
Mar 02 21:32:02 openhab npm[6915]: zigbee2mqtt:info 2020-03-02 21:32:02: Starting zigbee2mqtt version 1.11.0 (commit #31e5678)
Mar 02 21:32:02 openhab npm[6915]: zigbee2mqtt:info 2020-03-02 21:32:02: Starting zigbee-herdsman...
Mar 02 21:32:15 openhab npm[6915]: zigbee2mqtt:error 2020-03-02 21:32:15: Error while starting zigbee-herdsman
Mar 02 21:32:15 openhab npm[6915]: zigbee2mqtt:error 2020-03-02 21:32:15: Failed to start zigbee
Mar 02 21:32:15 openhab npm[6915]: zigbee2mqtt:error 2020-03-02 21:32:15: Exiting...
Mar 02 21:32:15 openhab npm[6915]: zigbee2mqtt:error 2020-03-02 21:32:15: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
Mar 02 21:32:15 openhab npm[6915]: at ZStackAdapter. (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:72:23)
Mar 02 21:32:15 openhab npm[6915]: at Generator.throw ()
Mar 02 21:32:15 openhab npm[6915]: at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:6:65)
`

@a20gard
Copy link

a20gard commented Mar 2, 2020

I experienced same issue and i don't remember how i solved it...

  • if it was running "sudo npm rebuild"
  • or unplugging and plugging again the usb key with the coordinator

@mibas74
Copy link

mibas74 commented Mar 2, 2020

hi,
thanks, i've tried this but unfortunately without success yet..

@Miguelin96
Copy link

i confirm this issue after upgrade to 1.11.0:

zigbee2mqtt:info 2020-03-03 00:22:00: Logging to console and directory: '/share/zigbee2mqtt/log/2020-03-03.00-22-00' filename: log.txt
zigbee2mqtt:info 2020-03-03 00:22:01: Starting zigbee2mqtt version 1.11.0 (commit #unknown)
zigbee2mqtt:info 2020-03-03 00:22:01: Starting zigbee-herdsman...
zigbee2mqtt:error 2020-03-03 00:22:09: Error while starting zigbee-herdsman
zigbee2mqtt:error 2020-03-03 00:22:09: Failed to start zigbee
zigbee2mqtt:error 2020-03-03 00:22:09: Exiting...
zigbee2mqtt:error 2020-03-03 00:22:09: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter. (/zigbee2mqtt-1.11.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:72:23)
at Generator.throw ()
at rejected (/zigbee2mqtt-1.11.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:6:65)
npm

ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.11.0 start: node index.js
npm ERR!
Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.11.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@Koenkk
Copy link
Owner

Koenkk commented Mar 3, 2020

Please check your adapter communication: https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start

@mibas74
Copy link

mibas74 commented Mar 3, 2020

it was working and stopped after upgrade to current version.

[21:14:55] openhabian@openhab:~$ ls -l /dev/serial/by-id
lrwxrwxrwx 1 root root 13 Mar 2 23:00 usb-Texas_Instruments_TI_CC2531_USB_CDC__ _0X00124B0018E248BF-if00 -> ../../ttyACM0

[21:15:12] openhabian@openhab:~$ test -w /dev/ttyACM0 && echo success || echo failure
success

[21:15:37] openhabian@openhab:~$ sudo apt-get purge modemmanager
[sudo] password for openhabian:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'modemmanager' is not installed, so not removed

i've found error message in dmesg:
cdc_acm 1-1.3:1.0: failed to set dtr/rts

@Koenkk
Copy link
Owner

Koenkk commented Mar 3, 2020

@mibas74 so when switching back to zigbee2mqtt 1.10.0 it works again?

@CyberianD
Copy link

I have the same problem.

The adapter (CC2530) communication is success.

Mar 03 21:23:11 Zigbee2MQTT npm[1550]: zigbee2mqtt:info  2020-03-03 21:23:11: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-03-03.21-23-11' filename: log.txt
Mar 03 21:23:11 Zigbee2MQTT npm[1550]: zigbee2mqtt:info  2020-03-03 21:23:11: Starting zigbee2mqtt version 1.10.0-dev (commit #c25c32f)
Mar 03 21:23:11 Zigbee2MQTT npm[1550]: zigbee2mqtt:info  2020-03-03 21:23:11: Starting zigbee-herdsman...
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: zigbee2mqtt:error 2020-03-03 21:23:18: Error while starting zigbee-herdsman
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: zigbee2mqtt:error 2020-03-03 21:23:18: Failed to start zigbee
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: zigbee2mqtt:error 2020-03-03 21:23:18: Exiting...
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: zigbee2mqtt:error 2020-03-03 21:23:18: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
Mar 03 21:23:18 Zigbee2MQTT npm[1550]:     at ZStackAdapter.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:72:23)
Mar 03 21:23:18 Zigbee2MQTT npm[1550]:     at Generator.throw (<anonymous>)
Mar 03 21:23:18 Zigbee2MQTT npm[1550]:     at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:6:65)
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: npm ERR! code ELIFECYCLE
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: npm ERR! errno 1
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: npm ERR! zigbee2mqtt@1.10.0-dev start: `node index.js`
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: npm ERR! Exit status 1
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: npm ERR!
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: npm ERR! Failed at the zigbee2mqtt@1.10.0-dev start script.
Mar 03 21:23:18 Zigbee2MQTT npm[1550]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
My configuration.yaml

homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://192.168.178.95'
  user: ****
  password: ****
serial:
  port: /dev/ttyUSB0
  baudrate: 115200

@mibas74
Copy link

mibas74 commented Mar 3, 2020

@mibas74 so when switching back to zigbee2mqtt 1.10.0 it works again?

could You provide a link how to downgrade to one of previous versions please?

@mibas74
Copy link

mibas74 commented Mar 3, 2020

Hi,
i've reflashed CC2531 USB dongle with latest coordinator source routing firmware and it seems that it started properly and works OK.

@RuvdH
Copy link

RuvdH commented Mar 5, 2020

I thought it was me. I had to do a reinstall of my pi and after the new installation I run into the same issues. I'm not sure what version I ran before my crash of my SD card, but I haven't updated it in a while. I haven't flashed my dongle yet with the latest version so if there is anything I can do to test please let me know.

@hoedha12
Copy link

hoedha12 commented Mar 7, 2020

I was having the very same issue with CC2530 and external antena after updating from 1.4 (very old, I know).. Here are the things I've done, I don't know which one solved the problem :

  1. uninstall modemManager
  2. unplug and plugging the stick again
  3. rebooting the pc
  4. making sure rtscts is set to false
  5. making sure disable_led entry is deleted

@jorgensmit
Copy link

I updated the CC2531 USB stick and it's working again.

@RuvdH
Copy link

RuvdH commented Mar 10, 2020

I reflashed the stick and tried it again with success. This is odd as I had the same version on the stick already. But at least it's working again.

@sergeylanzman
Copy link

sergeylanzman commented Mar 10, 2020

maybe it's this home-assistant/supervisor#1569

@RadianceNL
Copy link

Maybe a silly suggestion. I just received my CC26x2R today and put in the a 3d printed enclosure and had the same error. I just figured out that the reset button was pressed by the enclosure. Snapped the part of that pushes against the reset button and it's running now.

@ayukhno
Copy link

ayukhno commented Mar 11, 2020

I have the same problem wiht cc2538 on 1.11.0 ver of z2m.
i can't reflash my stick. what can I do?
thnx

@ayukhno
Copy link

ayukhno commented Mar 11, 2020

i foung some warning in "hassio_supervisor" container - might be it could help:
20-03-11 21:31:43 WARNING (MainThread) [supervisor.store.data] Can't read /data/addons/git/7ad98f9c/zigbee2mqtt-edge/config.json: does not match regular expression for dictionary value @ data['schema']['experimental']['transmit_power']. Got 'int(-22,19)?'

@vdkeybus
Copy link

Yesterday, my Zigbee network was working fine and suddenly failed completely. I got the same problem (cannot set dtr/rts in dmesg, Error: SRSP - SYS - ping after 6s). Power cycling / restarting z2m had no effect.

Short story: I had to reflash the CC2531 to get it working again. I don't know which version was on the stick (bought it pre-programmed), but I believe I wrote the same version 20190619.

However, I'm 100% sure it happened exactly when I touched an Ikea ICTC-G-1 dimmer.

@gombal88
Copy link

gombal88 commented Mar 14, 2020

I had the same error. I'm running docker version of zigbee2mqtt and I was trying to reflash stick but no effect.
After connecting stick green led light turns off.
zigbee2mqtt version 1.11.0

@vdkeybus
Copy link

The green light also turned off when my CC2531 was still failing. I retried at least 5 times (power on/off, press button, reload serial driver, restart z2m).

After I re-flashed using cc-tool it worked immediately again on first attempt.

@keniji
Copy link

keniji commented Mar 17, 2020

I got a CC26X2R1 yesterday and have this issue with this new adapter. I made a frash Raspbian for my 3B+ from:
Raspbian Buster Lite

And then follow the instruction to start ZigBee2mqtt but still have the same issue. Here is the log with zigbee-herdsman debug mode enabled:

zigbee2mqtt:info  2020-03-17 02:10:32: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-03-17.02-10-32' filename: log.txt
zigbee2mqtt:debug 2020-03-17 02:10:32: Can't load state from file /opt/zigbee2mqtt/data/state.json (doesn't exist)
zigbee2mqtt:info  2020-03-17 02:10:32: Starting zigbee2mqtt version 1.11.0 (commit #e140cf5)
zigbee2mqtt:info  2020-03-17 02:10:32: Starting zigbee-herdsman...
zigbee2mqtt:debug 2020-03-17 02:10:32: Using zigbee-herdsman with settings: '{"network":{"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11],"networkKey":"HIDDEN"},"databasePath":"/opt/zigbee2mqtt/data/database.db","databaseBackupPath":"/opt/zigbee2mqtt/data/database.db.backup","backupPath":"/opt/zigbee2mqtt/data/coordinator_backup.json","serialPort":{"baudRate":115200,"rtscts":true,"path":"/dev/ttyACM0"}}'
  zigbee-herdsman:adapter Path '/dev/ttyACM0' is valid for 'ZStackAdapter' +0ms
  zigbee-herdsman:controller:log Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13],"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11]},"serialPort":{"baudRate":115200,"rtscts":true,"path":"/dev/ttyACM0"},"databasePath":"/opt/zigbee2mqtt/data/database.db","databaseBackupPath":"/opt/zigbee2mqtt/data/database.db.backup","backupPath":"/opt/zigbee2mqtt/data/coordinator_backup.json"}' +0ms
  zigbee-herdsman:adapter:zStack:znp:log Opening SerialPort with /dev/ttyACM0 and {"baudRate":115200,"rtscts":true,"autoOpen":false} +0ms
  zigbee-herdsman:adapter:zStack:znp:log Serialport opened +8ms
  zigbee-herdsman:adapter:zStack:znp:log Writing skip bootloader payload +1ms
  zigbee-herdsman:adapter:zStack:unpi:writer --> buffer [239] +0ms
  zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - ping - {"capabilities":1} +0ms
  zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,0,33,1,32] +1s
zigbee2mqtt:error 2020-03-17 02:10:39: Error while starting zigbee-herdsman
zigbee2mqtt:error 2020-03-17 02:10:40: Failed to start zigbee
zigbee2mqtt:error 2020-03-17 02:10:40: Exiting...
zigbee2mqtt:error 2020-03-17 02:10:40: 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:72:23)
    at Generator.throw (<anonymous>)
    at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:6:65)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.11.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.11.0 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-03-17T02_10_40_066Z-debug.log

Port checked and it should be alright:

pi@raspberrypi:/opt/zigbee2mqtt/data $ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Mar 16 17:11 usb-Texas_Instruments_XDS110__03.00.00.07__Embed_with_CMSIS-DAP_L1100115-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 Mar 16 17:11 usb-Texas_Instruments_XDS110__03.00.00.07__Embed_with_CMSIS-DAP_L1100115-if03 -> ../../ttyACM1

And the write access to the port has been verified too:
pi@raspberrypi:/opt/zigbee2mqtt/data $ test -w /dev/ttyACM0 && echo success || echo failure success

I also tried version 1.10 but still got the same issue... BTW I use UNIFLASH to flash this firmware many times:
CC26X2R1_20191106.zip

And here is my configuration:

homeassistant: false
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://ADDRESS:1883'
  user: USER
  password: PASSWORD

serial:
  port: /dev/ttyACM0

Is there anything else I can try? Many thanks!

@nldroid
Copy link
Contributor

nldroid commented Mar 17, 2020

Is there anything else I can try? Many thanks!

You can try with:
port: null
to let zigbee2mqtt auto detect the port

@keniji
Copy link

keniji commented Mar 17, 2020

Is there anything else I can try? Many thanks!

You can try with:
port: null
to let zigbee2mqtt auto detect the port

Thanks, I tried this but still getting the same error...

And then I tried to change the panid, channel and set rtscts to "false", none of them work:

zigbee2mqtt:debug 2020-03-17 07:24:07: Using zigbee-herdsman with settings: '{"network":{"panID":6755,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[12],"networkKey":"HIDDEN"},"databasePath":"/opt/zigbee2mqtt/data/database.db","databaseBackupPath":"/opt/zigbee2mqtt/data/database.db.backup","backupPath":"/opt/zigbee2mqtt/data/coordinator_backup.json","serialPort":{"baudRate":115200,"rtscts":false,"path":null}}'

@keniji
Copy link

keniji commented Mar 17, 2020

Below is the debug log with path set to "null":

pi@raspberrypi:/opt/zigbee2mqtt $ DEBUG=* npm start

> zigbee2mqtt@1.11.0 start /opt/zigbee2mqtt
> node index.js

winston:create-logger Define prototype method for "error"
winston:create-logger Define prototype method for "warn"
winston:create-logger Define prototype method for "info"
winston:create-logger Define prototype method for "http"
winston:create-logger Define prototype method for "verbose"
winston:create-logger Define prototype method for "debug"
winston:create-logger Define prototype method for "silly"
winston:create-logger Define prototype method for "error"
winston:create-logger Define prototype method for "warn"
winston:create-logger Define prototype method for "info"
winston:create-logger Define prototype method for "http"
winston:create-logger Define prototype method for "verbose"
winston:create-logger Define prototype method for "debug"
winston:create-logger Define prototype method for "silly"
zigbee2mqtt:info  2020-03-17 07:43:15: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-03-17.07-43-15' filename: log.txt
winston:file written true false
zigbee2mqtt:debug 2020-03-17 07:43:15: Can't load state from file /opt/zigbee2mqtt/data/state.json (doesn't exist)
winston:file written true false
winston:file logged 127 info  2020-03-17 07:43:15: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-03-17.07-43-15' filename: log.txt

winston:file logged 230 debug 2020-03-17 07:43:15: Can't load state from file /opt/zigbee2mqtt/data/state.json (doesn't exist)

winston:file ENOENT ok /opt/zigbee2mqtt/data/log/2020-03-17.07-43-15/log.txt
winston:file stat done: log.txt { size: 0 }
winston:file create stream start /opt/zigbee2mqtt/data/log/2020-03-17.07-43-15/log.txt { flags: 'a' }
winston:file create stream ok /opt/zigbee2mqtt/data/log/2020-03-17.07-43-15/log.txt
winston:file file open ok /opt/zigbee2mqtt/data/log/2020-03-17.07-43-15/log.txt
zigbee2mqtt:info  2020-03-17 07:43:16: Starting zigbee2mqtt version 1.11.0 (commit #e140cf5)
winston:file written true false
zigbee2mqtt:info  2020-03-17 07:43:16: Starting zigbee-herdsman...
winston:file written true false
zigbee2mqtt:debug 2020-03-17 07:43:16: Using zigbee-herdsman with settings: '{"network":{"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11],"networkKey":"HIDDEN"},"databasePath":"/opt/zigbee2mqtt/data/database.db","databaseBackupPath":"/opt/zigbee2mqtt/data/database.db.backup","backupPath":"/opt/zigbee2mqtt/data/coordinator_backup.json","serialPort":{"baudRate":115200,"rtscts":true,"path":null}}'
winston:file written true false
  serialport/bindings loading LinuxBinding +0ms
  zigbee-herdsman:adapter No path provided, auto detecting path +0ms
  serialport/stream .list +0ms
winston:file logged 81 info  2020-03-17 07:43:16: Starting zigbee2mqtt version 1.11.0 (commit #e140cf5)

winston:file logged 136 info  2020-03-17 07:43:16: Starting zigbee-herdsman...

winston:file logged 555 debug 2020-03-17 07:43:16: Using zigbee-herdsman with settings: '{"network":{"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11],"networkKey":"HIDDEN"},"databasePath":"/opt/zigbee2mqtt/data/database.db","databaseBackupPath":"/opt/zigbee2mqtt/data/database.db.backup","backupPath":"/opt/zigbee2mqtt/data/coordinator_backup.json","serialPort":{"baudRate":115200,"rtscts":true,"path":null}}'

  zigbee-herdsman:adapter Auto detected path '/dev/ttyACM0' from adapter 'ZStackAdapter' +244ms
  zigbee-herdsman:controller:log Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13],"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11]},"serialPort":{"baudRate":115200,"rtscts":true,"path":"/dev/ttyACM0"},"databasePath":"/opt/zigbee2mqtt/data/database.db","databaseBackupPath":"/opt/zigbee2mqtt/data/database.db.backup","backupPath":"/opt/zigbee2mqtt/data/coordinator_backup.json"}' +0ms
  zigbee-herdsman:adapter:zStack:znp:log Opening SerialPort with /dev/ttyACM0 and {"baudRate":115200,"rtscts":true,"autoOpen":false} +0ms
  serialport/stream opening path: /dev/ttyACM0 +251ms
  serialport/binding-abstract open +0ms
  serialport/stream _read queueing _read for after open +2ms
  serialport/bindings/poller Creating poller +0ms
  serialport/stream opened path: /dev/ttyACM0 +3ms
  serialport/stream _read reading { start: 0, toRead: 65536 } +1ms
  serialport/binding-abstract read +7ms
  zigbee-herdsman:adapter:zStack:znp:log Serialport opened +11ms
  zigbee-herdsman:adapter:zStack:znp:log Writing skip bootloader payload +1ms
  zigbee-herdsman:adapter:zStack:unpi:writer --> buffer [239] +0ms
  serialport/stream _write 1 bytes of data +3ms
  serialport/binding-abstract write 1 bytes +3ms
  serialport/bindings/unixRead Starting read +0ms
  serialport/bindings/unixWrite Starting write 1 bytes offset 0 bytesToWrite 1 +0ms
  serialport/bindings/unixRead read error [Error: EAGAIN: resource temporarily unavailable, read] {
  errno: -11,
  code: 'EAGAIN',
  syscall: 'read'
} +2ms
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +2ms
  serialport/bindings/poller Polling for "readable" +13ms
  serialport/bindings/unixWrite write returned: wrote 1 bytes +4ms
  serialport/bindings/unixWrite Finished writing 1 bytes +1ms
  serialport/stream binding.write write finished +9ms
  zigbee-herdsman:adapter:zStack:znp:SREQ --> SYS - ping - {"capabilities":1} +0ms
  zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,0,33,1,32] +1s
  serialport/stream _write 5 bytes of data +1s
  serialport/binding-abstract write 5 bytes +1s
  serialport/bindings/unixWrite Starting write 5 bytes offset 0 bytesToWrite 5 +1s
  serialport/bindings/unixWrite write returned: wrote 5 bytes +1ms
  serialport/bindings/unixWrite Finished writing 5 bytes +1ms
  serialport/stream binding.write write finished +4ms
zigbee2mqtt:error 2020-03-17 07:43:23: Error while starting zigbee-herdsman
winston:file written true false
zigbee2mqtt:error 2020-03-17 07:43:23: Failed to start zigbee
winston:file written true false
zigbee2mqtt:error 2020-03-17 07:43:23: Exiting...
winston:file written true false
zigbee2mqtt:error 2020-03-17 07:43:23: 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:72:23)
    at Generator.throw (<anonymous>)
    at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:6:65)
winston:file written true false
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.11.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.11.0 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-03-17T07_43_23_552Z-debug.log

@hughb8on
Copy link

I was having the same problem today following a soft reboot to apply updates to Ubuntu.
Unplugging and replugging my CC26X2R1 fixed it. This is on 1.11.
I can see nothing in the logs; it seems as far as linux is concerned the adapter was available the whole time.

@keniji
Copy link

keniji commented Mar 17, 2020

I was having the same problem today following a soft reboot to apply updates to Ubuntu.
Unplugging and replugging my CC26X2R1 fixed it. This is on 1.11.
I can see nothing in the logs; it seems as far as linux is concerned the adapter was available the whole time.

Thanks hughb8on, but I think I have already unplug&replug the board many times but it's all in vain. I also tried it on Windows and the error is the same.
And I have just verified the firmware in UniFlash and the verfication is success so I guess the communication with the board should be OK?

2020/3/17 下午10:07:12] [SUCCESS] Program Load completed successfully.
[2020/3/17 下午10:07:46] [INFO] Cortex_M3_0: GEL Output: Memory Map Initialization Complete.
[2020/3/17 下午10:07:49] [INFO] Cortex_M4_0: GEL Output: Memory Map Initialization Complete.
[2020/3/17 下午10:07:56] [SUCCESS] Cortex_M4_0: Program verification successful for C:/Users/keniji/Desktop/CC26X2R1_20191106.hex

I am thinking may be I should submit an issue under zigbee-herdsman or Z-Stack-firmware instead?

@Koenkk
Copy link
Owner

Koenkk commented Mar 17, 2020

@keniji what CC26X2R1 revision do you have? (you will find it on the white sticker on the back of the board)

@keniji
Copy link

keniji commented Mar 17, 2020

@keniji what CC26X2R1 revision do you have? (you will find it on the white sticker on the back of the board)

Hi Koenkk, the board shows Rev 1.0.1, but in UniFlash it shows Revision: C (1.1)

@Koenkk
Copy link
Owner

Koenkk commented Mar 17, 2020

@hemant5400z
Copy link

Hi guys,

I have CC2652P, which is running on my linux box which acts as a USB server. Zigbee2mqtt works fine locally using ttyUSB, however i'm trying to get this work over IP using ser2net.

The problem is when I start Zigbee2Mqtt over op using tcp I get srps 6000 ms time out. I'm currently using ser2net version 3.5.
Is there a fix for this?

Hemant

@sergeolkhovik
Copy link

Let me put my 2c to this, hope this would be helpful.
I updated containerd on my NUC with Ubuntu 21.04 that serves HA + mosquitto (local env) and z2m (docker) and I got the same message (SRSP - SYS - ping after 6000ms). I have CC2530 + CC2591 (and zStack 3.0) and everything worked fine, the only recent thing was z2m version upgrade (1.21.1 if I remember correctly). I found that after container restart I always get that error. The only and simple fix is to unplug zb device and plug back in a couple seconds, after that z2m container runs without any issue.
So I decided to roll back over major versions and see what will happen. I got down to 1.16.2 - everything is fine. Simply stop and up container several times - no error at all. Next, 1.17.1 - the same and all is fine. 1.18.3 - again, all is really fine. I started getting that error on 1.19.x (tested both .1 and then .0) - after container restart I get error message, have to re-plug my zb device.
For me it looks like there's some change in z2m stopping code that doesn't perform zb disconnect correctly or anything like this, so re-plug does reinitialization of the device and then z2m can communicate with it again. I didn't test reboot procedure.
Also I noticed this messages in 1.19.x output (this is a successful start):

zigbee2mqtt    | Zigbee2MQTT:warn  2021-10-05 18:31:25: `permit_join` set to  `true` in configuration.yaml.
zigbee2mqtt    | Zigbee2MQTT:warn  2021-10-05 18:31:25: Allowing new devices to join.
zigbee2mqtt    | Zigbee2MQTT:warn  2021-10-05 18:31:25: Set `permit_join` to `false` once you joined all devices.
zigbee2mqtt    | Zigbee2MQTT:error 2021-10-05 18:34:51: Failed to set permit join to true

zigbee2mqtt    | Zigbee2MQTT:error 2021-10-05 18:31:37: Request 'zigbee2mqtt/bridge/request/permit_join' failed with error: 'SRSP - UTIL - ledControl after 6000ms'

On unsuccessful start I get:

zigbee2mqtt    | Zigbee2MQTT:error 2021-10-05 18:43:37: Error while starting zigbee-herdsman                                                                       
zigbee2mqtt    | Zigbee2MQTT:error 2021-10-05 18:43:37: Failed to start zigbee   
zigbee2mqtt    | Zigbee2MQTT:error 2021-10-05 18:43:37: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions                                                                                                                                                                  
zigbee2mqtt    | Zigbee2MQTT:error 2021-10-05 18:43:37: Exiting...                                                                                                 
zigbee2mqtt    | Zigbee2MQTT:error 2021-10-05 18:43:37: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)

As all others do.
I'm going to get back to 1.18.3, ready to help with the testing if there's any solution.

@bkarlson
Copy link

bkarlson commented Nov 2, 2021

related #8282

@sergeolkhovik
Copy link

@bkarlson thanks!

@cooljbg
Copy link

cooljbg commented Nov 21, 2021

Possible solution for those using systemd is to reset the usb connection before starting zigbee2mqtt.service
put

ExecStartPre=sh -c "/usr/local/bin/usbreset `lsusb |grep CC1352R1| awk \'{print $6}\'` && sleep 3"

in /etc/systemd/system/zigbee2mqtt.service [Service] section

check lsusb to find out how to identify your coordinator for the grep in ExecStartPre

ex:

[Unit]
Description=zigbee2mqtt
After=network.target

[Service]
ExecStartPre=sh -c "/usr/local/bin/usbreset `lsusb |grep CC1352R1| awk \'{print $6}\'` && sleep 3"
ExecStart=/usr/bin/npm start
WorkingDirectory=/opt/zigbee2mqtt
StandardOutput=inherit
StandardError=inherit
Restart=always
RestartSec=4000ms

[Install]
WantedBy=multi-user.target

you have to compile a small binary
cc usbreset.c -o /usr/local/bin/usbreset && chmod +x /usr/local/bin/usbreset

content of usbreset.c :

/* usbreset -- send a USB port reset to a USB device */

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>

#include <linux/usbdevice_fs.h>


int main(int argc, char **argv)
{
    const char *filename;
    int fd;
    int rc;

    if (argc != 2) {
        fprintf(stderr, "Usage: usbreset device-filename\n");
        return 1;
    }
    filename = argv[1];

    fd = open(filename, O_WRONLY);
    if (fd < 0) {
        perror("Error opening output file");
        return 1;
    }

    printf("Resetting USB device %s\n", filename);
    rc = ioctl(fd, USBDEVFS_RESET, 0);
    if (rc < 0) {
        perror("Error in ioctl");
        return 1;
    }
    printf("Reset successful\n");

    close(fd);
    return 0;
}

@noureddin212
Copy link

I am also having this issue

I am using ZigStar Stick v4 with version 1.22.1 in a docker inside Synology
Can you please advise

Zigbee2MQTT:debug 2021-12-04 20:47:46: Can't load state from file /app/data/state.json (doesn't exist)
Zigbee2MQTT:info 2021-12-04 20:47:46: Logging to console and directory: '/app/data/log/2021-12-04.20-47-44' filename: log.txt
Zigbee2MQTT:info 2021-12-04 20:47:46: Starting Zigbee2MQTT version 1.22.1 (commit #c2b5229)
Zigbee2MQTT:info 2021-12-04 20:47:46: Starting zigbee-herdsman (0.13.176)
Zigbee2MQTT:debug 2021-12-04 20:47:46: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"path":"/dev/ttyUSB-Zigbee"}}'
Zigbee2MQTT:error 2021-12-04 20:48:07: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-12-04 20:48:07: Failed to start zigbee
Zigbee2MQTT:error 2021-12-04 20:48:07: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2021-12-04 20:48:07: Exiting...
Zigbee2MQTT:error 2021-12-04 20:48:07: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29)
at Zigbee.start (/app/lib/zigbee.ts:58:27)
at Controller.start (/app/lib/controller.ts:100:27)
at start (/app/index.js:97:5)

@malcharek
Copy link

I am also having this issue

I am using ZigStar Stick v4 with version 1.22.1 in a docker inside Synology Can you please advise

Zigbee2MQTT:debug 2021-12-04 20:47:46: Can't load state from file /app/data/state.json (doesn't exist) Zigbee2MQTT:info 2021-12-04 20:47:46: Logging to console and directory: '/app/data/log/2021-12-04.20-47-44' filename: log.txt Zigbee2MQTT:info 2021-12-04 20:47:46: Starting Zigbee2MQTT version 1.22.1 (commit #c2b5229) Zigbee2MQTT:info 2021-12-04 20:47:46: Starting zigbee-herdsman (0.13.176) Zigbee2MQTT:debug 2021-12-04 20:47:46: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"path":"/dev/ttyUSB-Zigbee"}}' Zigbee2MQTT:error 2021-12-04 20:48:07: Error while starting zigbee-herdsman Zigbee2MQTT:error 2021-12-04 20:48:07: Failed to start zigbee Zigbee2MQTT:error 2021-12-04 20:48:07: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions Zigbee2MQTT:error 2021-12-04 20:48:07: Exiting... Zigbee2MQTT:error 2021-12-04 20:48:07: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms) at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27) at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29) at Zigbee.start (/app/lib/zigbee.ts:58:27) at Controller.start (/app/lib/controller.ts💯27) at start (/app/index.js:97:5)

I am new to the topic of Zigbee and have just received the ZigStar 4.
Unfortunately I also can't get a connection to my Zigbee2mqtt on my Synology (Docker). Have you managed to fix the problem in the meantime?

@sergeolkhovik
Copy link

As all others do. I'm going to get back to 1.18.3, ready to help with the testing if there's any solution.

#8282 (comment), confirming. I reflashed down to 1.2 (and repaired devices, unfortunately) and have no that timeout problem on 1.23 at all.

@BabaIsYou
Copy link

BabaIsYou commented Apr 6, 2022

Just trying to install zigbee2mqtt on my RPI using docker and after a lot of tries and reading I finaly got to start docker and have the same issue with ConBee II usb adpater with latest firmware.
ConBee II is working fine with deConz and of course I stopped it before lauching docker.

pi@domoticz:~/zigbee2mqtt $ sudo systemctl stop deconz-gui

pi@domoticz:~/zigbee2mqtt $ sudo systemctl stop deconz

pi@domoticz:~/zigbee2mqtt $ docker run --device=/dev/ttyUSB-ConBee2 -p 8081:8081 -v $(pwd)/data:/app/data -v /run/udev:/run/udev:ro -e TZ=America/Montreal --user 1000:1000 --group-add dialout koenkk/zigbee2mqtt 
Using '/app/data' as data directory
Zigbee2MQTT:debug 2022-04-06 15:36:56: Can't load state from file /app/data/state.json (doesn't exist)
Zigbee2MQTT:info  2022-04-06 15:36:56: Logging to console and directory: '/app/data/log/2022-04-06.15-36-53' filename: log.txt
Zigbee2MQTT:info  2022-04-06 15:36:56: Starting Zigbee2MQTT version 1.25.0 (commit #6f1460e)
Zigbee2MQTT:info  2022-04-06 15:36:56: Starting zigbee-herdsman (0.14.20)
Zigbee2MQTT:debug 2022-04-06 15:36:56: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"path":"/dev/ttyUSB-ConBee2"}}'
Zigbee2MQTT:error 2022-04-06 15:37:16: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-04-06 15:37:16: Failed to start zigbee
Zigbee2MQTT:error 2022-04-06 15:37:16: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-04-06 15:37:16: Exiting...
Zigbee2MQTT:error 2022-04-06 15:37:17: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:100:27)
    at start (/app/index.js:101:5)

and of course I have access to device :

test -w /dev/ttyUSB-ConBee2 && echo success || echo failure success
success

@deltabert
Copy link

deltabert commented May 23, 2022

Sorry, I removed my entry. reading the docs over and over again, i found something i need to investigate further...

@paalbra
Copy link

paalbra commented Jun 20, 2022

Had this issue with an Raspberry Pi 3B+ and Electrolama zig-a-zig-ah (zzh). Everything up to date (did flashing on another computer the other day, CC2652R_coordinator_20220219).

Tried a simple reboot of the Pi (with the USB plugged in). It suddenly works after that reboot 🤷‍♂️

@JoshSald
Copy link

Currently also having this issue with 1.27.2-1:

s6-rc: info: service z2m: starting
s6-rc: info: service socat: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service socat successfully started
s6-rc: info: service z2m successfully started
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[12:06:33] INFO: Socat not enabled
[12:06:35] INFO: Handing over control to Zigbee2MQTT Core ...
Zigbee2MQTT:info  2022-09-21 12:06:40: Logging to console and directory: '/config/zigbee2mqtt/log/2022-09-21.12-06-40' filename: log.txt
Zigbee2MQTT:info  2022-09-21 12:06:40: Starting Zigbee2MQTT version 1.27.2 (commit #unknown)
Zigbee2MQTT:info  2022-09-21 12:06:40: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:error 2022-09-21 12:07:23: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-09-21 12:07:23: Failed to start zigbee
Zigbee2MQTT:error 2022-09-21 12:07:23: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-09-21 12:07:23: Exiting...
Zigbee2MQTT:error 2022-09-21 12:07:23: TypeError: Cannot read properties of null (reading 'key')
    at ZnpAdapterManager.determineStrategy (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:152:61)
    at ZnpAdapterManager.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:63:26)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:109:5)
[12:07:25] INFO: Handing over control to Zigbee2MQTT Core ...
Zigbee2MQTT:info  2022-09-21 12:07:31: Logging to console and directory: '/config/zigbee2mqtt/log/2022-09-21.12-07-31' filename: log.txt
Zigbee2MQTT:info  2022-09-21 12:07:31: Starting Zigbee2MQTT version 1.27.2 (commit #unknown)
Zigbee2MQTT:info  2022-09-21 12:07:31: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:error 2022-09-21 12:07:52: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-09-21 12:07:52: Failed to start zigbee
Zigbee2MQTT:error 2022-09-21 12:07:52: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-09-21 12:07:52: Exiting...
Zigbee2MQTT:error 2022-09-21 12:07:52: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:109:5)
[12:07:55] INFO: Handing over control to Zigbee2MQTT Core ...
Zigbee2MQTT:info  2022-09-21 12:08:02: Logging to console and directory: '/config/zigbee2mqtt/log/2022-09-21.12-08-02' filename: log.txt
Zigbee2MQTT:info  2022-09-21 12:08:02: Starting Zigbee2MQTT version 1.27.2 (commit #unknown)
Zigbee2MQTT:info  2022-09-21 12:08:02: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:error 2022-09-21 12:08:23: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-09-21 12:08:23: Failed to start zigbee
Zigbee2MQTT:error 2022-09-21 12:08:23: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-09-21 12:08:23: Exiting...
Zigbee2MQTT:error 2022-09-21 12:08:23: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:109:5)

I've had this with my cc2531 and also with the Sonos Zigbee 3.0 (CC2652P) with no luck. I've also tried using dev_path and by_id with no luck. It just seemed to have stopped overnight 3 days ago out of the blue and won't go back up again. I cannot view the front-end either (502)

@ericvanvoorthuizen
Copy link

Currently also having this issue with 1.27.2-1:

s6-rc: info: service z2m: starting
s6-rc: info: service socat: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service socat successfully started
s6-rc: info: service z2m successfully started
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[12:06:33] INFO: Socat not enabled
[12:06:35] INFO: Handing over control to Zigbee2MQTT Core ...
Zigbee2MQTT:info  2022-09-21 12:06:40: Logging to console and directory: '/config/zigbee2mqtt/log/2022-09-21.12-06-40' filename: log.txt
Zigbee2MQTT:info  2022-09-21 12:06:40: Starting Zigbee2MQTT version 1.27.2 (commit #unknown)
Zigbee2MQTT:info  2022-09-21 12:06:40: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:error 2022-09-21 12:07:23: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-09-21 12:07:23: Failed to start zigbee
Zigbee2MQTT:error 2022-09-21 12:07:23: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-09-21 12:07:23: Exiting...
Zigbee2MQTT:error 2022-09-21 12:07:23: TypeError: Cannot read properties of null (reading 'key')
    at ZnpAdapterManager.determineStrategy (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:152:61)
    at ZnpAdapterManager.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:63:26)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:109:5)
[12:07:25] INFO: Handing over control to Zigbee2MQTT Core ...
Zigbee2MQTT:info  2022-09-21 12:07:31: Logging to console and directory: '/config/zigbee2mqtt/log/2022-09-21.12-07-31' filename: log.txt
Zigbee2MQTT:info  2022-09-21 12:07:31: Starting Zigbee2MQTT version 1.27.2 (commit #unknown)
Zigbee2MQTT:info  2022-09-21 12:07:31: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:error 2022-09-21 12:07:52: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-09-21 12:07:52: Failed to start zigbee
Zigbee2MQTT:error 2022-09-21 12:07:52: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-09-21 12:07:52: Exiting...
Zigbee2MQTT:error 2022-09-21 12:07:52: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:109:5)
[12:07:55] INFO: Handing over control to Zigbee2MQTT Core ...
Zigbee2MQTT:info  2022-09-21 12:08:02: Logging to console and directory: '/config/zigbee2mqtt/log/2022-09-21.12-08-02' filename: log.txt
Zigbee2MQTT:info  2022-09-21 12:08:02: Starting Zigbee2MQTT version 1.27.2 (commit #unknown)
Zigbee2MQTT:info  2022-09-21 12:08:02: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:error 2022-09-21 12:08:23: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-09-21 12:08:23: Failed to start zigbee
Zigbee2MQTT:error 2022-09-21 12:08:23: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-09-21 12:08:23: Exiting...
Zigbee2MQTT:error 2022-09-21 12:08:23: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:109:5)

I've had this with my cc2531 and also with the Sonos Zigbee 3.0 (CC2652P) with no luck. I've also tried using dev_path and by_id with no luck. It just seemed to have stopped overnight 3 days ago out of the blue and won't go back up again. I cannot view the front-end either (502)

Had this same issue today after I first, 4 days ago, had upgraded first to Zigbee2MQTT 1.27.01. Did some Hass restarts without any problem these last days. And today I started to upgraded to Hass Core to 2022.7.7.
After upgrading Hass core i saw Zigbee2MQTT devices where unavailable and tried to restore full backup before these upgrades and still no luck.
Then i saw that CC2652P was now detected as TTYUSB1 instead of TTYUSB0, so I changed that in Zigbee2MQTT config, still no luck.
Then saw in config\zigbee2mqtt folder the configuration.yaml also still had TTYUSB0, so changed that also to TTYUSB1 and restarted the Zigbee2MQTT add-on and everything is working again.

@pzystorm
Copy link

pzystorm commented Oct 23, 2022

Possible solution for those using systemd is to reset the usb connection before starting zigbee2mqtt.service put

Had the same issue and tried out your script @cooljbg

First issue:

# lsusb | grep Texas
Bus 001 Device 083: ID 0451:16a8 Texas Instruments, Inc.

The lsusb output is somehow different... and /usr/local/bin/usbreset 0451:16a8 is probably not the correct command.

With this snippet from another guy I got the device name:

    idV=0451
    idP=16a8
    for path in `find /sys/ -name idVendor | rev | cut -d/ -f 2- | rev`; do
        if grep -q $idV $path/idVendor; then
            if grep -q $idP $path/idProduct; then
                find $path -name 'device' | rev | cut -d / -f 2 | rev
            fi
        fi
    done

The output was ttyACM0 and then I could call your script:

# /usr/local/bin/usbreset /dev/ttyACM0
Resetting USB device /dev/ttyACM0
Error in ioctl: Inappropriate ioctl for device

Ah, this is working:

# /usr/local/bin/usbreset /dev/bus/usb/001/083
Resetting USB device /dev/bus/usb/001/083
Reset successful

But afterwards the error "Error: SRSP - SYS" appears again, when stariting the zigbee2mqtt. Any ideas?

@zdimon33
Copy link

zdimon33 commented Jan 6, 2023

Не могу найти решение
[15:05:18] INFO: Preparing to start...
[15:05:18] INFO: Socat not enabled
[15:05:19] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info 2023-01-06 15:05:21: Logging to console and directory: '/config/zigbee2mqtt/log/2023-01-06.15-05-20' filename: log.txt
Zigbee2MQTT:info 2023-01-06 15:05:21: Starting Zigbee2MQTT version 1.29.1 (commit #unknown)
Zigbee2MQTT:info 2023-01-06 15:05:21: Starting zigbee-herdsman (0.14.83)
Zigbee2MQTT:error 2023-01-06 15:05:41: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-01-06 15:05:41: Failed to start zigbee
Zigbee2MQTT:error 2023-01-06 15:05:41: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-01-06 15:05:41: Exiting...
Zigbee2MQTT:error 2023-01-06 15:05:41: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
at Zigbee.start (/app/lib/zigbee.ts:58:27)
at Controller.start (/app/lib/controller.ts:101:27)
at start (/app/index.js:107:5)

@zdimon33
Copy link

zdimon33 commented Jan 6, 2023

2023-01-05_20-02-52

@zdimon33
Copy link

zdimon33 commented Jan 6, 2023

Перепрошивка не помогла
"name": "Texas Instruments CC1352/CC2652, Z-Stack 3.30+ (build 20221102)",

@zdimon33
Copy link

zdimon33 commented Jan 6, 2023

ПРошу помощи

@Koenkk
Copy link
Owner

Koenkk commented Jan 7, 2023

@zdimon33 you should disable ZHA, this interferes with z2m.

@zdimon33
Copy link

zdimon33 commented Jan 7, 2023

Да, перечитав кучу информации, я пришел к вероятности такой проблемы. НО, у меня не подключена интеграция ZHA, только стик.... ОН привязан к ZHA и как в нем отключить эту привязку
не понимаю...

@zdimon33
Copy link

zdimon33 commented Jan 7, 2023

2023-01-07_16-56-38

@zdimon33
Copy link

zdimon33 commented Jan 8, 2023

Для информации. Я снес HA и установил заново. Пока "полет" нормальный. Во всех уроках продвинутых пользователей требуется нажать кнопку "настроить" на вкладке "Sonoff ... Zigbee ...". (Указана стрелкой на фото выше). Для настройки стика. Возможно, учитывая Ваше мнение, при данной настройке мы настраиваем ZHA и получаем две интеграции: ZHA и MQTT? Вообщем я эту интеграцию удалил, но теперь нет информации о стике. Вновь добавить эту вкладку в интеграции не получается, пишет не может подключиться к стику.... Какие то "костыли" получились...

@aalbul
Copy link

aalbul commented Jan 8, 2023 via email

@dl3hm
Copy link

dl3hm commented Feb 6, 2023

I was able to solve the issue.

The problem has arised while following the tutorial
https://garv.in/serendipity/archives/1458-Temperatur-Sensor-Smart-Home-Setup-Zigbee2MQTT,-Mosquitto,-Telegraf,-InfluxDB,-Grafana,-Home-Aasistant,-ConBee.html

There it was suggested to use "privileged: true" in the docker-compose.yml of zigbee2mqtt. By removing this clause the error "Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)" was solved.

I use the docker image 1.30.0 on Debian Bullseye.

@fliphess
Copy link

If you end up on this thread and you did just upgrade your coordinator firmware: Make sure you used the correct firmware: I used the router firmware, which gave the exact same error ;)

@damageco
Copy link

damageco commented Oct 21, 2023

I've solved this issue with zigbee2mqtt/hassio-zigbee2mqtt#430 (comment)
If like me you have this error message on a ZBDongle-E ( SkyConnect seems to use the same adapter)

serial:
  port: /dev/THEPORT # <- change this accordingly
  adapter: ezsp

@nltran
Copy link

nltran commented Nov 27, 2023

I've solved this issue with zigbee2mqtt/hassio-zigbee2mqtt#430 (comment) If like me you have this error message on a ZBDongle-E ( SkyConnect seems to use the same adapter)

serial:
  port: /dev/THEPORT # <- change this accordingly
  adapter: ezsp

Awesome, none of the suggestions above worked until this one!

@ant-hony-ak
Copy link

for me this worked.
i used for testing purposes a RaspBee Preium Hub from Phoscon deconz

port: /dev/ttyAMA0
adapter: deconz

this has to be edited in the Zigbee2MQTT AddOn configuraton in the area "serail"
Same thing for other ZigBee Hubs/Sticks i think.

Espezially for the RaspBee dont forget to edit the config.txt file with the following:

enable_uart=1
dtoverlay=pi3-miniuart-bt

--> it's written in the Dokumentation of Deconz Add on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues
Projects
None yet
Development

No branches or pull requests