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

z2m: TypeError: Cannot read properties of null (reading 'key') #26223

Open
mzagula78 opened this issue Feb 7, 2025 · 1 comment
Open

z2m: TypeError: Cannot read properties of null (reading 'key') #26223

mzagula78 opened this issue Feb 7, 2025 · 1 comment
Labels
problem Something isn't working

Comments

@mzagula78
Copy link

What happened?

[2025-02-07 00:04:25] info: z2m: Logging to console, file (filename: log.log)
[2025-02-07 00:04:25] info: z2m: Starting Zigbee2MQTT version 2.1.1 (commit #unknown)
[2025-02-07 00:04:25] info: z2m: Starting zigbee-herdsman (3.2.5)
[2025-02-07 00:04:25] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-02-07 00:04:25] info: zh:zstack:znp: Serialport opened
[2025-02-07 00:04:25] error: z2m: Error while starting zigbee-herdsman
[2025-02-07 00:04:25] error: z2m: Failed to start zigbee-herdsman
[2025-02-07 00:04:25] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-02-07 00:04:25] error: z2m: Exiting...
[2025-02-07 00:04:25] error: z2m: TypeError: Cannot read properties of null (reading 'key')
at ZnpAdapterManager.determineStrategy (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:154:64)
at ZnpAdapterManager.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:62:26)
at ZStackAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:158:16)
at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)
at Zigbee.start (/app/lib/zigbee.ts:69:27)
at Controller.start (/app/lib/controller.ts:142:13)
at start (/app/index.js:161:5)

What did you expect to happen?

to work properly liek it did before few upgrades

How to reproduce it (minimal and precise)

just start the add-on and it won't start

Zigbee2MQTT version

2.1.1 and earlier

Adapter firmware version

not sure where to find it

Adapter

Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001

Setup

Add-on on HA

Debug log

debug shows nothgin useful to point to any direction where "reading key" is comign from?

[2025-02-07 00:04:25] info: z2m: Logging to console, file (filename: log.log)
[2025-02-07 00:04:25] info: z2m: Starting Zigbee2MQTT version 2.1.1 (commit #unknown)
[2025-02-07 00:04:25] info: z2m: Starting zigbee-herdsman (3.2.5)
[2025-02-07 00:04:25] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-02-07 00:04:25] info: zh:zstack:znp: Serialport opened
[2025-02-07 00:04:25] error: z2m: Error while starting zigbee-herdsman
[2025-02-07 00:04:25] error: z2m: Failed to start zigbee-herdsman
[2025-02-07 00:04:25] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-02-07 00:04:25] error: z2m: Exiting...
[2025-02-07 00:04:25] error: z2m: TypeError: Cannot read properties of null (reading 'key')
at ZnpAdapterManager.determineStrategy (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:154:64)
at ZnpAdapterManager.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:62:26)
at ZStackAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:158:16)
at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)
at Zigbee.start (/app/lib/zigbee.ts:69:27)
at Controller.start (/app/lib/controller.ts:142:13)
at start (/app/index.js:161:5)

@mzagula78 mzagula78 added the problem Something isn't working label Feb 7, 2025
@mzagula78
Copy link
Author

