homebridge-nest
homebridge-nest copied to clipboard
Issues issuing new token for homebridge nest - HELP
HELP!!! I have been at this for HOURS with no success... Here is my config.json file however when I run homebridge it gives me this!
If I put a random "token" in from the internet it works except all of my nest products do not respond and they are "offline"
Even if i take out "token, clientID, ClientSecret, Code" it still gives me the same error.. PLEASE HELP ME
{ "bridge": { "username": "CC:22:33:XX:XX:XX", "name": "Homebridge2", "port": "51826", "pin": "521-XX-XXX" }, "platforms": [{ "platform": "Nest", "token": "", "ClientID": "a5942013-3580-473e-b1d7-XXXXXXXXXXXX", "ClientSecret": "1FAgafFh3XKXXXXXXXXXXXXXX", "Code": "XXXXXXXX", "username": "Username", "password": "Password" }] }
Error from HomeBridge Run:
C:\Users\User>homebridge
[2018-7-3 01:17:51] Loaded config.json with 0 accessories and 1 platforms.
[2018-7-3 01:17:51] ---
[2018-7-3 01:17:51] Loaded plugin: homebridge-nest
[2018-7-3 01:17:51] Registering platform 'homebridge-nest.Nest'
[2018-7-3 01:17:51] ---
[2018-7-3 01:17:51] Loading 1 platforms...
[2018-7-3 01:17:51] [Nest] Initializing Nest platform...
[2018-7-3 01:17:51] [Nest] Fetching Nest devices.
[2018-7-3 01:17:51] [Nest] Error: You did not specify {'token'} or {'clientId','clientSecret','code'}, one set of which is required for the new API
at C:\Users\User\AppData\Roaming\npm\node_modules\homebridge-nest\index.js:188:14
at Promise._execute (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge-nest\node_modules\bluebird\js\release\debuggability.js:303:9)
at Promise._resolveFromExecutor (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge-nest\node_modules\bluebird\js\release\promise.js:483:18)
at new Promise (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge-nest\node_modules\bluebird\js\release\promise.js:79:10)
at setupConnection (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge-nest\index.js:172:10)
at NestPlatform.accessories (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge-nest\index.js:256:5)
at Server._loadPlatformAccessories (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge\lib\server.js:385:20)
at Server._loadPlatforms (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge\lib\server.js:329:16)
at Server.run (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge\lib\server.js:85:36)
at module.exports (C:\Users\User\AppData\Roaming\npm\node_modules\homebridge\lib\cli.js:43:10)
at Object.
You can’t use random token! First erase token line in your config. use clientid, clientsecrete, code, from you nest developer account and username and password and save config file. On terminal type homebridge and press enter. This will give token. Copy and paste in your config and restart homebridge.
After you add token you don’t need clientid, clientsecrete, code, username and password.
I failed to mention I am running this on Windows 10 (I don’t wan to spin up a VM or pull out the Mac mini for this. AND when I try without the token part it says the same bit. I am using the login from nest.com the same one to login and see my cameras/thermostat. My overall goal Would be to control my nest cameras AND thermostat. I just don’t know where else to go or try. I’ve ready so many different forms and everyone has a solution and nothing works, I’ve even reinstalled everything just to be sure.
Did you make the app in nest developed account?
Go to https://developer.nest.com Choose Sign In Use your normal account to sign in Fill in you info in 'Step 1' In 'Step 2' set: Company Name: HomeBridge-Nest Company URL: https://github.com/kraigm/homebridge-nest Country: [Your Country] Size of Company: Individual Then just agree to the terms and submit Go to Products and create a new product Fill in: Product Name: HomeBridge + your name (must be unique) Description: Open source project to provide HomeKit integration Categories: Home Automation Users: Individual Support URL: https://github.com/kraigm/homebridge-nest Redirect URL: [LEAVE BLANK] Permissions (minimum): Enable Thermostat with read/write v4 Enable Away with read/write v2 Enable Smoke+CO alarm with read v4 (if you ever might want Nest Protect) Enable Camera with read v2 (if you ever might want Nest Cam, motion detection only) Permission description: fill in anything Now you should have a product. Now locate the id/secret section on the right of your product's page Copy the Product ID to your HomeBridge config as the clientId in the Nest config Copy the Product Secret to your HomeBridge config as the clientSecret in the Nest config Navigate to the Authorization URL Accept the terms and copy the Pin Code to your HomeBridge config as the code in the Nest config Run HomeBridge once (do not include the token in the config at this time) and you should find a log that says something like "CODE IS ONLY VALID ONCE! Update config to use {'token':'c.5ABsTpo88k5yfNIxZlh...'} instead." Copy the c.5ABsTpo88k5yfNIxZlh... portion to your HomeBridge config as the token in the Nest config You should be able to restart HomeBridge and it should succeed with the new token. After that you will be FINALLY done (Huzzah!). If the token is working correctly, you no longer NEED the other three configs (clientId, clientSecret, and code) nor the original username and password from the legacy system (but you can keep them around if you wish, they will be ignored).
Yes, I made a nest developer account and followed those directions. I will try this morning to re-create a new project and see what happens.
Even after I uninstalled homebridge and homebridge-nest AND re-created my developer Oauth Client it still gives me the same error even on first run.
I figured it out!!! Its all in the details...
"ClientID": "a5942013-3580-473e-b1d7-XXXXXXXXXXXX", "ClientSecret": "1FAgafFh3XKXXXXXXXXXXXXXX", "Code": "XXXXXXXX",
ClientID, ClientSecret, and Code need to be.
clientId, clientSecret and code apparently the uppercase kills it.. SOOOOO it now works!
cool! please close the issue