gadget-monk / homebridge-poolcontroller

Homebridge plugin for Pentair pools
6 stars 4 forks source link

Plugin isn't working #12

Closed spifftek70 closed 1 year ago

spifftek70 commented 1 year ago

I get the following in my logs indicating an error:

(node:45226) UnhandledPromiseRejectionWarning: TypeError: axios is not a function
    at PoolControllerPlatform.execute (/usr/local/lib/node_modules/homebridge-poolcontroller/index.js:701:25)
    at PoolControllerPlatform.validateVersion (/usr/local/lib/node_modules/homebridge-poolcontroller/index.js:125:23)
    at PoolControllerPlatform.SSDPDiscovery (/usr/local/lib/node_modules/homebridge-poolcontroller/index.js:113:14)
    at HomebridgeAPI.emit (events.js:400:28)
    at HomebridgeAPI.signalFinished (/usr/local/lib/node_modules/homebridge/src/api.ts:275:10)
    at ChildBridgeFork.startBridge (/usr/local/lib/node_modules/homebridge/src/childBridgeFork.ts:189:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:45226) 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: 2)
(node:45226) [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.
dustin141 commented 1 year ago

I am getting the same error in Homebridge as well.

[10/27/2022, 8:52:55 AM] TypeError: axios is not a function at PoolControllerPlatform.execute (/usr/lib/node_modules/homebridge-poolcontroller/index.js:701:25) at PoolControllerPlatform.validateVersion (/usr/lib/node_modules/homebridge-poolcontroller/index.js:125:23) at PoolControllerPlatform.SSDPDiscovery (/usr/lib/node_modules/homebridge-poolcontroller/index.js:113:14) at HomebridgeAPI.emit (node:events:525:35) at HomebridgeAPI.signalFinished (/usr/lib/node_modules/homebridge/src/api.ts:275:10) at Server.start (/usr/lib/node_modules/homebridge/src/server.ts:190:14) [10/27/2022, 8:52:55 AM] Got SIGTERM, shutting down Homebridge...

dustin141 commented 1 year ago

@spifftek70 did you ever get this to work? I have tried different versions of NodeJS and this plugin and no luck. I am not sure what changed to break it, it was working fine for me for more than a year. When I was using v18 of Node the error completely shut down Homebridge, I tried reverting to v14 and I get the same error as you, it doesn't break Homebridge completely, but the plugin is not working. Any ideas @gadget-monk ?

gadget-monk commented 1 year ago

I must have missed the issue posted earlier. Axios is one of the HTTP client library used by the plugin so seems like a dependencies issue. Will take a look at it later today.

gadget-monk commented 1 year ago

I tried the plugin with node v18.12.1 and the latest version of homebridge and not able to reproduce this error. did you manually download the plugin? If so, did you run npm i to install dependencies?

spifftek70 commented 1 year ago

It's working now.... mostly. New issue that I'll open a new ticket for.