kpsuperplane / homebridge-wiz-lan

Control Wiz lights over LAN
Apache License 2.0
115 stars 37 forks source link

Version 3.0.0 crashes Homebridge v1.3.1 #36

Closed xmanu closed 3 years ago

xmanu commented 3 years ago

When updating homebridge-wiz-lan to 3.0.0, homebridge crashes on restart. The following log appears:

Started Homebridge v1.3.1 with PID: 31751
Initializing HAP-NodeJS v0.9.2...
[26/02/2021, 15:42:44] Loaded config.json with 0 accessories and 2 platforms.
[26/02/2021, 15:42:44] Loaded 1 cached accessories from cachedAccessories.
[26/02/2021, 15:42:44] ---
[26/02/2021, 15:42:51] Loaded plugin: homebridge-config-ui-x@4.39.1
[26/02/2021, 15:42:51] Registering platform 'homebridge-config-ui-x.config'
[26/02/2021, 15:42:51] ---
[26/02/2021, 15:42:52] Loaded plugin: homebridge-rpi@1.2.10
[26/02/2021, 15:42:53] Registering platform 'homebridge-rpi.Lib'
[26/02/2021, 15:42:53] Registering platform 'homebridge-rpi.RPi'
[26/02/2021, 15:42:53] ---
[26/02/2021, 15:42:53] Loaded plugin: homebridge-wiz-lan@3.0.0
[26/02/2021, 15:42:53] Registering platform 'homebridge-wiz-lan.WizSmarthome'
[26/02/2021, 15:42:53] ---
[26/02/2021, 15:42:53] Loading 2 platforms...
[26/02/2021, 15:42:53] [Config] Initializing config platform...
[26/02/2021, 15:42:53] [Config] Running in Service Mode
[26/02/2021, 15:42:54] [WizSmarthome] Initializing WizSmarthome platform...
[26/02/2021, 15:42:54] [WizSmarthome] Loading accessory from cache: a8bb50d63554
[26/02/2021, 15:42:56] [homebridge-wiz-lan] This plugin generated a warning from the characteristic 'Model': characteristic value expected string and received undefined. See https://git.io/JtMGR for more info.
[26/02/2021, 15:42:56] [homebridge-wiz-lan] This plugin generated a warning from the characteristic 'Model': [Model] characteristic must have a length of more than 1 character otherwise HomeKit will reject this accessory, ignoring new value. See https://git.io/JtMGR for more info.
[26/02/2021, 15:42:56] [homebridge-wiz-lan] This plugin generated a warning from the characteristic 'Serial Number': characteristic value expected string and received undefined. See https://git.io/JtMGR for more info.
[26/02/2021, 15:42:56] TypeError: Cannot read property 'includes' of undefined
    at /usr/local/lib/node_modules/homebridge-wiz-lan/src/accessories/WizBulb/index.ts:19:57
    at Array.some (<anonymous>)
    at Object.is (/usr/local/lib/node_modules/homebridge-wiz-lan/src/accessories/WizBulb/index.ts:19:31)
    at /usr/local/lib/node_modules/homebridge-wiz-lan/src/wiz.ts:54:63
    at Array.find (<anonymous>)
    at HomebridgeWizLan.initAccessory (/usr/local/lib/node_modules/homebridge-wiz-lan/src/wiz.ts:54:35)
    at HomebridgeWizLan.configureAccessory (/usr/local/lib/node_modules/homebridge-wiz-lan/src/wiz.ts:72:10)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:317:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:277:69)
[26/02/2021, 15:42:56] Got SIGTERM, shutting down Homebridge...

Downgrading back to 2.2.0 fixes this.

that70schris commented 3 years ago

same here

kpsuperplane commented 3 years ago

I just released 3.0.1 which should hopefully fix this. Let me know if it does!

xmanu commented 3 years ago

Yes. The crash is gone. Unfortunately the existing bulbs from V2 did not work after the update. I had to reset the cached accessories, afterwards everything works fine! Thanks for your work on V3! I love it that the network usage is lowered!