-
Notifications
You must be signed in to change notification settings - Fork 369
Closed
Description
On pairing a new device, I saw this as the device left the network prematurely:
warning: z2m: Device '0x...' left the network
error: zh:controller:endpoint: Tried to get unknown/deleted device 0x... from endpoint 1.
TypeError: Cannot read properties of undefined (reading 'manufacturerName')
at Device.onZclData (.../zigbee-herdsman/src/controller/model/device.ts:431:64)
at Controller.onZclPayload (.../zigbee-herdsman/src/controller/controller.ts:1017:13)
The only reference to manufacturerName in onZclData is on line 417:
zigbee-herdsman/src/controller/model/device.ts
Lines 413 to 420 in 4dd94ca
| const isDefaultResponse = frame.header.isGlobal && frame.command.name === "defaultRsp"; | |
| const commandHasResponse = frame.command.response !== undefined; | |
| const disableDefaultResponse = frame.header.frameControl.disableDefaultResponse; | |
| /* v8 ignore next */ | |
| const disableTuyaDefaultResponse = endpoint.getDevice().manufacturerName?.startsWith("_TZ") && process.env.DISABLE_TUYA_DEFAULT_RESPONSE; | |
| // Sometimes messages are received twice, prevent responding twice | |
| const alreadyResponded = this._lastDefaultResponseSequenceNumber === frame.header.transactionSequenceNumber; | |
I'm happy to put a PR together which investigates typing getDevice() to return undefined - it looks like I hit exactly the edge-case mentioned in #1330 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels