smka / homebridge-broadlink-platform

Homebridge plugin for Broadlink SP and MP devices
MIT License
22 stars 11 forks source link

Occasionally crash #7

Closed eviewei closed 7 years ago

eviewei commented 7 years ago

/usr/local/lib/node_modules/homebridge-broadlink-platform/node_modules/broadlinkjs-sm/index.js:118 var address = addresses[0].split('.'); ^

TypeError: Cannot read property 'split' of undefined at module.exports.Broadlink.discover (/usr/local/lib/node_modules/homebridge-broadlink-platform/node_modules/broadlinkjs-sm/index.js:118:31) at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-broadlink-platform/index.js:226:15) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) WHY? win10+HyperV+ubuntn

nitaybz commented 7 years ago

I'm experiencing this crush as well sometimes... I also get this error from time to time:

May 22 16:17:01 raspberrypi CRON[8868]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
May 22 16:18:26 raspberrypi homebridge[8751]: crypto.js:158
May 22 16:18:26 raspberrypi homebridge[8751]: var ret = this._handle.final();
May 22 16:18:26 raspberrypi homebridge[8751]: ^
May 22 16:18:26 raspberrypi homebridge[8751]: Error: error:0606508A:digital envelope routines:EVP_DecryptFinal_ex:data not multiple of block length
May 22 16:18:26 raspberrypi homebridge[8751]: at Decipheriv.final (crypto.js:158:26)
May 22 16:18:26 raspberrypi homebridge[8751]: at Socket.cs.on (/usr/lib/node_modules/homebridge-broadlink-platform/node_modules/broadlinkjs-sm/index.js:234:27)
May 22 16:18:26 raspberrypi homebridge[8751]: at emitTwo (events.js:106:13)
May 22 16:18:26 raspberrypi homebridge[8751]: at Socket.emit (events.js:194:7)
May 22 16:18:26 raspberrypi homebridge[8751]: at UDP.onMessage [as onmessage] (dgram.js:545:8)

I'm getting the same error on my S1C plugin which is forked from yours... any idea how to solve it?