kuestess / homebridge-platform-insteonlocal

Homebridge platform plugin for local Insteon control
Other
76 stars 26 forks source link

Homebridge v1.5.0 broke Target Keypad LED? #273

Closed THX723 closed 1 year ago

THX723 commented 1 year ago

Homebridge have released v1.5.0 update. All appeared to be working, except for the Target Keypad LED function. In short, the device is turning on/off just fine, but its (defined) targeted keypad button(s) do not update, while throwing the following errors in the debug log:

[7/18/2022, 8:00:03 AM] [Insteon Local Platform] Command for Couch Light: false, time: 1658120655266, delta: 35748117 [7/18/2022, 8:00:03 AM] [Insteon Local Platform] Discard on for Couch Light already at commanded state [7/18/2022, 8:00:12 AM] [Insteon Local Platform] Command for Couch Light: true, time: 1658120655266, delta: 35757579 [7/18/2022, 8:00:13 AM] [Insteon Local Platform] Setting level of Couch Light to 100% [7/18/2022, 8:00:17 AM] [Insteon Local Platform] Couch Light is on at 100% [7/18/2022, 8:00:17 AM] [Insteon Local Platform] 2 target keypad(s) found for Couch Light [7/18/2022, 8:00:17 AM] [Insteon Local Platform] targetKeypadID[0] = [525C89] [7/18/2022, 8:00:17 AM] [Insteon Local Platform] targetKeypadID[1] = [4219FD] (node:23646) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'call' of undefined at /homebridge/node_modules/homebridge-platform-insteonlocal/src/InsteonLocalAccessory.ts:690:88 at new Promise (<anonymous>) at run (/homebridge/node_modules/homebridge-platform-insteonlocal/src/InsteonLocalAccessory.ts:690:31) at /homebridge/node_modules/homebridge-platform-insteonlocal/src/InsteonLocalAccessory.ts:695:13 at /homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/q/q.js:2055:17 at runSingle (/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/q/q.js:137:13) at flush (/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/q/q.js:125:13) at processTicksAndRejections (internal/process/task_queues.js:77:11) (node:23646) 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: 23) (node:23646) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'call' of undefined

I haven't had time to look into this, but just reporting here and also confirming if anyone else have observed the same.

Potential causes is from the newer HAPNode.js update that came with the HB v1.5.0 update. As a point of reference, my HB is currently on Node.js v14.17.3.

kuestess commented 1 year ago

@THX723 I'm dumb. I inadvertantly left the setTargetKeypadBtn function out of the port. Fix incoming.

kuestess commented 1 year ago

@THX723 Fix now live in 0.5.1.

THX723 commented 1 year ago

@kuestess Ah a much better outcome than I was expecting. :D I was dreading having to debug and remember what I did back then with that portion of the code. Thanks for all you do!