madchicken / homebridge-zigbee-nt

A standalone ZigBee plugin that works with CC2531 USB dongle or Deconz
Apache License 2.0
75 stars 39 forks source link

Child bridge crashed after failed interview of IKEA dimmer switch #252

Closed williamccc closed 1 year ago

williamccc commented 2 years ago

I'm using the Sonoff ZBDongle-E and set the adapter type to "ezsp". When pairing with an IKEA motion sensor there was no issue. Interview was successful and the device was exposed to Home Kit. However, the IKEA remote control and dimmer switch could not be recognised. I believe it was the problem of ZBDongle-E because zigbee2mqtt exhibited similar behaviour, showing them as unsupported devices. Now that when I click on that unsupported device, the child bridge would immediately crash. Here is the log from homebridge:

TypeError: Cannot read properties of null (reading 'ota')
    at ZigBeeClient.hasOTA (/homebridge/node_modules/homebridge-zigbee-nt/src/zigbee/zig-bee-client.ts:518:39)
    at /homebridge/node_modules/homebridge-zigbee-nt/src/web/api/devices.ts:29:56
    at Generator.next (<anonymous>)
    at /homebridge/node_modules/homebridge-zigbee-nt/dist/web/api/devices.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (/homebridge/node_modules/homebridge-zigbee-nt/dist/web/api/devices.js:23:12)
    at /homebridge/node_modules/homebridge-zigbee-nt/src/web/api/devices.ts:25:60
    at Layer.handle [as handle_request] (/homebridge/node_modules/homebridge-zigbee-nt/node_modules/express/lib/router/layer.js:95:5)
    at next (/homebridge/node_modules/homebridge-zigbee-nt/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/homebridge/node_modules/homebridge-zigbee-nt/node_modules/express/lib/router/route.js:112:3)
[9/29/2022, 7:27:36 PM] [ZigBee] Child bridge process ended
[9/29/2022, 7:27:36 PM] [ZigBee] Process Ended. Code: 1, Signal: null
[9/29/2022, 7:27:43 PM] [ZigBee] Restarting Process...
[9/29/2022, 7:27:44 PM] [ZigBee] Launched child bridge with PID 10342
[9/29/2022, 7:27:49 PM] Registering platform 'homebridge-zigbee-nt.ZigbeeHomebridgeNTPlatform'

So now I cannot delete that device because child bridge would crash before I can click the unpair button. Is there anyway to manually delete the device, and workaround the unsupported device (in fact IKEA switches should be supported but ZBDongle-E has terrible support for Z2M)?

Thank you!

github-actions[bot] commented 1 year ago

Stale issue message

konistehrad commented 1 year ago

I’m also experiencing this when attempting to pair a Hue bulb. Please reopen. Happy to try to tackle the problem if someone can give me a little background on the data structures in question.