KraigM / homebridge-nest

Nest plugin for HomeBridge
210 stars 72 forks source link

API Error: unauthorized user on startup #19

Closed Krenath closed 8 years ago

Krenath commented 8 years ago

/usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/node_modules/q/q.js:126 throw e; ^ Api Error: unauthorized user at checkForError (/usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/hue-api/httpPromise.js:93:15) at /usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/hue-api/httpPromise.js:140:26 at _fulfilled (/usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/node_modules/q/q.js:816:30) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/node_modules/q/q.js:749:13) at /usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/node_modules/q/q.js:557:44 at flush (/usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/node_modules/q/q.js:108:17) at doNTCallback0 (node.js:407:9) at process._tickCallback (node.js:336:13) pi@raspberrypi:~ $

My config.json currently looks like this:

{
    "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.",
    "accessories": [
    ],
    "platforms": [
        {
         "platform": "PhilipsHue",
         "name": "Philips Hue",
         "ip_address": "192.168.1.198",
         "username": "252deadbeef0bf3f34c7ecb810e832f"
        }
        ,
        {
         "platform": "Nest",
         "clientId" : "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
         "clientSecret" : "zzzzzzzzzzzzzzzzzzzzzzzzzz",
         "code" : "DEADBEEF"
        }
    ]
}

(The Nest API ClientID, ClientSecret, and code are all copied carefully from the https://developer.nest.com page I set up according to the instructions, and are not the placeholders shown above.)

Krenath commented 8 years ago

Just read the error more carefully and discovered it's not a problem with the Nest.

It just pops the error up after "Fetching Nest Devices", misleading me slightly.
Please close this issue while I proceed to pull my cranium out of my posterior and get this configured properly

KraigM commented 8 years ago

lol ok