Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge πŸŒ‰, get rid of your proprietary Zigbee bridges πŸ”¨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.75k stars 1.64k forks source link

Unresolved Error: SRSP - SYS - ping after 6000ms with Sonoff Zigbee 3.0 Dongle #11311

Closed afaucogney closed 2 years ago

afaucogney commented 2 years ago

What happened?

I'm in a phase of migrating my adaptor from CC2530 to Sonoff Dongle. I succeed to flash thank to ZigStarZW, I also write the CC2530 IEEE into the Sonoff stick

➜  /  ls -l /dev/serial/by-id
total 0
lrwxrwxrwx    1 root     root            13 Oct 12 17:24 usb-0658_0200-if00 -> ../../ttyACM0lrwxrwxrwx    1 root     root            13 Oct 12 17:24 usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d0f394ad7829ec11ad666d7840c9ce8d-if00-port0 -> ../../ttyUSB0

The plungin doesn't start

### What did you expect to happen?

To start

### How to reproduce it (minimal and precise)

_No response_

### Zigbee2MQTT version

1.23.0-1

### Adapter firmware version

CC1352P2_CC2652P_launchpad_router_20210128.hex

### Adapter

ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_

### Debug log

debug 2022-02-08 22:06:38: Loaded state from file /share/zigbee2mqtt/state.json info 2022-02-08 22:06:38: Logging to console and directory: '/share/zigbee2mqtt/log/2022-02-08.22-06-33' filename: log.txt debug 2022-02-08 22:06:38: Removing old log directory '/share/zigbee2mqtt/log/2022-02-08.22-00-55' info 2022-02-08 22:06:38: Starting Zigbee2MQTT version 1.23.0 (commit #unknown) info 2022-02-08 22:06:38: Starting zigbee-herdsman (0.14.10) debug 2022-02-08 22:06:38: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/share/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/share/zigbee2mqtt/database.db.backup","databasePath":"/share/zigbee2mqtt/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"path":"/dev/ttyUSB0"}}' error 2022-02-08 22:06:58: Error while starting zigbee-herdsman error 2022-02-08 22:06:58: Failed to start zigbee error 2022-02-08 22:06:58: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions error 2022-02-08 22:06:58: Exiting... error 2022-02-08 22:06:59: 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)

afaucogney commented 2 years ago

Here is my config:


data_path: /share/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: ***:1883
  user: ****
  password: ***
serial:
  port: /dev/ttyUSB0
advanced:
  log_level: debug
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
  availability_blacklist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: false
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
  options: '-d -d'
  log: false
  restartdelay: 1
  initialdelay: 1
ban: []
whitelist: []
sorentorp commented 2 years ago

I have the same problem... made some comments here: https://github.com/Koenkk/zigbee2mqtt/issues/2308#issuecomment-1034270906

Minims commented 2 years ago

Same issue since 2 days. I have a CC2531. Tested with Home 1.2 and source routing firmware, same issue. I have not change anything in my network. Both Stable and Edge version have the issue. Can it it be a raspbian upgrade issue on USB management ? I have a PI4

orxaz commented 2 years ago

Another one here, from yesterday I am going crazy with this, tried several cables, direct USB connection to my Proxmox KVM VM in a MSI Cubi i3, without extension cable, 2 different sticks, upgraded z2m, upgraded stick firmware... no luck

orxaz commented 2 years ago

My case was for a failing stick, don't know why the first time I tested with the other one it has failed too, but now is working well with the second one.

joohann commented 2 years ago

Same issue since 2 days. I have a CC2531. Tested with Home 1.2 and source routing firmware, same issue. I have not change anything in my network. Both Stable and Edge version have the issue. Can it it be a raspbian upgrade issue on USB management ? I have a PI4

Same here just out of the blue.

matteopiccioni commented 2 years ago

Same issue since 4-6 days. Some days ago I add a usb-hub connected to raspy, maybe is related?

My CC2531 is still connected to raspy (no hub)

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

tlse-vins commented 2 years ago

I have the same issue since 10 days (CC2652R ZZH) Several users of Gladys assistant also have the problem.

FrandsAndersen commented 2 years ago

I have had the same problem for a month.

I have tried:

Nothing works!

My config:

data_path: /config/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.1.109:1883
  user: ****
  password: ****
serial:
  port: /dev/ttyUSB0
advanced:
  log_level: warn
  pan_id: 6760
  channel: 25
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8080
experimental:
  new_api: true
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: '-d -d'
  log: false
MihailRizov commented 2 years ago

I am also having the same issue. I brought new Sonoff stick, flashed it with "CC1352P2_CC2652P_launchpad_router_20220125" firmware. My version of zigbee2mqtt is 1.25.0

FrandsAndersen commented 2 years ago

I am also having the same issue. I brought new Sonoff stick, flashed it with "CC1352P2_CC2652P_launchpad_router_20220125" firmware. My version of zigbee2mqtt is 1.25.0

Exactly the same version og zigbee2mqtt that I use, and also the same firmware.

renatoccosta commented 2 years ago

I have the same problem. zigbee2mqtt is 1.25.0-1. Router firmware CC1352P2_CC2652P_launchpad_coordinator_20220219

renatoccosta commented 2 years ago

Just rebooted everything and it seems to be working fine (for now)

dewet22 commented 2 years ago

I've seen an uptick in this happening as well, for at least the past few months. It'll go days, sometimes a week or two, without incident, but mostly I need to restart z2m every day or two when it gets stuck with endless SRSP errors. Usually (9 out of 10 times, roughly) just restarting the docker container works, but rarely it doesn't seem to recover until restarting the USB device (either rebooting or pulling & replugging). This happens with two different CC2652P-based sticks: zzh on zStack3x0-20220219 and Sonoff on factory-default 20210708.

Is there any way to just have z2m treat SRSP errors as fatal so we can auto-restart the service as necessary?

radinsky commented 2 years ago

recently I see the same (i suspect the supervisor upgrade to 2022.5 - not sure), z2m edge and sonoff stick, latest ha

dewet22 commented 2 years ago

i suspect the supervisor upgrade to 2022.5

FYI I'm not using the supervisor, I run everything (HA, z2m, etc.) in containers.

noderat commented 2 years ago

I've been bitten by this now as well, my network and all devices work fine for about 5-10 minutes and then everything fails. I'm running on amd64 with home assistant is install. I've tried different USB ports, and I've tried all 6 of my Sonoff dongles as well as my backup CC2652P Circuitsetup.us dongle all running the same latest firmware available and all tested using default gain setting of 5 dBm

Each device was reflashed to a blank state prior to test, host PC running home assistant OS (latest release 2022.4 and 2022.5 releases) freshly rebooted and zigbee2mqtt was allowed to restore the network to the adapter on startup.

I have disabled usb powersave through cmdline.txt on my boot partition and confirmed it has a value of -1

eladiogalvez commented 2 years ago

Here same issue in a OrangePi and CC2652R (VS201 - Blue led):

Some tests:

Finally I tried to install all needed software to boot only zigbee2mqtt (dev branch some hours from last commit) in a windows, connected dongle to the windows pc, copied all needed db/configurations files from OrangePi updating port device to com and Mqtt server, and the result:

eladiogalvez commented 2 years ago

I upgraded orangepi where is working hasssio-supervisor from Debian 10 (Buster) to Debian 11 (Bullseye) and component "Zigbee2mqtt Edge" is working again correctly with last firmware "CC2652R_coordinator_20220219".

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

lazarvgd commented 2 years ago

I have exact same problem with Sonoff zigbee adapter. Is there a fix for this?

klemic commented 1 year ago

after new installation of my IOBROKER and pivCCU on bullseye lite I also have these error messages, spent hours but no idea how to solve `

zigbee.0 | 2022-09-13 10:53:35.280 | error | Error herdsman start -- | -- | -- | -- zigbee.0 | 2022-09-13 10:53:35.279 | error | Failed to start Zigbee zigbee.0 | 2022-09-13 10:53:35.277 | error | Starting zigbee-herdsman problem : "Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'" zigbee.0 | 2022-09-13 10:53:34.938 | info | Installed Version: ioBroker/ioBroker.zigbee#1fff5415828c773bb5d1dd3f54bbffd39b0483c8 zigbee.0 | 2022-09-13 10:53:34.909 | info | Starting Zigbee npm ... zigbee.0 | 2022-09-13 10:53:34.908 | info | Try to reconnect. 1 attempts left zigbee.0 | 2022-09-13 10:53:24.904 | error | Error herdsman start zigbee.0 | 2022-09-13 10:53:24.903 | error | Failed to start Zigbee zigbee.0 | 2022-09-13 10:53:24.902 | error | Starting zigbee-herdsman problem : "Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)"

`

artem-zinnatullin commented 1 year ago

Getting same issue with zigbee2mqtt 1.30.2 running in k8s on OrangePi 5 and providing access to Sonoff USB Zigbee stick via https://github.com/squat/generic-device-plugin

Creating configuration file...
Zigbee2MQTT:info  2023-03-25 04:05:42: Logging to console and directory: '/app/data/log/2023-03-25.04-05-42' filename: log.txt
Zigbee2MQTT:info  2023-03-25 04:05:42: Starting Zigbee2MQTT version 1.30.2 (commit #cdf62ea)
Zigbee2MQTT:info  2023-03-25 04:05:42: Starting zigbee-herdsman (0.14.96)
Zigbee2MQTT:error 2023-03-25 04:06:03: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-03-25 04:06:03: Failed to start zigbee
Zigbee2MQTT:error 2023-03-25 04:06:03: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-03-25 04:06:03: Exiting...
Zigbee2MQTT:error 2023-03-25 04:06:03: 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)

However right before switching to Zigbee2Mqtt I was able to set up ZHA with Homeassistant running on same hardware in k8s (privileged mode) and it was running totally fine, so it seems to be an issue of Zigbee2Mqtt so far judging by other comments here..

I'll be trying to run it in privileged mode in k8s, will report back if it works.


Upd: adding privileged mode to zigbee2mqtt container and restarting OrangePi 5 still ends up crashing with Error: SRSP - SYS - ping after 6000ms :(

artem-zinnatullin commented 1 year ago

Got it working! Had to specify adapter in configuration.yaml for my Sonoff Zigbee adapter:

serial:
      port: /dev/ttyACM0
      adapter: ezsp

Works in k8s in both privileged mode and through https://github.com/squat/generic-device-plugin!

bastienjalbert commented 9 months ago

Got it working! Had to specify adapter in configuration.yaml for my Sonoff Zigbee adapter:

serial:
      port: /dev/ttyACM0
      adapter: ezsp

Works in k8s in both privileged mode and through https://github.com/squat/generic-device-plugin!

Real fix here !

Redforce04 commented 4 weeks ago

For people finding this in 2024 - adapter ezsp has been deprecated and you should now use ember.