rench / homebridge-smarthome

this is a homebridge plugin for mijia eco-chain but also a management webapp provide web and restapi to manage your mijia eco-chain,you can control and monitor your accessory via apple's homekit or the webapp
MIT License
39 stars 6 forks source link

Throw new error #6

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi there,

I keep getting the same error. Even after reinstalling my raspberry and only installing the plugin. The error that i get is:

/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:12 throw new Error("This callback function has already been called by someone else; it can only be called one time."); ^

Error: This callback function has already been called by someone else; it can only be called one time. at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:12:13 at Characteristic.service_air.getCharacteristic.on (/usr/local/lib/node_modules/homebridge-smarthome/kit/mijia/airpurifier.js:112:13) at emitThree (events.js:121:20) at Characteristic.emit (events.js:194:7) at Characteristic.getValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:129:10) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:627:20) at Array.forEach (native) at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:591:8) at emitMany (events.js:127:13) at HAPServer.emit (events.js:201:7)

Hope that someone can help me.

rench commented 6 years ago

yes,i found there are some duplicated code,so i remove these section and publish 1.0.7,please update and try again. thanks for your issue.

ghost commented 6 years ago

Hi, thank you for your respons.

I installed the update and in terminal it seems to run fine but the homekit app shows all devices are not responding. As soon as I touch the air purifier button the error message shows again:

/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:12 throw new Error("This callback function has already been called by someone else; it can only be called one time."); ^

Error: This callback function has already been called by someone else; it can only be called one time. at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:12:13 at Characteristic.service_air.getCharacteristic.on (/usr/local/lib/node_modules/homebridge-smarthome/kit/mijia/airpurifier.js:119:11) at emitThree (events.js:116:13) at Characteristic.emit (events.js:194:7) at Characteristic.getValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:129:10) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:627:20) at Array.forEach (native) at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:591:8) at emitMany (events.js:127:13) at HAPServer.emit (events.js:201:7)

I also have two Door & Window Sensors. They are the same but one of them seems to not be supported by Homekit for some reason. This is what I see when homebridge is running: img_6b5f6924eafe-1

rench commented 6 years ago

aha,there are multi callback section which i have not deal. update and try it. thanks.