homebridge-fibaro-home-center icon indicating copy to clipboard operation
homebridge-fibaro-home-center copied to clipboard

(node:13567) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.

Open lboue opened this issue 2 years ago • 2 comments

Hello,

I am getting this error on the log file: (node:13567) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.

[8/30/2022, 6:43:59 AM] [Fibaro-HC2] Getting value from device:  179  parameter: Leak Detected
[8/30/2022, 6:43:59 AM] [Fibaro-HC2] Getting value from device:  179  parameter: Status Low Battery
[8/30/2022, 6:43:59 AM] [Fibaro-HC2] Getting value from device:  179  parameter: Status Low Battery
[8/30/2022, 6:43:59 AM] [Fibaro-HC2] Getting value from device:  179  parameter: Battery Level
[8/30/2022, 6:43:59 AM] [Fibaro-HC2] Getting value from device:  179  parameter: Battery Level
[8/30/2022, 6:43:59 AM] [Fibaro-HC2] Getting value from device:  179  parameter: Charging State
[8/30/2022, 6:43:59 AM] [Fibaro-HC2] Getting value from device:  179  parameter: Charging State
(node:13567) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:7:13
    at FibaroAccessory.getCharacteristicValue (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:440:9)
    at StatusLowBattery.<anonymous> (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:331:16)
    at StatusLowBattery.emit (events.js:387:35)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1592:14
    at new Promise (<anonymous>)
    at StatusLowBattery.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1590:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75
(node:13567) 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: 36)
(node:13567) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:7:13
    at FibaroAccessory.getCharacteristicValue (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:440:9)
    at BatteryLevel.<anonymous> (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:331:16)
    at BatteryLevel.emit (events.js:387:35)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1592:14
    at new Promise (<anonymous>)
    at BatteryLevel.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1590:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75
(node:13567) 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: 37)
(node:13567) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:7:13
    at FibaroAccessory.getCharacteristicValue (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:440:9)
    at ChargingState.<anonymous> (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:331:16)
    at ChargingState.emit (events.js:387:35)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1592:14
    at new Promise (<anonymous>)
    at ChargingState.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1590:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75
(node:13567) 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: 38)****

Could you help me to fix it?

Regards Ludovic

lboue avatar Aug 30 '22 04:08 lboue

I am still having the callback issue with homebridge-fibaro-home-center v1.2.14:

[9/14/2022, 10:00:05 PM] ---
[9/14/2022, 10:00:05 PM] Loaded plugin: [email protected]
[9/14/2022, 10:00:05 PM] Registering platform 'homebridge-fibaro-home-center.FibaroHC'
[9/14/2022, 10:00:05 PM] ---

9/14/2022, 10:00:58 PM] [Fibaro-HC2] Getting value from device:  179  parameter: Leak Detected
[9/14/2022, 10:00:58 PM] [Fibaro-HC2] Getting value from device:  179  parameter: Status Low Battery
[9/14/2022, 10:00:58 PM] [Fibaro-HC2] Getting value from device:  179  parameter: Status Low Battery
[9/14/2022, 10:00:58 PM] [Fibaro-HC2] Getting value from device:  181  parameter: Current Temperature
(node:31715) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:7:13
    at FibaroAccessory.getCharacteristicValue (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:401:7)
    at StatusLowBattery.<anonymous> (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:378:16)
    at StatusLowBattery.emit (events.js:387:35)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1592:14
    at new Promise (<anonymous>)
    at StatusLowBattery.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1590:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75
(node:31715) 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: 7)

lboue avatar Sep 14 '22 20:09 lboue

@lboue ok, more clear now.

ilcato avatar Sep 14 '22 20:09 ilcato

Hello, I am having this issue as well. What was the solution?

Thanks :)

[7/25/2023, 6:42:10 AM] [FibaroHC] Getting value from device: 514 parameter: On [7/25/2023, 6:42:10 AM] [FibaroHC] Getting value from device: 514 parameter: Brightness [7/25/2023, 6:42:10 AM] [FibaroHC] Getting value from device: 555 parameter: On [7/25/2023, 6:42:10 AM] [FibaroHC] Getting value from device: 556 parameter: On [7/25/2023, 6:42:10 AM] [FibaroHC] Getting value from device: 195 parameter: On [7/25/2023, 6:42:10 AM] Error: This callback function has already been called by someone else; it can only be called one time. at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:12:13 at FibaroAccessory.getCharacteristicValue (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:419:5) at On. (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:396:14) at On.emit (node:events:525:35) at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2463:14 at new Promise () at On. (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2461:12) at step (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:195:27) at Object.next (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:176:57) at /homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:169:75 [7/25/2023, 6:42:10 AM] Error: This callback function has already been called by someone else; it can only be called one time. at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:12:13 at FibaroAccessory.getCharacteristicValue (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:419:5) at Brightness. (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:396:14) at Brightness.emit (node:events:525:35) at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2463:14 at new Promise () at Brightness. (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2461:12) at step (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:195:27) at Object.next (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:176:57) at /homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:169:75

crescentit avatar Jul 25 '23 04:07 crescentit

I have the same problem: My Log:

/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:421 callback(undefined, characteristic.value); ^ Error: This callback function has already been called by someone else; it can only be called one time. at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:12:13 at FibaroAccessory.getCharacteristicValue (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:421:5) at On. (/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:396:14) at On.emit (node:events:525:35) at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2463:14 at new Promise () at On. (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2461:12) at step (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:195:27) at Object.next (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:176:57) at /homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:169:75

How can I fix it? I tried all I know

javierivi avatar Nov 13 '23 21:11 javierivi

@javierivi , @crescentit please use different names for different devices in the same room.

ilcato avatar Dec 28 '23 14:12 ilcato