howanghk / homebridge-ewelink

Homebridge plugin to control Sonoff relays with OEM firmware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Homebridge crash while no internet available

BreitiDE opened this issue · comments

hi, cool plugin, works great as long as there is an existing internet connection. I got a homebridge crash if my router reboots.

[4.6.2020, 14:13:42] TypeError: Cannot read property 'statusCode' of undefined
    at /usr/local/lib/node_modules/homebridge-ewelink-max/index.js:1042:44
    at Object.parseBody (/usr/local/lib/node_modules/homebridge-ewelink-max/node_modules/request-json/main.js:74:12)
    at Request._callback (/usr/local/lib/node_modules/homebridge-ewelink-max/node_modules/request-json/main.js:148:26)
    at self.callback (/usr/local/lib/node_modules/homebridge-ewelink-max/node_modules/request/request.js:185:22)
    at Request.emit (events.js:198:13)
    at Request.onRequestError (/usr/local/lib/node_modules/homebridge-ewelink-max/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:198:13)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)

I had the same yesterday