rodtoll / homebridge-isy-js

Homebridge platform plugin for the ISY series of home controllers from Universal Devices.
MIT License
22 stars 27 forks source link

Cannot read property 'length' of undefined #31

Closed killervette closed 7 years ago

killervette commented 7 years ago

/usr/lib/node_modules/homebridge-isy-js/index.js:71 for (var index = 0; index < this.config.ignoreDevices.length; index++) { Keep getting this error. Here is my config:

      "platform": "isy-js",
       "name": "isy-js",         
       "host": "192.168.1.46",      
       "username": "admin",      
       "password": "password",   
       "elkEnabled": true,       
       "useHttps": false,
       "debugLoggingEnabled": true,
       "includeAllScenes": false

TypeError: Cannot read property 'length' of undefined at ISYPlatform.shouldIgnore (/usr/lib/node_modules/homebridge-isy-js/index.js:71:56) at /usr/lib/node_modules/homebridge-isy-js/index.js:120:13 at ISY.finishInitialize (/usr/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:368:5) at Request. (/usr/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:529:46) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request.mixin._fireSuccess (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:229:10) at /usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:161:20 at IncomingMessage.parsers.auto (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:402:7) at Request.mixin._encode (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:198:29) at /usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:157:16 at Request.mixin._decode (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:173:7) at IncomingMessage. (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:150:14) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickCallback (node.js:356:17)

killervette commented 7 years ago

Fixed it....had to add at least one device to ignore

rodtoll commented 7 years ago

Thanks for identifying the issue. I'll add this fix to a future release.

rodtoll commented 7 years ago

Fixed in 0.1.7 now published.