KraigM / homebridge-nest

Nest plugin for HomeBridge
210 stars 72 forks source link

set up problems with token #118

Open FuckThisAlias opened 7 years ago

FuckThisAlias commented 7 years ago

works up until i add the token terminal gives me error [2/10/2017, 8:43:35 PM] Error: You did not specify {'token'} or {'clientId','clientSecret','code'}, one set of which is required for the new API

works fine with {'clientId','clientSecret','code'} just have to get a new code every time i restart homebridge using {'token'} only results in this

Robs-Mac-mini:~ Rob$ homebridge [2/10/2017, 8:43:34 PM] Loaded plugin: homebridge-hs100 [2/10/2017, 8:43:34 PM] Registering platform 'homebridge-hs100.Hs100' [2/10/2017, 8:43:34 PM] --- [2/10/2017, 8:43:35 PM] Loaded plugin: homebridge-nest [2/10/2017, 8:43:35 PM] Registering platform 'homebridge-nest.Nest' [2/10/2017, 8:43:35 PM] --- [2/10/2017, 8:43:35 PM] Loaded plugin: homebridge-platform-wemo [2/10/2017, 8:43:35 PM] Registering platform 'homebridge-platform-wemo.BelkinWeMo' [2/10/2017, 8:43:35 PM] --- [2/10/2017, 8:43:35 PM] Loaded config.json with 0 accessories and 3 platforms. [2/10/2017, 8:43:35 PM] --- [2/10/2017, 8:43:35 PM] Loading 3 platforms... [2/10/2017, 8:43:35 PM] [WeMo Platform] Initializing BelkinWeMo platform... [2/10/2017, 8:43:35 PM] Initializing Hs100 platform... [2/10/2017, 8:43:35 PM] Initializing Nest platform... [2/10/2017, 8:43:35 PM] Fetching Nest devices. [2/10/2017, 8:43:35 PM] Error: You did not specify {'token'} or {'clientId','clientSecret','code'}, one set of which is required for the new API at /usr/local/lib/node_modules/homebridge-nest/index.js:80:11 at setupConnection (/usr/local/lib/node_modules/homebridge-nest/index.js:64:9) at Object.accessories (/usr/local/lib/node_modules/homebridge-nest/index.js:143:3) at Server._loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:354:20) at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:298:16) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:80:36) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/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) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3 Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[2/10/2017, 8:43:36 PM] Homebridge is running on port 51826. [2/10/2017, 8:43:36 PM] New Plug Online: Bedroom Fan [80063CDF4AF96BB292EF30CCDC4D3B0217C54F6F] [2/10/2017, 8:43:36 PM] Configuring: Bedroom Fan [2/10/2017, 8:43:36 PM] New Plug Online: Bedroom Lamp [800607A5F4F699A19F8C47E41C4DB21117C605AC] [2/10/2017, 8:43:36 PM] Configuring: Bedroom Lamp [2/10/2017, 8:43:36 PM] New Plug Online: Living Room Lamp [800661E21A1457D87459D201870BC89C17C75965] [2/10/2017, 8:43:36 PM] Configuring: Living Room Lamp [2/10/2017, 8:43:36 PM] [WeMo Platform] Online: bedroom [B4750E8FABFC] [2/10/2017, 8:44:06 PM] Online: Bedroom Lamp [800607A5F4F699A19F8C47E41C4DB21117C605AC] [2/10/2017, 8:44:06 PM] Online: Bedroom Fan [80063CDF4AF96BB292EF30CCDC4D3B0217C54F6F] [2/10/2017, 8:44:36 PM] Online: Bedroom Lamp [800607A5F4F699A19F8C47E41C4DB21117C605AC] [2/10/2017, 8:44:36 PM] Online: Bedroom Fan [80063CDF4AF96BB292EF30CCDC4D3B0217C54F6F] [2/10/2017, 8:44:36 PM] Online: Living Room Lamp [800661E21A1457D87459D201870BC89C17C75965] [2/10/2017, 8:45:06 PM] Online: Bedroom Fan [80063CDF4AF96BB292EF30CCDC4D3B0217C54F6F] [2/10/2017, 8:45:06 PM] Online: Bedroom Lamp [800607A5F4F699A19F8C47E41C4DB21117C605AC] [2/10/2017, 8:45:06 PM] Online: Living Room Lamp [800661E21A1457D87459D201870BC89C17C75965]

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

"platforms": [
    {
        "platform": "BelkinWeMo",
        "name": "WeMo Platform",
        "Expected_Accessories": "1"

    },
    {
        "platform": "Hs100"

    },
    {
          "platform": "Nest",
        "Token": "c.t2ScRd7eKbjufzLDqUD1rYdygzyYQEaeeBsVoxbfxckKeME5jieKy5I2rqkGhnfMyUHSLWvHk2hwtCoyxVBFRUZczlUjkRSZq8D79GD6lR1oGYCm3s29hhB9jHgkFMVYFbIyrzBhLIotn940"

    }
]

}

affrae commented 7 years ago

@stevens-r have you tried setting "Token" to be lower case

    {
          "platform": "Nest",
        "Token": "c.t2ScRd7eKbjufzLDqUD1rYdygzyYQEaeeBsVoxbfxckKeME5jieKy5I2rqkGhnfMyUHSLWvHk2hwtCoyxVBFRUZczlUjkRSZq8D79GD6lR1oGYCm3s29hhB9jHgkFMVYFbIyrzBhLIotn940"

    }

should be

    {
    "platform": "Nest",
        "token": "c.t2ScRd7eKbjufzLDqUD1rYdygzyYQEaeeBsVoxbfxckKeME5jieKy5I2rqkGhnfMyUHSLWvHk2hwtCoyxVBFRUZczlUjkRSZq8D79GD6lR1oGYCm3s29hhB9jHgkFMVYFbIyrzBhLIotn940"
    }

Hope this helps,

@affrae 👾

toogle9 commented 7 years ago

I too am having a problem, the only way I can connect is with username/password for the legacy api.

I have followed the instructions, twice. Generated a product, set permissions (although permissions appear to have changed since the instructions), received a product id and secret, visited the auth url and received code, inserted those into the config file and started homebridge and received a token. But everytime I put the token in the config file, homebridge will not start it just sits at "Fetching Nest devices". If I remove all the token/clientid/clientsecret/code parameters and leave just username and password, it will generate an error that I did not specify token or clientid/secret/code, but will fall back to the legacy API.

Everything appears to be correct in the config file. Has something changed on the Nest end that isn't working with homebridge except for the legacy API?