balansse / homebridge-vivint

Integrates Vivint security system with Apple Home
Other
45 stars 15 forks source link

Slow Response Automations #59

Closed jcharnet closed 2 years ago

jcharnet commented 2 years ago

Seems like the slow response for automations based on this plugin is back. I have automations when the door opens at night turn on the lights. And it used to be instantly, now it’s taking 30 seconds or more.

Here’s the log error: balansse/homebridge-vivint] Error getting system info: RequestError: Error: read ETIMEDOUT at new RequestError (/usr/local/lib/node_modules/@balansse/homebridge-vivint/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/usr/local/lib/node_modules/@balansse/homebridge-vivint/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/@balansse/homebridge-vivint/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/usr/local/lib/node_modules/@balansse/homebridge-vivint/node_modules/request/request.js:185:22) at Request.emit (node:events:390:28) at Request.onRequestError (/usr/local/lib/node_modules/@balansse/homebridge-vivint/node_modules/request/request.js:877:8) at ClientRequest.emit (node:events:390:28) at TLSSocket.socketErrorListener (node:_http_client:447:9) at TLSSocket.emit (node:events:390:28) at emitErrorNT (node:internal/streams/destroy:157:8) { cause: Error: read ETIMEDOUT at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20) { errno: -110, code: 'ETIMEDOUT', syscall: 'read' }, error: Error: read ETIMEDOUT at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20) { errno: -110, code: 'ETIMEDOUT', syscall: 'read' }, options: { url: 'https://www.vivintsky.com/api/systems/569204323635984', headers: { Cookie: '', 'Cache-Control': 'no-store' }, callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: undefined }

jgrimard commented 2 years ago

Don't post your login cookie. Anyone can use it to log in to your vivint account.

balansse commented 2 years ago

I just published a 1.6.1 release that should make it better. Please update and let me know!

jcharnet commented 2 years ago

Just updated and did some tests. Seems all good, but I’ll keep an eye out and let you know otherwise. Thank you so much. would you mind sharing what might have been the problem?

balansse commented 2 years ago

I'm glad it works good now! There was a new type of message coming from Vivint API that wasn't properly handled breaking down the event subscription.