KraigM / HomeBridgeController

Provides a simplified UI for controlling your HomeBridge
87 stars 7 forks source link

Nest authentication fails #59

Open vihanb opened 8 years ago

vihanb commented 8 years ago

Following the instructions listed under Installation. I installed the app, install the npm module, and added the HomeBridgeControllerLink to my homebridge's config.json. I restarted homebridge, and successfully connected to my homebridge hub. I then selected the "Nest" tab under platforms and hit authenticate. I accepted and on return to the app I recieved the following error in an alert :(

Authentication Error
Error: SecureChannelFailure (Unknown Secure Transport error `PeerHandshakeFail'.)
screen shot 2016-06-29 at 10 37 29 pm

Sounds like some SSL error (I can't change the https to http in the auth page as it redirects to https, but I doubt Nest's API is borked).


The log:

22:42:57 - Loaded plugin: homebridge-controllerlink
22:42:57 - Registering platform 'homebridge-controllerlink.HomeBridgeControllerLink'
22:42:57 - ---
22:42:59 - Loaded plugin: homebridge-nest
22:42:59 - Registering platform 'homebridge-nest.Nest'
22:42:59 - ---
22:42:59 - Loaded config.json with 0 accessories and 2 platforms.
22:42:59 - Loading 2 platforms...
22:42:59 - Initializing HomeBridgeControllerLink platform...
22:43:00 - Initializing Nest platform...
22:43:00 - Fetching Nest devices.
22:43:00 - [Error: You did not specify {'token'} or {'clientId','clientSecret','code'}, one set of which is required for the new API]
22:43:06 - Started HomeBridgeControllerLink on port 51828
22:43:06 - Unknown restart style: undefined
22:43:06 - Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
22:43:06 - 
22:43:06 - ┌────────────┐
22:43:06 - │ 987-65-432 │
22:43:06 - └────────────┘
22:43:06 - Homebridge is running on port 51826.
22:43:06 - Registering platform 'homebridge-controllerlink.HomeBridgeControllerLink'

and my config.json:

{
        "bridge": {
                "name": "Homebridge",
                "username": "DD:22:3D:E3:CE:31",
                "port": 51826,
                "pin": "987-65-432"
        },

        "platforms": [
                {
                        "platform": "HomeBridgeControllerLink"
                },
                {
                        "platform": "Nest"
                }
        ]
}

I'm running homebridge-nest version 1.1.2 and the HomeBridgeController is saying "Version 0.7.0 (0.7.0.153)"

mdod commented 8 years ago

I have this problem as well in the Controller, but if you run homebridge in Terminal, without token listed in the config.json, it should give you a token to use.

Does the config.json have to look like this?

    {
        "platform": "Nest",

        "token" : "c.5ABsTpo88k5yfNIxZlh...",

        "clientId": "developer client id",
        "clientSecret": "developer client secret.",
        "code": "Pin Code",

        "username" : "username",
        "password" : "password"
    }