xfjx / homebridge-wunderground

Weather Underground plugin for Homebridge: https://github.com/nfarina/homebridge
29 stars 10 forks source link

plugin causes crash #23

Closed cubilon closed 6 years ago

cubilon commented 6 years ago

from logs:

May  5 15:52:00 raspberrypi homebridge[3855]: [2018-5-5 15:52:00] [Mostacciano] Error fetching weather data from wunderground.com! Check your connection or configuration.
May  5 15:52:00 raspberrypi homebridge[3855]: /usr/lib/node_modules/homebridge-wunderground/index.js:88
May  5 15:52:00 raspberrypi homebridge[3855]:                 } else if (response['response']['error'] && response['response']['error']['type'] && response['response']['error']['description']) {
May  5 15:52:00 raspberrypi homebridge[3855]:                                                ^
May  5 15:52:00 raspberrypi homebridge[3855]: TypeError: Cannot read property 'error' of undefined
May  5 15:52:00 raspberrypi homebridge[3855]:     at Wunderground.<anonymous> (/usr/lib/node_modules/homebridge-wunderground/index.js:88:48)
May  5 15:52:00 raspberrypi homebridge[3855]:     at Request._callback (/usr/lib/node_modules/homebridge-wunderground/node_modules/wundergroundnode/lib/wundergroundnode.js:148:22)
May  5 15:52:00 raspberrypi homebridge[3855]:     at Request.self.callback (/usr/lib/node_modules/homebridge-wunderground/node_modules/request/request.js:186:22)
May  5 15:52:00 raspberrypi homebridge[3855]:     at emitTwo (events.js:126:13)
May  5 15:52:00 raspberrypi homebridge[3855]:     at Request.emit (events.js:214:7)
May  5 15:52:00 raspberrypi homebridge[3855]:     at Request.<anonymous> (/usr/lib/node_modules/homebridge-wunderground/node_modules/request/request.js:1163:10)
May  5 15:52:00 raspberrypi homebridge[3855]:     at emitOne (events.js:116:13)
May  5 15:52:00 raspberrypi homebridge[3855]:     at Request.emit (events.js:211:7)
May  5 15:52:00 raspberrypi homebridge[3855]:     at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-wunderground/node_modules/request/request.js:1085:12)
May  5 15:52:00 raspberrypi homebridge[3855]:     at Object.onceWrapper (events.js:313:30)
May  5 15:52:00 raspberrypi homebridge[3855]:     at emitNone (events.js:111:20)
May  5 15:52:00 raspberrypi homebridge[3855]:     at IncomingMessage.emit (events.js:208:7)
May  5 15:52:00 raspberrypi homebridge[3855]:     at endReadableNT (_stream_readable.js:1064:12)
May  5 15:52:00 raspberrypi homebridge[3855]:     at _combinedTickCallback (internal/process/next_tick.js:138:11)
May  5 15:52:00 raspberrypi homebridge[3855]:     at process._tickCallback (internal/process/next_tick.js:180:9)
May  5 15:52:00 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=1/FAILURE
May  5 15:52:00 raspberrypi systemd[1]: homebridge.service: Unit entered failed state.
May  5 15:52:00 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'.
May  5 15:52:10 raspberrypi systemd[1]: homebridge.service: Service hold-off time over, scheduling restart.
xfjx commented 6 years ago

hey, you seem to be using a very old version. in the most recent version this error should be fixed.

you can use npm to install the latest version

npm install homebridge-wunderground or npm -g install homebridge-wunderground

depending wether you are using the node modules in the current directory or the global modules directory

cubilon commented 6 years ago

once updated, seems working fine, for the moment.

xfjx commented 6 years ago

great. please let me know when you run into any errors again.