WebThingsIO / zigbee-adapter

Zigbee adapter add-on for WebThings Gateway
Mozilla Public License 2.0
46 stars 29 forks source link

TypeError: Cannot read property 'length' of undefined #151

Closed benfrancis closed 5 years ago

benfrancis commented 5 years ago

I've started having problems with the Zigbee adapter and am seeing lots of exceptions in the logs.

2019-08-09 15:26:01.550 ERROR  : zigbee: handleExplicitRx: Caught an exception parsing ZCL frame
2019-08-09 15:26:01.551 ERROR  : zigbee: TypeError: Cannot read property 'length' of undefined
2019-08-09 15:26:01.552 ERROR  : zigbee:     at ZigbeeNode.handleCheckin (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:521:31)
2019-08-09 15:26:01.554 ERROR  : zigbee:     at ZigbeeNode.handleZhaResponse (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:1255:16)
2019-08-09 15:26:01.555 ERROR  : zigbee:     at ZigbeeAdapter.handleZclFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-adapter.js:487:12)
2019-08-09 15:26:01.557 ERROR  : zigbee:     at XBeeDriver.handleExplicitRx (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:361:22)
2019-08-09 15:26:01.558 ERROR  : zigbee:     at XBeeDriver.handleParsedFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:418:20)
2019-08-09 15:26:01.560 ERROR  : zigbee:     at parseZclFrame.then (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:385:14)
2019-08-09 15:26:01.562 ERROR  : zigbee:     at <anonymous>
2019-08-09 15:26:01.563 ERROR  : zigbee: { type: 145,
2019-08-09 15:26:01.564 ERROR  : zigbee:   remote64: 'ffffffffffffffff',
2019-08-09 15:26:01.566 ERROR  : zigbee:   remote16: '8148',
2019-08-09 15:26:01.567 ERROR  : zigbee:   sourceEndpoint: '23',
2019-08-09 15:26:01.569 ERROR  : zigbee:   destinationEndpoint: '01',
2019-08-09 15:26:01.570 ERROR  : zigbee:   clusterId: '0020',
2019-08-09 15:26:01.571 ERROR  : zigbee:   profileId: '0104',
2019-08-09 15:26:01.573 ERROR  : zigbee:   receiveOptions: 1,
2019-08-09 15:26:01.574 ERROR  : zigbee:   data: <Buffer 19 ca 00>,
2019-08-09 15:26:01.576 ERROR  : zigbee:   zcl: 
2019-08-09 15:26:01.577 ERROR  : zigbee:    { frameCntl: { frameType: 1, manufSpec: 0, direction: 1, disDefaultRsp: 1 },
2019-08-09 15:26:01.579 ERROR  : zigbee:      manufCode: 0,
2019-08-09 15:26:01.580 ERROR  : zigbee:      seqNum: 202,
2019-08-09 15:26:01.581 ERROR  : zigbee:      cmdId: 'checkin',
2019-08-09 15:26:01.583 ERROR  : zigbee:      payload: {} },
2019-08-09 15:26:01.584 ERROR  : zigbee:   zclSeqNum: 202,
2019-08-09 15:26:01.586 ERROR  : zigbee:   zclCmdId: 'checkin' }
2019-08-09 15:26:02.618 INFO   : zigbee: setProperty property: on for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0006 zcl: off value: false
2019-08-09 15:26:07.471 INFO   : zigbee: setProperty property: on for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0006 zcl: on value: true
2019-08-09 15:26:08.022 INFO   : zigbee: setProperty property: on for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0006 zcl: on value: true
2019-08-09 15:26:20.420 INFO   : zigbee: setProperty property: _level for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0008 zcl: level: 114 (44.7%) value: 44.705882352941174
2019-08-09 15:26:20.424 INFO   : zigbee: setProperty property: color for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0300 zcl: xyV: [0.445(29173), 0.338(22154),44.705882352941174] value: #723b37
2019-08-09 15:26:21.556 ERROR  : zigbee: handleExplicitRx: Caught an exception parsing ZCL frame
2019-08-09 15:26:21.558 ERROR  : zigbee: TypeError: Cannot read property 'length' of undefined
2019-08-09 15:26:21.560 ERROR  : zigbee:     at ZigbeeNode.handleCheckin (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:521:31)
2019-08-09 15:26:21.561 ERROR  : zigbee:     at ZigbeeNode.handleZhaResponse (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:1255:16)
2019-08-09 15:26:21.563 ERROR  : zigbee:     at ZigbeeAdapter.handleZclFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-adapter.js:487:12)
2019-08-09 15:26:21.564 ERROR  : zigbee:     at XBeeDriver.handleExplicitRx (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:361:22)
2019-08-09 15:26:21.565 ERROR  : zigbee:     at XBeeDriver.handleParsedFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:418:20)
2019-08-09 15:26:21.567 ERROR  : zigbee:     at parseZclFrame.then (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:385:14)
2019-08-09 15:26:21.568 ERROR  : zigbee:     at <anonymous>
2019-08-09 15:26:21.570 ERROR  : zigbee: { type: 145,
2019-08-09 15:26:21.571 ERROR  : zigbee:   remote64: 'ffffffffffffffff',
2019-08-09 15:26:21.572 ERROR  : zigbee:   remote16: '8148',
2019-08-09 15:26:21.574 ERROR  : zigbee:   sourceEndpoint: '23',
2019-08-09 15:26:21.575 ERROR  : zigbee:   destinationEndpoint: '01',
2019-08-09 15:26:21.577 ERROR  : zigbee:   clusterId: '0020',
2019-08-09 15:26:21.578 ERROR  : zigbee:   profileId: '0104',
2019-08-09 15:26:21.580 ERROR  : zigbee:   receiveOptions: 1,
2019-08-09 15:26:21.581 ERROR  : zigbee:   data: <Buffer 19 cb 00>,
2019-08-09 15:26:21.583 ERROR  : zigbee:   zcl: 
2019-08-09 15:26:21.584 ERROR  : zigbee:    { frameCntl: { frameType: 1, manufSpec: 0, direction: 1, disDefaultRsp: 1 },
2019-08-09 15:26:21.586 ERROR  : zigbee:      manufCode: 0,
2019-08-09 15:26:21.587 ERROR  : zigbee:      seqNum: 203,
2019-08-09 15:26:21.588 ERROR  : zigbee:      cmdId: 'checkin',
2019-08-09 15:26:21.590 ERROR  : zigbee:      payload: {} },
2019-08-09 15:26:21.591 ERROR  : zigbee:   zclSeqNum: 203,
2019-08-09 15:26:21.593 ERROR  : zigbee:   zclCmdId: 'checkin' }
2019-08-09 15:26:26.582 INFO   : zigbee: setProperty property: _level for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0008 zcl: level: 254 (100.0%) value: 100
2019-08-09 15:26:26.584 INFO   : zigbee: setProperty property: color for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0300 zcl: xyV: [0.629(41228), 0.324(21228),100] value: #ff001d
2019-08-09 15:26:31.610 INFO   : zigbee: setProperty property: on for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0006 zcl: off value: false
2019-08-09 15:26:40.455 INFO   : zigbee: setProperty property: on for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0006 zcl: off value: false
2019-08-09 15:26:41.548 ERROR  : zigbee: handleExplicitRx: Caught an exception parsing ZCL frame
2019-08-09 15:26:41.550 ERROR  : zigbee: TypeError: Cannot read property 'length' of undefined
2019-08-09 15:26:41.552 ERROR  : zigbee:     at ZigbeeNode.handleCheckin (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:521:31)
2019-08-09 15:26:41.554 ERROR  : zigbee:     at ZigbeeNode.handleZhaResponse (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:1255:16)
2019-08-09 15:26:41.555 ERROR  : zigbee:     at ZigbeeAdapter.handleZclFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-adapter.js:487:12)
2019-08-09 15:26:41.557 ERROR  : zigbee:     at XBeeDriver.handleExplicitRx (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:361:22)
2019-08-09 15:26:41.559 ERROR  : zigbee:     at XBeeDriver.handleParsedFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:418:20)
2019-08-09 15:26:41.561 ERROR  : zigbee:     at parseZclFrame.then (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:385:14)
2019-08-09 15:26:41.562 ERROR  : zigbee:     at <anonymous>
2019-08-09 15:26:41.564 ERROR  : zigbee: { type: 145,
2019-08-09 15:26:41.566 ERROR  : zigbee:   remote64: 'ffffffffffffffff',
2019-08-09 15:26:41.567 ERROR  : zigbee:   remote16: '8148',
2019-08-09 15:26:41.569 ERROR  : zigbee:   sourceEndpoint: '23',
2019-08-09 15:26:41.571 ERROR  : zigbee:   destinationEndpoint: '01',
2019-08-09 15:26:41.573 ERROR  : zigbee:   clusterId: '0020',
2019-08-09 15:26:41.574 ERROR  : zigbee:   profileId: '0104',
2019-08-09 15:26:41.576 ERROR  : zigbee:   receiveOptions: 1,
2019-08-09 15:26:41.578 ERROR  : zigbee:   data: <Buffer 19 cc 00>,
2019-08-09 15:26:41.579 ERROR  : zigbee:   zcl: 
2019-08-09 15:26:41.581 ERROR  : zigbee:    { frameCntl: { frameType: 1, manufSpec: 0, direction: 1, disDefaultRsp: 1 },
2019-08-09 15:26:41.583 ERROR  : zigbee:      manufCode: 0,
2019-08-09 15:26:41.584 ERROR  : zigbee:      seqNum: 204,
2019-08-09 15:26:41.586 ERROR  : zigbee:      cmdId: 'checkin',
2019-08-09 15:26:41.588 ERROR  : zigbee:      payload: {} },
2019-08-09 15:26:41.589 ERROR  : zigbee:   zclSeqNum: 204,
2019-08-09 15:26:41.591 ERROR  : zigbee:   zclCmdId: 'checkin' }
2019-08-09 15:26:43.175 INFO   : zigbee: setProperty property: on for: zb-000d6f000590f551-smartPlug profileId: 0104 endpoint: 1 clusterId: 0006 zcl: on value: true
2019-08-09 15:26:44.272 INFO   : zigbee: setProperty property: on for: zb-000d6f000b93bbbb-smartPlug profileId: 0104 endpoint: 1 clusterId: 0006 zcl: on value: true
2019-08-09 15:27:01.539 ERROR  : zigbee: handleExplicitRx: Caught an exception parsing ZCL frame
2019-08-09 15:27:01.542 ERROR  : zigbee: TypeError: Cannot read property 'length' of undefined
2019-08-09 15:27:01.543 ERROR  : zigbee:     at ZigbeeNode.handleCheckin (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:521:31)
2019-08-09 15:27:01.545 ERROR  : zigbee:     at ZigbeeNode.handleZhaResponse (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:1255:16)
2019-08-09 15:27:01.547 ERROR  : zigbee:     at ZigbeeAdapter.handleZclFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-adapter.js:487:12)
2019-08-09 15:27:01.549 ERROR  : zigbee:     at XBeeDriver.handleExplicitRx (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:361:22)
2019-08-09 15:27:01.550 ERROR  : zigbee:     at XBeeDriver.handleParsedFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:418:20)
2019-08-09 15:27:01.552 ERROR  : zigbee:     at parseZclFrame.then (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:385:14)
2019-08-09 15:27:01.554 ERROR  : zigbee:     at <anonymous>
2019-08-09 15:27:01.555 ERROR  : zigbee: { type: 145,
2019-08-09 15:27:01.557 ERROR  : zigbee:   remote64: 'ffffffffffffffff',
2019-08-09 15:27:01.559 ERROR  : zigbee:   remote16: '8148',
2019-08-09 15:27:01.560 ERROR  : zigbee:   sourceEndpoint: '23',
2019-08-09 15:27:01.562 ERROR  : zigbee:   destinationEndpoint: '01',
2019-08-09 15:27:01.564 ERROR  : zigbee:   clusterId: '0020',
2019-08-09 15:27:01.565 ERROR  : zigbee:   profileId: '0104',
2019-08-09 15:27:01.567 ERROR  : zigbee:   receiveOptions: 1,
2019-08-09 15:27:01.569 ERROR  : zigbee:   data: <Buffer 19 cd 00>,
2019-08-09 15:27:01.571 ERROR  : zigbee:   zcl: 
2019-08-09 15:27:01.572 ERROR  : zigbee:    { frameCntl: { frameType: 1, manufSpec: 0, direction: 1, disDefaultRsp: 1 },
2019-08-09 15:27:01.574 ERROR  : zigbee:      manufCode: 0,
2019-08-09 15:27:01.576 ERROR  : zigbee:      seqNum: 205,
2019-08-09 15:27:01.577 ERROR  : zigbee:      cmdId: 'checkin',
2019-08-09 15:27:01.579 ERROR  : zigbee:      payload: {} },
2019-08-09 15:27:01.581 ERROR  : zigbee:   zclSeqNum: 205,
2019-08-09 15:27:01.582 ERROR  : zigbee:   zclCmdId: 'checkin' }
2019-08-09 15:27:21.547 ERROR  : zigbee: handleExplicitRx: Caught an exception parsing ZCL frame
2019-08-09 15:27:21.549 ERROR  : zigbee: TypeError: Cannot read property 'length' of undefined
2019-08-09 15:27:21.551 ERROR  : zigbee:     at ZigbeeNode.handleCheckin (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:521:31)
2019-08-09 15:27:21.553 ERROR  : zigbee:     at ZigbeeNode.handleZhaResponse (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-node.js:1255:16)
2019-08-09 15:27:21.554 ERROR  : zigbee:     at ZigbeeAdapter.handleZclFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-adapter.js:487:12)
2019-08-09 15:27:21.556 ERROR  : zigbee:     at XBeeDriver.handleExplicitRx (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:361:22)
2019-08-09 15:27:21.558 ERROR  : zigbee:     at XBeeDriver.handleParsedFrame (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:418:20)
2019-08-09 15:27:21.560 ERROR  : zigbee:     at parseZclFrame.then (/home/pi/.mozilla-iot/addons/zigbee-adapter/zb-driver.js:385:14)
2019-08-09 15:27:21.561 ERROR  : zigbee:     at <anonymous>
2019-08-09 15:27:21.563 ERROR  : zigbee: { type: 145,
2019-08-09 15:27:21.565 ERROR  : zigbee:   remote64: 'ffffffffffffffff',
2019-08-09 15:27:21.566 ERROR  : zigbee:   remote16: '8148',
2019-08-09 15:27:21.568 ERROR  : zigbee:   sourceEndpoint: '23',
2019-08-09 15:27:21.570 ERROR  : zigbee:   destinationEndpoint: '01',
2019-08-09 15:27:21.571 ERROR  : zigbee:   clusterId: '0020',
2019-08-09 15:27:21.573 ERROR  : zigbee:   profileId: '0104',
2019-08-09 15:27:21.575 ERROR  : zigbee:   receiveOptions: 1,
2019-08-09 15:27:21.576 ERROR  : zigbee:   data: <Buffer 19 ce 00>,
2019-08-09 15:27:21.579 ERROR  : zigbee:   zcl: 
2019-08-09 15:27:21.581 ERROR  : zigbee:    { frameCntl: { frameType: 1, manufSpec: 0, direction: 1, disDefaultRsp: 1 },
2019-08-09 15:27:21.583 ERROR  : zigbee:      manufCode: 0,
2019-08-09 15:27:21.585 ERROR  : zigbee:      seqNum: 206,
2019-08-09 15:27:21.587 ERROR  : zigbee:      cmdId: 'checkin',
2019-08-09 15:27:21.589 ERROR  : zigbee:      payload: {} },
2019-08-09 15:27:21.591 ERROR  : zigbee:   zclSeqNum: 206,
2019-08-09 15:27:21.592 ERROR  : zigbee:   zclCmdId: 'checkin' }
2019-08-09 15:27:32.760 INFO   : zigbee: setProperty property: on for: zb-d0cf5efffe1cb0bb-onOffColorLight profileId: 0104 endpoint: 1 clusterId: 0006 zcl: on value: true
2019-08-09 15:27:32.763 INFO   : zigbee: setProperty property: on for: zb-000b57fffed9ce22-dimmableLight profileId: 0104 endpoint: 1 clusterId: 0006 zcl: on value: true