[00:09:43] INFO: Starting socat process ...
2025/02/07 00:09:43 socat[46] N PTY is /dev/pts/0
2025/02/07 00:09:43 socat[46] N listening on AF=2 0.0.0.0:8485
[00:09:44] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-02-07 00:09:49] debug: z2m: Removing old log directory '/config/zigbee2mqtt/log/2025-02-07.00-03-25'
[2025-02-07 00:09:49] info: z2m: Logging to console, file (filename: log.log)
[2025-02-07 00:09:49] debug: z2m: Loaded state from file /config/zigbee2mqtt/state.json
[2025-02-07 00:09:49] info: z2m: Starting Zigbee2MQTT version 2.1.1 (commit #unknown)
[2025-02-07 00:09:49] debug: z2m: sd-notify loaded
[2025-02-07 00:09:49] info: z2m: Starting zigbee-herdsman (3.2.5)
[2025-02-07 00:09:49] debug: z2m: Using zigbee-herdsman with settings: '"{"network":{"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11],"networkKey":"HIDDEN"},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json","serialPort":{"path":"/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0","adapter":"zstack"},"adapter":{"disableLED":false}}"'
[2025-02-07 00:09:49] debug: zh:adapter:discovery: Connected devices: [{"path":"/dev/ttyACM0","manufacturer":"0658","pnpId":"usb-0658_0200-if00","vendorId":"0658","productId":"0200"},{"path":"/dev/ttyUSB0","manufacturer":"Silicon Labs","serialNumber":"0001","pnpId":"usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0","vendorId":"10c4","productId":"ea60"}]
[2025-02-07 00:09:49] debug: zh:adapter:discovery: Unable to match USB adapter: zstack | /dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0
[2025-02-07 00:09:49] debug: zh:controller: Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":"HIDDEN","panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11]},"serialPort":{"path":"/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0","adapter":"zstack"},"adapter":{"disableLED":false},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json"}'
[2025-02-07 00:09:49] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-02-07 00:09:49] info: zh:zstack:znp: Serialport opened
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - ping - {"capabilities":1}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,0,33,1,32]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,2,97,1,89,6,61]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,2,97,1,89,6,61]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 2 - 3 - 1 - 1 - [89,6] - 61
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - ping - {"capabilities":1625}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - ping - {"capabilities":1}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,0,33,1,32]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,2,97,1,89,6,61]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,2,97,1,89,6,61]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 2 - 3 - 1 - 1 - [89,6] - 61
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - ping - {"capabilities":1625}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - version - {}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,0,33,2,35]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,10,97,2,2,1,2,7,1,20,100,52,1,0,43]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,10,97,2,2,1,2,7,1,20,100,52,1,0,43]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 10 - 3 - 1 - 2 - [2,1,2,7,1,20,100,52,1,0] - 43
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - version - {"transportrev":2,"product":1,"majorrel":2,"minorrel":7,"maintrel":1,"revision":20210708}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack: Adapter concurrent: 16
[2025-02-07 00:09:49] debug: zh:zstack: Detected znp version 'zStack3x0' ({"transportrev":2,"product":1,"majorrel":2,"minorrel":7,"maintrel":1,"revision":20210708})
[2025-02-07 00:09:49] debug: zh:adapter:zstack:manager: beginning znp startup
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - getExtAddr - {}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,0,33,4,37]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,8,97,4,156,10,220,41,0,75,18,0,87]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,8,97,4,156,10,220,41,0,75,18,0,87]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 8 - 3 - 1 - 4 - [156,10,220,41,0,75,18,0] - 87
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - getExtAddr - {"extaddress":"0x00124b0029dc0a9c"}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - osalNvLength - {"id":130}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,2,33,19,130,0,178]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,2,97,19,24,0,104]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,2,97,19,24,0,104]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 2 - 3 - 1 - 19 - [24,0] - 104
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - osalNvLength - {"length":24}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - osalNvReadExt - {"id":130,"offset":0}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,4,33,28,130,0,0,0,187]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,26,97,28,0,24,0,1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13,231,1,0,105,228,72,0,95]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,26,97,28,0,24,0,1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13,231,1,0,105,228,72,0,95]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 26 - 3 - 1 - 28 - [0,24,0,1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13,231,1,0,105,228,72,0] - 95
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - osalNvReadExt - {"status":0,"len":24,"value":{"type":"Buffer","data":[0,1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13,231,1,0,105,228,72,0]}}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:adapter:zstack:manager: determining znp startup strategy
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - osalNvLength - {"id":96}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,2,33,19,96,0,80]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,2,97,19,0,0,112]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,2,97,19,0,0,112]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 2 - 3 - 1 - 19 - [0,0] - 112
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - osalNvLength - {"length":0}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - osalNvLength - {"id":33}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,2,33,19,33,0,17]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,2,97,19,116,0,4]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,2,97,19,116,0,4]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 2 - 3 - 1 - 19 - [116,0] - 4
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - osalNvLength - {"length":116}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - osalNvReadExt - {"id":33,"offset":0}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,4,33,28,33,0,0,0,24]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,118,97,28,0,116,93,5,2,51,15,51,0,30,0,0,0,1,5,1,143,0,7,0,2,13,30,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,98,26,8,0,0,8,0,0,15,15,4,0,1,0,0,0,1,0,0,0,0,156,10,220,41,0,75,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,5,0,1,100,10,1,0,0,0,46,126,0,0,208]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,118,97,28,0,116,93,5,2,51,15,51,0,30,0,0,0,1,5,1,143,0,7,0,2,13,30,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,98,26,8,0,0,8,0,0,15,15,4,0,1,0,0,0,1,0,0,0,0,156,10,220,41,0,75,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,5,0,1,100,10,1,0,0,0,46,126,0,0,208]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 118 - 3 - 1 - 28 - [0,116,93,5,2,51,15,51,0,30,0,0,0,1,5,1,143,0,7,0,2,13,30,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,98,26,8,0,0,8,0,0,15,15,4,0,1,0,0,0,1,0,0,0,0,156,10,220,41,0,75,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,5,0,1,100,10,1,0,0,0,46,126,0,0] - 208
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - osalNvReadExt - {"status":0,"len":116,"value":{"type":"Buffer","data":[93,5,2,51,15,51,0,30,0,0,0,1,5,1,143,0,7,0,2,13,30,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,98,26,8,0,0,8,0,0,15,15,4,0,1,0,0,0,1,0,0,0,0,156,10,220,41,0,75,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,5,0,1,100,10,1,0,0,0,46,126,0,0]}}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - osalNvLength - {"id":98}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,2,33,19,98,0,82]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,2,97,19,0,0,112]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,2,97,19,0,0,112]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 2 - 3 - 1 - 19 - [0,0] - 112
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - osalNvLength - {"length":0}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - osalNvLength - {"id":58}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,2,33,19,58,0,10]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,2,97,19,0,0,112]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,2,97,19,0,0,112]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 2 - 3 - 1 - 19 - [0,0] - 112
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - osalNvLength - {"length":0}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] debug: zh:zstack:znp: --> SREQ: SYS - osalNvLength - {"id":59}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:writer: --> frame [254,2,33,19,59,0,11]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: <-- [254,2,97,19,0,0,112]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext [254,2,97,19,0,0,112]
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --> parsed 2 - 3 - 1 - 19 - [0,0] - 112
[2025-02-07 00:09:49] debug: zh:zstack:znp: <-- SRSP: SYS - osalNvLength - {"length":0}
[2025-02-07 00:09:49] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-02-07 00:09:49] error: z2m: Error while starting zigbee-herdsman
[2025-02-07 00:09:49] error: z2m: Failed to start zigbee-herdsman
[2025-02-07 00:09:49] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-02-07 00:09:49] error: z2m: Exiting...
[2025-02-07 00:09:49] error: z2m: TypeError: Cannot read properties of null (reading 'key')
at ZnpAdapterManager.determineStrategy (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:154:64)
at ZnpAdapterManager.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:62:26)
at ZStackAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:158:16)
at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)
at Zigbee.start (/app/lib/zigbee.ts:69:27)
at Controller.start (/app/lib/controller.ts:142:13)
at start (/app/index.js:161:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant