momodalo / broadlinkjs

A Node.JS library for controlling Broadlink RM2/3 (Pro) remote controls
MIT License
53 stars 33 forks source link

Help Required - crypto.js Error #7

Open nitaybz opened 7 years ago

nitaybz commented 7 years ago

Hi,

I'm using your broadlink library under 3 different forks - broadlinkjs-rm, broadlinkjs-sm, broadlinkjs-s1c.

I find this error on all plugins, most frequently on the s1c since it's constantly checking the status of the device (every 2 seconds), using it with homebridge plugins to connect to my smart home.

May 23 21:36:08 raspberrypi homebridge[1671]: crypto.js:158
May 23 21:36:08 raspberrypi homebridge[1671]: var ret = this._handle.final();
May 23 21:36:08 raspberrypi homebridge[1671]: ^
May 23 21:36:08 raspberrypi homebridge[1671]: Error: error:0606508A:digital envelope routines:EVP_DecryptFinal_ex:data not multiple of block length
May 23 21:36:08 raspberrypi homebridge[1671]: at Decipheriv.final (crypto.js:158:26)
May 23 21:36:08 raspberrypi homebridge[1671]: at Socket.cs.on (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs-rm/index.js:179:27)
May 23 21:36:08 raspberrypi homebridge[1671]: at emitTwo (events.js:106:13)
May 23 21:36:08 raspberrypi homebridge[1671]: at Socket.emit (events.js:194:7)
May 23 21:36:08 raspberrypi homebridge[1671]: at UDP.onMessage [as onmessage] (dgram.js:545:8)
May 23 21:36:08 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE
May 23 21:36:08 raspberrypi systemd[1]: Unit homebridge.service entered failed state.

any idea on how I can prevent it from crushing my system (homnebridge) ? on the S1C it happens every 15 minutes or so but with the other plugins it can happen once in a day or two.

RealLittleSherman commented 7 years ago

Same problem here....any news about that?

Thanks in advance!

aksneo commented 6 years ago

any solve ?

iandronowicz commented 6 years ago

any advance on this?

ejabbour commented 6 years ago

Dears, any progress on this issue. this is happening almost at every trigger of the S1C Alaram... is there a way to modify the script like try/catch or to ignore the error when it happens instead of killing the whole homebridge process.