homebridge-simplisafe3: Plug-in crashes Home bridge when trying to view camera feed
Describe The Bug:
It seems the snapshot request crashes the plugin when I view/switch cameras
[01/01/2021, 16:42:32] [Home Alarm] An error occurred while making snapshot request:
[01/01/2021, 16:42:32] Error: This callback function has already been called by someone else; it can only be called one time.
at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
at /usr/lib/node_modules/homebridge-simplisafe3/accessories/simplicam.js:276:9
at Request. (/usr/lib/node_modules/homebridge-simplisafe3/node_modules/jpeg-extract/index.js:14:18)
at Request.emit (node:events:376:20)
at IncomingMessage. (/usr/lib/node_modules/homebridge-simplisafe3/node_modules/request/request.js:1079:12)
at IncomingMessage.emit (node:events:376:20)
at emitErrorNT (node:internal/streams/destroy:188:8)
at emitErrorCloseNT (node:internal/streams/destroy:153:3)
at processTicksAndRejections (node:internal/process/task_queues:80:21)
[01/01/2021, 16:42:32] Got SIGTERM, shutting down Homebridge...
To Reproduce:
got 2 simplicams setup on my account; one door bell and one regular simplicam in the backyard configured camera for rpi hw acceleration, Restarted HB, Opened feed, Switched source from e.g. backyard cam to front door cam or vice versa observe crash of plugin
Expected behavior:
not crashing
Environment:
- Plugin version: v1.6.15
- Node.js Version: v15.5.0
- NPM Version: 7.3.0
- Homebridge Version: v1.1.7
- Operating System: Raspbian GNU/Linux Buster (10)
Homebridge Config:
{
"name": "Home Alarm",
"auth": {
"username": "",
"password": ""
},
"cameras": true,
"sensorRefresh": 15,
"persistAccessories": true,
"resetSimpliSafeId": false,
"cameraOptions": {
"enableHwaccelRpi": true
},
"platform": "homebridge-simplisafe3.SimpliSafe 3"
}
Screenshots:
Logs:
Link to logs
[01/01/2021, 18:33:08] Homebridge is running on port 51541.
[01/01/2021, 18:33:19] [Home Alarm] Motion Sensor 'Family Room' requires secret alerts to be enabled in SimpliSafe before you can add it to Homebridge.
[01/01/2021, 18:33:20] [Home Alarm] Motion Sensor 'Family Room' requires secret alerts to be enabled in SimpliSafe before you can add it to Homebridge.
[01/01/2021, 18:33:37] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:33:58] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:34:21] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:34:22] [Home Alarm] An error occurred while making snapshot request:
[01/01/2021, 18:34:22] [Home Alarm] Error: aborted
at connResetException (node:internal/errors:631:14)
at TLSSocket.socketCloseListener (node:_http_client:434:19)
at TLSSocket.emit (node:events:388:22)
at node:net:666:12
at TCP.done (node:_tls_wrap:573:7) {
code: 'ECONNRESET'
}
[01/01/2021, 18:34:22] Error: This callback function has already been called by someone else; it can only be called one time.
at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
at /usr/lib/node_modules/homebridge-simplisafe3/accessories/simplicam.js:276:9
at Request.<anonymous> (/usr/lib/node_modules/homebridge-simplisafe3/node_modules/jpeg-extract/index.js:14:18)
at Request.emit (node:events:376:20)
at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-simplisafe3/node_modules/request/request.js:1079:12)
at IncomingMessage.emit (node:events:376:20)
at emitErrorNT (node:internal/streams/destroy:188:8)
at emitErrorCloseNT (node:internal/streams/destroy:153:3)
at processTicksAndRejections (node:internal/process/task_queues:80:21)
[01/01/2021, 18:34:22] Got SIGTERM, shutting down Homebridge...
[01/01/2021, 18:34:27] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[01/01/2021, 18:34:32] [HB Supervisor] Restarting Homebridge...
[01/01/2021, 18:35:04] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:35:26] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:35:48] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:36:13] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:36:38] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:37:03] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:37:28] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:31] [Home Alarm] Sensor refresh received an error from the SimpliSafe API: "Unknown Error Type": No message provided
[01/01/2021, 18:37:31] [Home Alarm] <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
[01/01/2021, 18:37:53] [Home Alarm] SSAPI socket connect_error: timeout
[01/01/2021, 18:38:08] [Home Alarm] An error occurred while making snapshot request:
[01/01/2021, 18:38:08] [Home Alarm] Error: aborted
at connResetException (node:internal/errors:631:14)
at TLSSocket.socketCloseListener (node:_http_client:434:19)
at TLSSocket.emit (node:events:388:22)
at node:net:666:12
at TCP.done (node:_tls_wrap:573:7) {
code: 'ECONNRESET'
}
[01/01/2021, 18:38:08] Error: This callback function has already been called by someone else; it can only be called one time.
at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
at /usr/lib/node_modules/homebridge-simplisafe3/accessories/simplicam.js:276:9
at Request.<anonymous> (/usr/lib/node_modules/homebridge-simplisafe3/node_modules/jpeg-extract/index.js:14:18)
at Request.emit (node:events:376:20)
at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-simplisafe3/node_modules/request/request.js:1079:12)
at IncomingMessage.emit (node:events:376:20)
at emitErrorNT (node:internal/streams/destroy:188:8)
at emitErrorCloseNT (node:internal/streams/destroy:153:3)
at processTicksAndRejections (node:internal/process/task_queues:80:21)
[01/01/2021, 18:38:08] Got SIGTERM, shutting down Homebridge...
[01/01/2021, 18:38:13] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 30
Commits related to this issue
- Change jpegExtract to promise format See issue #172 — committed to homebridge-simplisafe3/homebridge-simplisafe3 by shamoon 3 years ago
Can you look to see if this helps you too: https://github.com/homebridge-simplisafe3/homebridge-simplisafe3/discussions/173#discussioncomment-256936