vvpossible / homebridge_yeelight

Yeelight plugin for homebridge
303 stars 59 forks source link

Homebridge crashes when finding ceiling light #67

Closed amorphobia closed 5 years ago

amorphobia commented 5 years ago

I turn on my "Moon LED Smart Ceiling Light 650" developer mode and run homebridge, it crashes with following log:

[10/16/2018, 9:43:04 PM] [yeelight] found dev: a1de03
/opt/node/lib/node_modules/homebridge-yeelight/index.js:119
                    .on('set', function(value, callback) { that.exeCmd(dev.did, "ct", value, callback)})
                    ^

TypeError: Cannot read property 'on' of undefined
    at Object.onDevFound (/opt/node/lib/node_modules/homebridge-yeelight/index.js:119:21)
    at .<anonymous> (/opt/node/lib/node_modules/homebridge-yeelight/lib/yee.js:384:26)
    at emitTwo (events.js:106:13)
    at Socket.emit (events.js:191:7)
    at UDP.onMessage (dgram.js:548:8)

My config.json is copied from the example file.

Could you please help? Thanks.

vvpossible commented 5 years ago

Do you have other Yeelight devices? Did you see the same issue?

amorphobia commented 5 years ago

Yes. I tried on my LED ceiling light also. Only one device in developer mode. It crashes with same message.

vvpossible commented 5 years ago

Which plugin version are you using? Could you upgrade the plugin to the latest version?

amorphobia commented 5 years ago

I have just installed it with npm.

homebridge -V shows 0.4.20

vvpossible commented 5 years ago

OK, will take a look at this issue tomorrow.

vvpossible commented 5 years ago

Sees your homebridge doesn't support ColorTempreture characteristc now. Please npm install homebrdige to upgrade your homebridge to latest version 0.4.45.

amorphobia commented 5 years ago

Thanks for help. It works now.