### What happened?
With v1.35.0/1.35.1, I've been receiving the `sendZclFrameTo…EndpointInternal error`. Unlike similar issue reports, mine was not occurring due to my config pointing at the wrong device.
However, based on the information in those posts, I set Z2M to collect the Zigbee-Herdsman debug logs. The first two files are the complete logs. The third file is a truncated log with the logs up until the devices are identified and the logs beginning right before the error occurred. Error messages begin on line 82227 in the second file.
[log.part1.txt](https://github.com/Koenkk/zigbee2mqtt/files/13976960/log1.txt)
[log.part2.txt](https://github.com/Koenkk/zigbee2mqtt/files/13976962/log2.txt)
[truncated_log.txt](https://github.com/Koenkk/zigbee2mqtt/files/13977160/truncated_log.txt)
When this error occurs, Z2M will not work until I restart the service. The error showed up in my Z2M logs as below and would show for all my router devices:
```
warn 2024-01-17 19:40:08: Failed to ping 'Chaise Light' (attempt 1/2, Read 0x001788010311daf4/11 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disable
Recovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (sendZclFrameToEndpointInternal error))
warn 2024-01-17 19:40:11: Failed to ping 'Chaise Light' (attempt 2/2, Read 0x001788010311daf4/11 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (sendZclFrameToEndpointInternal error))
info 2024-01-17 19:40:14: MQTT publish: topic 'zigbee2mqtt2/Chaise Light/availability', payload '{"state":"offline"}'
```
When zigbee-herdsman debug logging is enabled, I was able to receive more information:
```
2024-01-18T00:37:44.119Z zigbee-herdsman:adapter:ezsp:ezsp Time to watchdog ... 0
2024-01-18T00:37:44.119Z zigbee-herdsman:adapter:ezsp:ezsp ==> nop: null
2024-01-18T00:37:44.119Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"_cls_":"nop","_id_":5,"_isRequest_":true}
2024-01-18T00:37:44.119Z zigbee-herdsman:adapter:ezsp:uart --> DATA (1,7,0): f900010500
2024-01-18T00:37:44.119Z zigbee-herdsman:adapter:ezsp:uart --> [17bb21a9512ac4457e]
2024-01-18T00:37:44.119Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (2)
2024-01-18T00:37:46.121Z zigbee-herdsman:adapter:ezsp:uart --> Error: Error: {"sequence":2} after 2000ms
2024-01-18T00:37:46.121Z zigbee-herdsman:adapter:ezsp:uart -!- break waiting (2)
2024-01-18T00:37:46.121Z zigbee-herdsman:adapter:ezsp:uart Can't send DATA frame (1,7,0): f900010500
2024-01-18T00:37:46.621Z zigbee-herdsman:adapter:ezsp:uart ->> DATA (1,7,1): f900010500
2024-01-18T00:37:46.621Z zigbee-herdsman:adapter:ezsp:uart --> [1fbb21a9512ac9077e]
2024-01-18T00:37:46.621Z zigbee-herdsman:adapter:ezsp:uart -?- rewaiting (2)
2024-01-18T00:37:48.623Z zigbee-herdsman:adapter:ezsp:uart --> Error: Error: {"sequence":2} after 2000ms
2024-01-18T00:37:48.623Z zigbee-herdsman:adapter:ezsp:uart -!- break rewaiting (2)
2024-01-18T00:37:48.623Z zigbee-herdsman:adapter:ezsp:uart Can't resend DATA frame (1,7,1): f900010500
2024-01-18T00:37:48.623Z zigbee-herdsman:adapter:ezsp:driv Reset connection. Try 0
2024-01-18T00:37:48.623Z zigbee-herdsman:adapter:ezsp:driv Stop driver
2024-01-18T00:37:48.624Z zigbee-herdsman:adapter:ezsp:ezsp Stop ezsp
2024-01-18T00:37:48.659Z zigbee-herdsman:adapter:ezsp:erro Watchdog heartbeat timeout Error: Failure send nop:{"type":"Buffer","data":[249,0,1,5,0]}
at /app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:562:23
at Queue.executeNext (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:32:32)
2024-01-18T00:37:48.664Z zigbee-herdsman:adapter:ezsp:uart Port closed
2024-01-18T00:37:48.664Z zigbee-herdsman:adapter:ezsp:ezsp Close ezsp
2024-01-18T00:37:48.664Z zigbee-herdsman:adapter:ezsp:driv Close driver
2024-01-18T00:37:48.664Z zigbee-herdsman:adapter:ezsp:ezsp Close ezsp
2024-01-18T00:37:48.664Z zigbee-herdsman:adapter:ezsp:driv Close driver
2024-01-18T00:37:49.666Z zigbee-herdsman:adapter:ezsp:uart Opening SerialPort with {"path":"/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0","baudRate":115200,"rtscts":true,"autoOpen":false}
2024-01-18T00:37:49.688Z zigbee-herdsman:adapter:ezsp:erro Connection attempt 1 error: Error: Error while opening serialport 'Error: Error: I/O error, cannot open /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0'
at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:94:28)
at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:82:22)
at /app/node_modules/@serialport/stream/dist/index.js:118:18
2024-01-18T00:37:54.688Z zigbee-herdsman:adapter:ezsp:ezsp Next attempt 2
2024-01-18T00:37:54.689Z zigbee-herdsman:adapter:ezsp:uart Opening SerialPort with {"path":"/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0","baudRate":115200,"rtscts":true,"autoOpen":false}
2024-01-18T00:37:54.689Z zigbee-herdsman:adapter:ezsp:erro Connection attempt 2 error: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0'
at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:94:28)
at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:82:22)
at /app/node_modules/@serialport/stream/dist/index.js:118:18
2024-01-18T00:37:59.692Z zigbee-herdsman:adapter:ezsp:ezsp Next attempt 3
2024-01-18T00:37:59.692Z zigbee-herdsman:adapter:ezsp:uart Opening SerialPort with {"path":"/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0","baudRate":115200,"rtscts":true,"autoOpen":false}
2024-01-18T00:37:59.693Z zigbee-herdsman:adapter:ezsp:erro Connection attempt 3 error: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0'
at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:94:28)
at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:82:22)
at /app/node_modules/@serialport/stream/dist/index.js:118:18
2024-01-18T00:38:04.693Z zigbee-herdsman:adapter:ezsp:ezsp Next attempt 4
2024-01-18T00:38:04.693Z zigbee-herdsman:adapter:ezsp:uart Opening SerialPort with {"path":"/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0","baudRate":115200,"rtscts":true,"autoOpen":false}
2024-01-18T00:38:04.694Z zigbee-herdsman:adapter:ezsp:erro Connection attempt 4 error: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0'
at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/uart.ts:94:28)
at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:82:22)
at /app/node_modules/@serialport/stream/dist/index.js:118:18
2024-01-18T00:38:09.695Z zigbee-herdsman:adapter:ezsp:ezsp Next attempt 5
2024-01-18T00:38:09.709Z zigbee-herdsman:adapter:ezsp:erro Reset error Error: Failure to connect
at Ezsp.connect (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:277:19)
at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:139:9)
at Driver.onReset (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:111:17)
2024-01-18T00:38:09.709Z zigbee-herdsman:adapter:ezsp:driv Pause 10sec before try 1
2024-01-18T00:38:19.715Z zigbee-herdsman:adapter:ezsp:driv Reset connection. Try 1
2024-01-18T00:38:19.715Z zigbee-herdsman:adapter:ezsp:driv Stop driver
2024-01-18T00:38:19.715Z zigbee-herdsman:adapter:ezsp:ezsp Stop ezsp
2024-01-18T00:38:19.715Z zigbee-herdsman:adapter:ezsp:ezsp Close ezsp
2024-01-18T00:38:19.715Z zigbee-herdsman:adapter:ezsp:driv Close driver
```
To get more information, I pulled the kernel logs. The attached log is filtered on the relevant lines. The logs below are filtered on lines which are more unique.
```
Jan 17 19:37:43 server kernel: [887812.694496] usb 1-3.3: clear tt 1 (9052) error -71
Jan 17 19:37:43 server kernel: [887812.694744] usb 1-3.3: clear tt 1 (9042) error -71
...
Jan 17 19:37:44 server kernel: [887812.977357] cp210x ttyUSB0: usb_serial_generic_write_bulk_callback - nonzero urb status: -71
Jan 17 19:37:44 server kernel: [887812.979796] usb 1-3.3: clear tt 1 (9042) error -71
Jan 17 19:37:44 server kernel: [887812.979945] usb 1-3.3: clear tt 1 (1042) error -71
...
Jan 17 19:37:48 server kernel: [887817.519120] cp210x ttyUSB0: failed to get comm status: -71
Jan 17 19:37:48 server kernel: [887817.519375] usb 1-3.3: clear tt 1 (9042) error -71
Jan 17 19:37:48 server kernel: [887817.519622] usb 1-3.3: clear tt 1 (8040) error -71
Jan 17 19:37:48 server kernel: [887817.519795] usb 1-3.3: clear tt 1 (9042) error -71
Jan 17 19:37:48 server kernel: [887817.519799] cp210x ttyUSB0: failed get req 0x14 size 16 status: -71
Jan 17 19:37:48 server kernel: [887817.519915] usb 1-3.3: clear tt 1 (8040) error -71
Jan 17 19:37:48 server kernel: [887817.520127] usb 1-3.3: clear tt 1 (9042) error -71
Jan 17 19:37:48 server kernel: [887817.520168] cp210x ttyUSB0: failed set request 0x12 status: -71
Jan 17 19:37:48 server kernel: [887817.520373] usb 1-3.3: clear tt 1 (0040) error -71
Jan 17 19:37:48 server kernel: [887817.520879] cp210x ttyUSB0: failed set request 0x0 status: -71
...
Jan 17 19:37:49 server kernel: [887818.525847] cp210x ttyUSB0: failed set request 0x0 status: -71
Jan 17 19:37:49 server kernel: [887818.525854] cp210x ttyUSB0: cp210x_open - Unable to enable UART
Jan 17 19:37:54 server kernel: [887823.208486] usb 1-3.3.1: USB disconnect, device number 38
Jan 17 19:37:54 server kernel: [887823.208724] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
Jan 17 19:37:54 server kernel: [887823.209063] cp210x 1-3.3.1:1.0: device disconnected
Jan 17 19:37:54 server kernel: [887823.336401] usb 1-3.3: reset high-speed USB device number 37 using xhci_hcd
Jan 17 19:37:54 server kernel: [887823.416697] usb 1-3.3: device descriptor read/64, error -71
Jan 17 19:37:54 server kernel: [887823.612694] usb 1-3.3: device descriptor read/64, error -71
Jan 17 19:37:54 server kernel: [887823.804694] usb 1-3.3: reset high-speed USB device number 37 using xhci_hcd
Jan 17 19:37:55 server kernel: [887823.884692] usb 1-3.3: device descriptor read/64, error -71
Jan 17 19:37:55 server kernel: [887824.084698] usb 1-3.3: device descriptor read/64, error -71
Jan 17 19:37:55 server kernel: [887824.280686] usb 1-3.3: reset high-speed USB device number 37 using xhci_hcd
Jan 17 19:37:55 server kernel: [887824.280718] usb 1-3.3: Device not responding to setup address.
Jan 17 19:37:55 server kernel: [887824.488702] usb 1-3.3: Device not responding to setup address.
Jan 17 19:37:55 server kernel: [887824.700660] usb 1-3.3: device not accepting address 37, error -71
Jan 17 19:37:55 server kernel: [887824.780670] usb 1-3.3: reset high-speed USB device number 37 using xhci_hcd
Jan 17 19:37:55 server kernel: [887824.780714] usb 1-3.3: Device not responding to setup address.
Jan 17 19:37:56 server kernel: [887824.988696] usb 1-3.3: Device not responding to setup address.
Jan 17 19:37:56 server kernel: [887825.196646] usb 1-3.3: device not accepting address 37, error -71
Jan 17 19:37:56 server kernel: [887825.198594] usb 1-3.3: USB disconnect, device number 37
Jan 17 19:37:56 server kernel: [887825.384654] usb 1-3.3: new high-speed USB device number 40 using xhci_hcd
Jan 17 19:37:56 server kernel: [887825.486339] usb 1-3.3: New USB device found, idVendor=214b, idProduct=7250, bcdDevice= 1.00
Jan 17 19:37:56 server kernel: [887825.486344] usb 1-3.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Jan 17 19:37:56 server kernel: [887825.486347] usb 1-3.3: Product: USB2.0 HUB
Jan 17 19:37:56 server kernel: [887825.544551] hub 1-3.3:1.0: USB hub found
Jan 17 19:37:56 server kernel: [887825.544714] hub 1-3.3:1.0: 4 ports detected
Jan 17 19:37:56 server kernel: [887825.836641] usb 1-3.3.1: new full-speed USB device number 41 using xhci_hcd
Jan 17 19:37:57 server kernel: [887825.959215] usb 1-3.3.1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
Jan 17 19:37:57 server kernel: [887825.959220] usb 1-3.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 17 19:37:57 server kernel: [887825.959222] usb 1-3.3.1: Product: SkyConnect v1.0
Jan 17 19:37:57 server kernel: [887825.959224] usb 1-3.3.1: Manufacturer: Nabu Casa
Jan 17 19:37:57 server kernel: [887825.959225] usb 1-3.3.1: SerialNumber: d4b930fb36d5ec118a8e1fb1a1ca919a
Jan 17 19:37:57 server kernel: [887825.961323] cp210x 1-3.3.1:1.0: cp210x converter detected
Jan 17 19:37:57 server kernel: [887825.971608] usb 1-3.3.1: cp210x converter now attached to ttyUSB0
```
This is not an issue that occurs on v1.34.0 or earlier. Please let me know if you need any more information.
---
Additional info:
Configuration:
```
permit_join: false
availability: true
serial:
adapter: ezsp
port: >-
/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0
baudrate: 115200
rtscts: true
mqtt:
base_topic: zigbee2mqtt2
server: mqtt://XXX.XXX.XXX.XXX
user: zigbee2mqtt2
password: XXXXXXXXXXXXXX
keepalive: 60
reject_unauthorized: false
version: 4
include_device_information: true
advanced:
pan_id: XXXX
ikea_ota_use_test_url: true
channel: 25
network_key:
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
- XXX
log_syslog:
app_name: Zigbee2MQTT
eol: /n
host: localhost
localhost: localhost
path: /dev/log
pid: process.pid
port: 123
protocol: tcp4
type: '5424'
legacy_availability_payload: false
last_seen: ISO_8601
homeassistant_legacy_entity_attributes: false
legacy_api: false
log_level: info
frontend:
port: 4980
homeassistant:
status_topic: homeassistant/status
legacy_entity_attributes: true
device_options:
legacy: false
devices:
...
groups:
...
ota:
ikea_ota_use_test_url: false
```
Docker-Compose:
```
services:
zigbee2mqtt:
container_name: zigbee2mqtt
# image: koenkk/zigbee2mqtt:1.34.0
image: koenkk/zigbee2mqtt
volumes:
- /run/udev:/run/udev:ro
- ${SMART_DIR_LOCAL}/zigbee2mqtt2/data:/app/data
- /dev/serial/by-id:/dev/serial/by-id
devices:
- /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0:/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d4b930fb36d5ec118a8e1fb1a1ca919a-if00-port0
ports:
- 27080:4980
privileged: true
restart: always
depends_on:
mqtt:
condition: service_started
restart: false
homeassistant:
condition: service_started
restart: true
environment:
TZ: ${TZ}
PUID: ${PUID}
PGID: ${PGID}
LOG4J_FORMAT_MSG_NO_LOOKUPS: "true"
DEBUG: zigbee-herdsman*
```
### What did you expect to happen?
The Zigbee adapter should not crash.
### How to reproduce it (minimal and precise)
Use SkyConnect (and possibly other EZSP adapters?). Run v1.35.0 or v1.35.1 and wait. It can take between a few minutes and 24 hours to crash.
### Zigbee2MQTT version
1.35.0
### Adapter firmware version
7.3.2.0 build 212, Gecko SDK v4.3.2.0
### Adapter
SkyConnect
### Setup
Z2M Docker
### Debug log
See above