dansays / homebridge-applescript

Applescript plugin for homebridge: https://github.com/nfarina/homebridge
20 stars 8 forks source link

Cannot read property 'replace' #1

Open walmer-bolfet opened 8 years ago

walmer-bolfet commented 8 years ago

My Homebridge is crashing periodically - at least once a day. I don't know exactly when, or if it is assocated with a current action. When I check on it I see the following and expect it is related to Applescript. Anyone have any ideas about what to do?

/usr/local/lib/node_modules/homebridge-applescript/index.js:24 var command = accessory[prop].replace(/''/g, '"');

TypeError: Cannot read property 'replace' of undefined at ApplescriptAccessory.setState (/usr/local/lib/node_modules/homebridge-applescript/index.js:24:31) at emitThree (events.js:97:13) at emit (events.js:175:7) at Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:152:10) at Bridge.Accessory._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:516:22) at emitThree (events.js:97:13) at HAPServer.emit (events.js:175:7) at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:682:10) at HAPServer. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:172:39) at emitNone (events.js:67:13) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:905:12) at doNTCallback2 (node.js:441:9) at process._tickCallback (node.js:355:17)