mark-wade / homebridge-hive

Hive Thermostat plugin for Homebridge
MIT License
12 stars 5 forks source link

TypeError: Cannot read property 'length' of undefined #2

Closed SneakyChilli closed 7 years ago

SneakyChilli commented 7 years ago

Hi.

I installed this yesterday and the first time I changed the temp everything seemed fine. Now if I pen the home app, home bridge crashes with the message below.

Any ideas? (& please keep up the good work)

Cheers

Ben


[1/10/2017, 11:29:06 AM] [Hive Thermostat] Fetching data from Hive API /usr/local/lib/node_modules/homebridge-hive/index.js:116 for ( var i = 0; i < body.nodes.length; i++ ) { ^

TypeError: Cannot read property 'length' of undefined at Object. (/usr/local/lib/node_modules/homebridge-hive/index.js:116:35) at Request.self.callback (/usr/local/lib/node_modules/homebridge-hive/node_modules/request/request.js:186:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request. (/usr/local/lib/node_modules/homebridge-hive/node_modules/request/request.js:1081:10) at emitOne (events.js:77:13) at Request.emit (events.js:169:7) at IncomingMessage. (/usr/local/lib/node_modules/homebridge-hive/node_modules/request/request.js:1001:12) at IncomingMessage.g (events.js:260:16) at emitNone (events.js:72:20)

mark-wade commented 7 years ago

Should be fixed

SneakyChilli commented 7 years ago

Thanks Mark. I'm new to this. Can you help me out with the command(s) I'll need to update the plugin?

Cheers

mark-wade commented 7 years ago

npm update -g homebridge-hive Then restart homebridge

SneakyChilli commented 7 years ago

Thanks. Appreciate it.