uncaught exception
kloknibor opened this issue · 4 comments
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
Ok, the tradfri support is pretty new, this might be because the tradfri plugin uses a different api. I will check.
thanks!
This might be a problem with the tradfri plugin. Lets see what treban/pimatic-tradfri#12 brings
This is resolved with treban/pimatic-tradfri#12