node-red-contrib-homekit-bridged: Error: This callback function has already been called by someone else...

Hello guys,

thank you very much for the large progress you have made with version 0.6.0. I’m really exited how linked services work now. Right now the only issue I have with that is I got a lot of this message in my node-red-log:

18 Mar 14:35:26 - [error] [homekit-service:XXXXX-XXXX-temp] Error: This callback function has already been called by someone else; it can only be called one time.

It looks like this is cause by re-deploying modified flows on node-red but I haven’t figured out right now if this is based on changes on node-red-contrib-homekit-bridged-nodes or on changes of any other nodes as well.

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 20 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Please update to new version 0.6.1 using node-red. Then please retest this bug if it’s still occurs.

I’ll look at it

My log after redeploy node:

19 Mar 02:12:55 - [info] Starting modified flows
19 Mar 02:12:55 - [info] Started modified flows
19 Mar 02:13:07 - [red] Uncaught Exception:
19 Mar 02:13:07 - Error: This callback function has already been called by someone else; it can only be called one time.
    at /home/pi/.node-red/node_modules/hap-nodejs/lib/util/once.js:12:13
    at Characteristic.TargetPosition.<anonymous> (/home/pi/.node-red/node_modules/node-red-contrib-homekit-bridged/lib/utils/CharacteristicUtils.js:47:25)
    at emitThree (events.js:141:20)
    at Characteristic.TargetPosition.emit (events.js:217:7)
    at Characteristic.TargetPosition.Characteristic.getValue (/home/pi/.node-red/node_modules/hap-nodejs/lib/Characteristic.js:164:10)
    at Bridge.<anonymous> (/home/pi/.node-red/node_modules/hap-nodejs/lib/Accessory.js:762:20)
    at Array.forEach (<anonymous>)
    at Bridge.Accessory._handleGetCharacteristics (/home/pi/.node-red/node_modules/hap-nodejs/lib/Accessory.js:726:8)
    at emitMany (events.js:147:13)
    at HAPServer.emit (events.js:224:7)
    at HAPServer._handleCharacteristics (/home/pi/.node-red/node_modules/hap-nodejs/lib/HAPServer.js:926:10)
    at HAPServer.<anonymous> (/home/pi/.node-red/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
    at emitNone (events.js:106:13)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)

and then node-red stops

My flow is:

[{"id":"9c3a35ec.e9439","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"41f12712.256b7","type":"homekit-service","z":"9c3a35ec.e9439","isParent":true,"bridge":"34d1ed3.82cca12","parentService":"","name":"Калитка","serviceName":"Door","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","characteristicProperties":"","x":580,"y":60,"wires":[["aab31409.9545f"]]},{"id":"52097f82.de13e","type":"inject","z":"9c3a35ec.e9439","name":"Открыто","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":60,"wires":[["eeea4e5d.2383d"]]},{"id":"3bcb3f2e.2120d8","type":"inject","z":"9c3a35ec.e9439","name":"Закрыто","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":120,"wires":[["1c3f73da.3823a4"]]},{"id":"eeea4e5d.2383d","type":"template","z":"9c3a35ec.e9439","name":"Convert to JSON","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\n\"CurrentPosition\": \"100\"\n}","output":"json","x":330,"y":60,"wires":[["41f12712.256b7"]]},{"id":"1c3f73da.3823a4","type":"template","z":"9c3a35ec.e9439","name":"Convert to JSON","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\n\"CurrentPosition\": \"0\"\n}","output":"json","x":330,"y":120,"wires":[["41f12712.256b7"]]},{"id":"aab31409.9545f","type":"debug","z":"9c3a35ec.e9439","name":"2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":770,"y":60,"wires":[]},{"id":"34d1ed3.82cca12","type":"homekit-bridge","z":"","bridgeName":"Virtual Homebridge","pinCode":"111-11-111","port":"","allowInsecureRequest":false,"manufacturer":"Fer","model":"Virtual Homebridge","serialNo":"SN 111-11-111"}]