pradeepmouli / homebridge-isy-js

Homebridge platform plugin for the ISY series of home controllers from Universal Devices.
MIT License
28 stars 9 forks source link

Elk alarm panel causes start failure #39

Open ndraper opened 3 years ago

ndraper commented 3 years ago

With elk devices enabled the plugin will fail to start with this error.

[1/10/2021, 5:39:50 PM] [ISY] New platform accessory needed (node:37961) UnhandledPromiseRejectionWarning: TypeError: this.addService is not a function at ISYElkAlarmPanelAccessory.setupServices (/usr/lib/node_modules/homebridge-isy/src/ISYElkAlarmPanelAccessory.ts:96:33) at ISYElkAlarmPanelAccessory.configure (/usr/lib/node_modules/homebridge-isy/src/ISYAccessory.ts:76:8) at /usr/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:330:20 at processTicksAndRejections (internal/process/task_queues.js:93:5) at ISYPlatform.createAccessories (/usr/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:236:3) at HomebridgeAPI. (/usr/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:69:4) (Use node --trace-warnings ... to show where the warning was created) (node:37961) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:37961) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

If I disable elk devices the plugin start and operates normally. I don't see anyone else having this issue perhaps I am doing something wrong any help is appreciated.

pradeepmouli commented 3 years ago

Thanks - I will take a look.

Sent from my iPhone

On Jan 10, 2021, at 12:44 PM, ndraper notifications@github.com wrote:

 With elk devices enabled the plugin will fail to start with this error.

[1/10/2021, 5:39:50 PM] [ISY] New platform accessory needed (node:37961) UnhandledPromiseRejectionWarning: TypeError: this.addService is not a function at ISYElkAlarmPanelAccessory.setupServices (/usr/lib/node_modules/homebridge-isy/src/ISYElkAlarmPanelAccessory.ts:96:33) at ISYElkAlarmPanelAccessory.configure (/usr/lib/node_modules/homebridge-isy/src/ISYAccessory.ts:76:8) at /usr/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:330:20 at processTicksAndRejections (internal/process/task_queues.js:93:5) at ISYPlatform.createAccessories (/usr/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:236:3) at HomebridgeAPI. (/usr/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:69:4) (Use node --trace-warnings ... to show where the warning was created) (node:37961) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:37961) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

If I disable elk devices the plugin start and operates normally. I don't see anyone else having this issue perhaps I am doing something wrong any help is appreciated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

legaultjm commented 2 years ago

I have the same outcome. My ISY has Zwave and Elk only. I know you don't support Zwave, but I was hoping the elk would show up. Default configuration.

[04/08/2021, 20:36:34] Homebridge v1.3.4 (Homebridge D3E7) is running on port 51204. [04/08/2021, 20:36:34] [ISY] platform config saved to : /var/lib/homebridge/effectiveConfig.json [04/08/2021, 20:36:34] [isy-nodejs] Error initializing ISY: {} [04/08/2021, 20:36:34] [isy-nodejs] Connecting to: ws://192.168.1.51/rest/subscribe [04/08/2021, 20:36:34] [ISY] Accessories to configure: 0 [04/08/2021, 20:36:34] [ISY] ISY has 0 devices and 0 scenes [04/08/2021, 20:36:34] [ISY] Filtered device list has: 1 devices [04/08/2021, 20:36:34] [ISY] New platform accessory needed (node:743) UnhandledPromiseRejectionWarning: TypeError: this.addService is not a function at ISYElkAlarmPanelAccessory.setupServices (/usr/local/lib/node_modules/homebridge-isy/src/ISYElkAlarmPanelAccessory.ts:96:33) at ISYElkAlarmPanelAccessory.configure (/usr/local/lib/node_modules/homebridge-isy/src/ISYAccessory.ts:76:8) at /usr/local/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:330:20 at processTicksAndRejections (internal/process/task_queues.js:95:5) at ISYPlatform.createAccessories (/usr/local/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:236:3) at HomebridgeAPI. (/usr/local/lib/node_modules/homebridge-isy/src/ISYPlatform.ts:69:4) (Use node --trace-warnings ... to show where the warning was created) (node:743) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:743) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [04/08/2021, 20:36:34] [isy-nodejs] Websocket subscription error: [object Object] [04/08/2021, 20:37:48] [isy-nodejs] Guardian: Detected no activity in more then 60 seconds. Reinitializing web sockets [04/08/2021, 20:37:48] [isy-nodejs] Connecting to: ws://192.168.1.51/rest/subscribe [04/08/2021, 20:37:48] [isy-nodejs] Websocket subscription error: [object Object] [04/08/2021, 20:39:48] [isy-nodejs] Guardian: Detected no activity in more then 60 seconds. Reinitializing web sockets [04/08/2021, 20:39:48] [isy-nodejs] Connecting to: ws://192.168.1.51/rest/subscribe [04/08/2021, 20:39:48] [isy-nodejs] Websocket subscription error: [object Object]