michbeck100 / pimatic-hap

Pimatic homekit bridge
GNU General Public License v2.0
30 stars 10 forks source link

uncaught exception #75

Closed kloknibor closed 6 years ago

kloknibor commented 6 years ago

Hi,

When using homekit to turn on and off the light I get the following error

error [pimatic]: An uncaught exception occurred: TypeError: promise.then(...).catch(...).done is not a function at PowerSwitchAccessory.BaseAccessory.handleVoidPromise (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/base.coffee:46:10) at PowerSwitchAccessory.handleVoidPromise (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/base.coffee:1:1) at null. (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/switch.coffee:35:12) at emitMany (events.js:108:13) at null.emit (events.js:182:7) at null.Characteristic.setValue (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Characteristic.js:155:10) at Bridge. (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:740:22) at Array.forEach (native) at Bridge.Accessory._handleSetCharacteristics (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:685:8) at emitMany (events.js:108:13) at HAPServer.emit (events.js:182:7) at HAPServer._handleCharacteristics (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:972:10) at HAPServer. (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:209:39) at emitNone (events.js:67:13) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:923:12) at nextTickCallbackWith2Args (node.js:511:9) at process._tickCallback (node.js:425:17) This is most probably a bug in pimatic or in a module, please report it!

The lights switch off as supposed to be but it seems an error like this shouldn't be present!

This is tested with a tradfri e27 LED light, just turn it on and off from the control center on iphone to replicate

michbeck100 commented 6 years ago

Ok, the tradfri support is pretty new, this might be because the tradfri plugin uses a different api. I will check.

kloknibor commented 6 years ago

thanks!

michbeck100 commented 6 years ago

This might be a problem with the tradfri plugin. Lets see what https://github.com/treban/pimatic-tradfri/issues/12 brings

michbeck100 commented 6 years ago

This is resolved with https://github.com/treban/pimatic-tradfri/issues/12