gormanb / homebridge-hivehome-control

Homebridge plugin to expose Hive Home features that are not natively available in Homekit; currently, this includes Hot Water and Heating Boost functions.
Apache License 2.0
1 stars 0 forks source link

Unable to locate SRC folder #3

Closed mehtaman closed 2 months ago

mehtaman commented 5 months ago

Describe Your Problem: Plugin failing to start properly, logs show the src folder is missing:

Logs:

** Error in exception handler ** Error: ENOENT: no such file or directory, open '/var/lib/homebridge/node_modules/homebridge-hivehome-control/src/hivehome/hive-helpers.ts'
    at Object.readFileSync (node:fs:457:20)
    at processJSStacktrace (/var/lib/homebridge/node_modules/homebridge-hivehome-control/node_modules/pythonia/src/pythonia/errors.js:68:25)
    at Object.getErrorMessage (/var/lib/homebridge/node_modules/homebridge-hivehome-control/node_modules/pythonia/src/pythonia/errors.js:83:24)
    at new PythonException (/var/lib/homebridge/node_modules/homebridge-hivehome-control/node_modules/pythonia/src/pythonia/Bridge.js:21:25)
    at Bridge.call (/var/lib/homebridge/node_modules/homebridge-hivehome-control/node_modules/pythonia/src/pythonia/Bridge.js:251:37)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at startHiveSession (/var/lib/homebridge/node_modules/homebridge-hivehome-control/src/hivehome/hive-helpers.ts:33:17)
    at HiveHomeControllerPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-hivehome-control/src/platform.ts:111:25) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/var/lib/homebridge/node_modules/homebridge-hivehome-control/src/hivehome/hive-helpers.ts'
}
** JavaScript Stacktrace **
    at Bridge.call (/var/lib/homebridge/node_modules/homebridge-hivehome-control/node_modules/pythonia/src/pythonia/Bridge.js:251:37)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at startHiveSession (/var/lib/homebridge/node_modules/homebridge-hivehome-control/src/hivehome/hive-helpers.ts:33:17)
    at HiveHomeControllerPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-hivehome-control/src/platform.ts:111:25)
** Python Stacktrace **
Traceback (most recent call last):
  File "/var/lib/homebridge/node_modules/homebridge-hivehome-control/node_modules/pythonia/src/pythonia/Bridge.py", line 365, in onMessage
    return getattr(self, action)(r, ffid, key, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/homebridge/node_modules/homebridge-hivehome-control/node_modules/pythonia/src/pythonia/Bridge.py", line 338, in pcall
    self.call(r, ffid, key, pargs, kwargs or {})
  File "/var/lib/homebridge/node_modules/homebridge-hivehome-control/node_modules/pythonia/src/pythonia/Bridge.py", line 198, in call
    v = v(*args, **kwargs)
        ^^^^^^^^^^^^^^^^^^
  File "/var/lib/homebridge/.local/lib/python3.11/site-packages/pyhiveapi/session.py", line 239, in login
    if "AuthenticationResult" in result:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^
[PythonException [Error]]
Node.js v20.12.2
**Plugin Config:**
{
    "hiveUsername": "@.com",
    "hivePassword": "!",
    "deviceGroupKey": "-",
    "deviceKey": "eu",
    "devicePassword": "==",
    "hotWaterBoostMins": 60,
    "heatingBoostMins": 60,
    "heatingBoostTemp": 21,
    "enableDebugLog": true,
    "_bridge": {
        "username": "0E:FA:D1:72:98:96",
        "port": 57842
    },
    "platform": "HiveHomeController"
}

Screenshots:

image

Environment:

mehtaman commented 5 months ago

Install method Homebridge dashboard > Plugin Page > Search for Hive > Click download on this plug

When I first tried to install the plugin I saw the error below: error: externally-managed-environment

I ran this to get past the error: sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED

gormanb commented 4 months ago

Hi @mehtaman! I've just published a new beta version 1.0.3-beta.1, which manages its python packages internally and should therefore avoid hitting the externally-managed-environment error without you having to do anything.

I'm not sure why you're seeing ENOENT exceptions regarding src being absent; packages installed by npm, including homebridge-hivehome-control typically don't have a src folder. I'd suggest completely uninstalling the plugin and then installing 1.0.3-beta.1 instead to see if that works. You can also run the 2FA setup script with the new beta version as follows:

npx homebridge-hivehome-control@1.0.3-beta.1
gormanb commented 4 months ago

Hey @mehtaman, did the beta version solve your problem?

gormanb commented 3 months ago

@mehtaman: I've promoted the beta to a full v1.0.3 release. Let me know if installing this version resolved the exception you were hitting.

gormanb commented 2 months ago

Closing out this issue - if you're still having problems, please feel free to reopen it or file a new report!