skrollme / homebridge-eveatmo

Homebridge plugin which adds a Netatmo weatherstation as HomeKit device and tries to act like Elgato Eve Room/Weather
Apache License 2.0
69 stars 7 forks source link

Homebridge crash #22

Closed hronix closed 5 years ago

hronix commented 5 years ago

I really enjoy using eveatmo and like how it's displayed in Home. One issue which I experience which can improve overall experience is here: Homebridge crashes completely when eveatmo platform have exception.

As for now, 3:53:01 PM GMT+3 problem still exist, my polling interval is 540s

[1/3/2019, 2:52:59 PM] [eveatmo platform] Loading new data from API for: weatherstation buffer.js:750 return this.hexWrite(string, offset, length); ^

TypeError: Invalid hex string at TypeError (native) at Buffer.write (buffer.js:750:21) at fromString (buffer.js:203:26) at Function.Buffer.from (buffer.js:99:12) at new Buffer (buffer.js:80:17) at EveatmoWeatherPressureService.hexToBase64 (/volume1/home/stas/.npm-global/lib/node_modules/homebridge-eveatmo/service/eveatmo-weather-pressure.js:97:11) at EveatmoWeatherPressureService.updateCharacteristics (/volume1/home/stas/.npm-global/lib/node_modules/homebridge-eveatmo/service/eveatmo-weather-pressure.js:117:23) at /volume1/home/stas/.npm-global/lib/node_modules/homebridge-eveatmo/accessory/eveatmo-weather-accessory.js:150:51 at Array.forEach (native) at EveatmoWeatherAccessory.applyWeatherData (/volume1/home/stas/.npm-global/lib/node_modules/homebridge-eveatmo/accessory/eveatmo-weather-accessory.js:148:24) at EveatmoWeatherAccessory.notifyUpdate (/volume1/home/stas/.npm-global/lib/node_modules/homebridge-eveatmo/accessory/eveatmo-weather-accessory.js:99:9) at WeatherstationDeviceType. (/volume1/home/stas/.npm-global/lib/node_modules/homebridge-eveatmo/device/weatherstation-device.js:47:18) at Array.forEach (native) at WeatherstationDeviceType. (/volume1/home/stas/.npm-global/lib/node_modules/homebridge-eveatmo/device/weatherstation-device.js:46:24) at netatmo. (/volume1/home/stas/.npm-global/lib/node_modules/netatmo/netatmo.js:227:14) at Request.self.callback (/volume1/home/stas/.npm-global/lib/node_modules/request/request.js:185:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. (/volume1/home/stas/.npm-global/lib/node_modules/request/request.js:1161:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage. (/volume1/home/stas/.npm-global/lib/node_modules/request/request.js:1083:12)

palasinio commented 5 years ago

I can‘t confirm this. Do you have the latest version installed? This plugin ‚didn‘t‘ like it if internet or netatmo is not reachable and sometimes won‘t recover, but it didn‘t crashed homebridge in my case.

hronix commented 5 years ago

@palasinio you are right, for some reason 0.4.1 was installed. it's fixed now, thanks!