Как я могу исправить ошибку при загрузке плагина Nest на Homebridge? - PullRequest
0 голосов
/ 19 февраля 2020

Я пытаюсь настроить Homebridge для работы с Nest на моей Ma c и постоянно получаю сообщение об ошибке.

 Plugin /usr/local/lib/node_modules/homebridge-nest requires Node version of >=7.0.0 which does not satisfy the current Node version of v6.10.2. You may need to upgrade your installation of Node.
[2/18/2020, 6:00:00 PM] ====================
[2/18/2020, 6:00:00 PM] ERROR LOADING PLUGIN homebridge-nest:
[2/18/2020, 6:00:00 PM] /usr/local/lib/node_modules/homebridge-nest/index.js:56
const setupConnection = async function(config, log, verbose, fieldTestMode) {
                              ^^^^^^^^
SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Plugin.load (/usr/local/lib/node_modules/homebridge/lib/plugin.js:72:23)
[2/18/2020, 6:00:00 PM] ====================
[2/18/2020, 6:00:00 PM] No plugins found. See the README for information on installing plugins.
[2/18/2020, 6:00:00 PM] Loading 1 platforms...
[2/18/2020, 6:00:00 PM] Error: The requested platform 'Nest' was not registered by any plugin.
    at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:134:13)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:327:45)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:90:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
[2/18/2020, 6:00:00 PM] Got SIGTERM, shutting down Homebridge...

Вот мой JSON

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

    "platforms": [{
        "platform": "Nest",
        "googleAuth": {
            "issueToken": "https://accounts.google.com/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6LQu-SMCQLMJfOUep6S7tCeWAUM8L_6c8Dj9GIeY0cxEn-AULk7yn0dkJoKv_z4wvzGJ0iZx-kcjZ5xj1DDwac1dZcAMQ&client_id=733249279899-44tchle2kaa9afr5v9ov7jbuojfr9lrq.apps.googleusercontent.com&origin=https%3A%2F%2Fhome.nest.com&scope=openid%20profile%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fnest-account&ss_domain=https%3A%2F%2Fhome.nest.com",
            "cookies": "OCAK=6Gpp3vMJ084YX0gCdqDvJIUJT_fuMNYTCT7_rh1HW4M; SMSV=ADHTe-CF5KNGkL2G5C-D-J7jayLLfOLnXqQ8iM49DXPJzfzGC85DSIomIevBu9eSR59A9iO9PD9XXJJ2Q5tgSHOF9bo1FxcZC5b61kL3SlR01SU5CfIy2ZU; SID=twfMk8v7apgTE2uaQkllsFsjNRrgAtyvyaajjpjLeWN9QdsxJqfAP1erwz5HO1-HmRYGCQ.; __Secure-3PSID=twfMk8v7apgTE2uaQkllsFsjNRrgAtyvyaajjpjLeWN9QdsxKoGkfGEJ94C93zJNyzMxpQ.; HSID=A94hWDWbaSapUnfOt; SSID=AzhVO612TBbX8F2Z8; APISID=b0lkl00NAukSkxOe/AeTGbbtfxT9cvIMXq; SAPISID=04x_3b-HiBwD5J_k/Ag0qa78QqtNQ0pCOm; __Secure-HSID=A94hWDWbaSapUnfOt; __Secure-SSID=AzhVO612TBbX8F2Z8; __Secure-APISID=b0lkl00NAukSkxOe/AeTGbbtfxT9cvIMXq; __Secure-3PAPISID=04x_3b-HiBwD5J_k/Ag0qa78QqtNQ0pCOm; NID=198=NzlWP3z4RF7pa3gqai_ztJ8flWV6_dU9oP5fgrpNQhBIMqAf51ZKAagFF8ETlcItUknpZ9AsUVl012gIupblk1SCBgxnG6k05pM2UDxn9ONeY9ueKL-urvoXp9XR50_kESyov-pasjLhR01u0e9LDaXfNpKKw2F1V_wIlJM4vMY; user_id=103767692665581163041; LSID=lso|s.youtube:twfMkwkwfPHTaBLxSR6mMRa5lNd7eXSe_D5m5QHx2iKyVB3D1NDkG7EFEBoMuP0hVzyewQ.; __Host-3PLSID=lso|s.youtube:twfMkwkwfPHTaBLxSR6mMRa5lNd7eXSe_D5m5QHx2iKyVB3D1S6nkK6M682tC3Nf9fjSNA.; ACCOUNT_CHOOSER=AFx_qI4_E36Uf9lo9tY8DPFcCiJpFJPE5lPHv9r9xlaMRUa-N-KcUurtozwzGhnyf02jtYjI8R116R2UListrLgt9l2eyv9JzZNUSJS-3bFqu0ZpbLU1lj3SWuQwbTGngn61PflZndBmUjcT-p0eFLawMycfomBNJA; GAPS=1:lhOINnCxGSGm4B478qHpnjWbU2riLRCyU2LtDUjn2kCo43nJCkLUqHZvluRDZwrGyLSkHI4UN5I2SJiBCdbkujIObPoXSA:w_aFiucAC1X6i6Bi; SIDCC=AN0-TYt38874bUgr7hY34-9EuPOU9gth7qFC8oHA4OtvtJRVsVf8gpdp1gb6Q6ugWUmuDUefaw",
            "apiKey": "AIzaSyAdkSIMNc51XGNEAYWasX9UOWkS5P6sZE4"
        }
    }]
}

Я пробовал:

  1. Удаление аксессуаров
  2. Повторная загрузка с помощью -g

Есть идеи, что здесь может происходить? Я искал несколько часов сейчас и не повезло.

...