JeroenVdb / homebridge-daikin-cloud

This Homebrige plugin connects to the Daikin Cloud and loads all your devices to be controled via Homebridge and Homekit.
https://www.npmjs.com/package/homebridge-daikin-cloud
Apache License 2.0
38 stars 11 forks source link

server.closeAllConnections is not a function #62

Closed fabiovit closed 2 months ago

fabiovit commented 2 months ago

Describe Your Problem: After having performed the correct configuration and having received authorization from daikin (Please navigate to https://192.168.0.4:51827 to start the authorization flow. If it is the first time you open this url you will need to accept a security warning.) you receive this error:

04/07/2024, 14:05:28Daikin Cloud BridgeERRORTypeError: server.closeAllConnections is not a function at cleanup (/var/lib/hoobs/daikincloudbridge/node_modules/daikin-controller-cloud/src/onecta/oidc-callback-server.ts:44:20) at Timeout.onTimeout [as _onTimeout] (/var/lib/hoobs/daikincloudbridge/node_modules/daikin-controller-cloud/src/onecta/oidc-callback-server.ts:51:13) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7)


{
    "accessories": [],
    "platforms": [
        {
            "platform": "DaikinCloud",
            "clientId": "xxxx",
            "clientSecret": "xxxx",
            "callbackServerExternalAddress": "192.168.0.4",
            "callbackServerPort": "51827",
            "showExtraFeatures": true
        }
    ]
}
jacoscaz commented 2 months ago

@fabiovit which version of node are you using?

fabiovit commented 2 months ago

@jacoscaz 16.20.2

jacoscaz commented 2 months ago

@fabiovit consider upgrading at least to the latest 18.x as the current maintenance LTS. Version 16.x is not maintained anymore and, while homebridge makes it easy not to notice, this library requires at least version 18.19.

fabiovit commented 2 months ago

@jacoscaz thanks! I'll try this evening.

Tom5640 commented 2 months ago

@fabiovit I also have this, after successful authentication. I am also using hoobs like you, did you ever manage to resolve?

fabiovit commented 2 months ago

@Tom5640 @jacoscaz We need to update the node js but I can't from the terminal. In the next few days I will be abandoning Hoobs in favor of HomeBridge.

jacoscaz commented 2 months ago

@Tom5640 this error comes from running on an old version of Node.js. Consider asking HOOBS about whether and how you can update to a maintained version. There's quite a lot of articles and posts about updating Node.js out there but a) most of them are more than one year old and b) I wouldn't suggest doing so unless specifically indicated by HOOBS themselves.

Tom5640 commented 2 months ago

Thanks for your help @jacoscaz on both queries - I will investigate updating Node.js. Best Wishes.

JeroenVdb commented 2 months ago

@Tom5640 @fabiovit I'm going to close this one for now as the problem or solution does not lie with this plugin. If you would find a way to update your node version or you get a response from Hoobs, please let me know so we can add it to some FAQ section for other users.