michbeck100 / pimatic-hap

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

Crash with "undefined" and switches #57

Closed Gernot closed 7 years ago

Gernot commented 7 years ago

Hi, thanks for fixing #56! I think this one is similar.

10:28:27.621 [pimatic] A uncaught exception occured: TypeError: Cannot read property 'then' of undefined
10:28:27.621 [pimatic]>    at PowerSwitchAccessory.BaseAccessory.handleReturnPromise (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/base.coffee:50:9)
10:28:27.621 [pimatic]>    at PowerSwitchAccessory.handleReturnPromise (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/base.coffee:1:1)
10:28:27.621 [pimatic]>    at null.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/switch.coffee:39:12)
10:28:27.621 [pimatic]>    at emitThree (events.js:97:13)
10:28:27.621 [pimatic]>    at null.emit (events.js:175:7)
10:28:27.621 [pimatic]>    at null.Characteristic.getValue (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Characteristic.js:120:10)
10:28:27.621 [pimatic]>    at Bridge.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:621:20)
10:28:27.621 [pimatic]>    at Array.forEach (native)
10:28:27.621 [pimatic]>    at Bridge.Accessory._handleGetCharacteristics (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:585:8)
10:28:27.621 [pimatic]>    at emitMany (events.js:108:13)
10:28:27.621 [pimatic]>    at HAPServer.emit (events.js:182:7)
10:28:27.621 [pimatic]>    at HAPServer._handleCharacteristics (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:921:10)
10:28:27.621 [pimatic]>    at HAPServer.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:204:39)
10:28:27.621 [pimatic]>    at emitNone (events.js:67:13)
10:28:27.621 [pimatic]>    at IncomingMessage.emit (events.js:166:7)
10:28:27.621 [pimatic]>    at endReadableNT (_stream_readable.js:923:12)
10:28:27.621 [pimatic]>    at nextTickCallbackWith2Args (node.js:458:9)
10:28:27.621 [pimatic]>    at process._tickCallback (node.js:372:17)
10:28:27.621 [pimatic]> This is most probably a bug in pimatic or in a module, please report it!
10:28:27.629 [pimatic] shutting pimatic down...

Thanks for looking into this! :-)

michbeck100 commented 7 years ago

Which type of switch are you using here?

Gernot commented 7 years ago

WeMo Switch. I'm using Pimatic to integrate all my outdated Pre-HomeKit stuff into my setup :-)

michbeck100 commented 7 years ago

If you are using the pimatic-wemo plugin, then this issue isn't on my side: https://github.com/muldy/pimatic-wemo/issues/3

Gernot commented 7 years ago

Ah, I see. Thanks. That's above my skills in CoffeeScript :-)

michbeck100 commented 7 years ago

I'm closing this now, because of https://github.com/muldy/pimatic-wemo/issues/3