Nest plugin for HomeBridge
This repository contains the Nest plugin for homebridge that was previously bundled in the main homebridge
repository.
- Install homebridge using:
npm install -g homebridge
- Install this plugin using:
npm install -g homebridge-nest
- Update your configuration file. See
sample-config.json
snippet below.
Until an alternative is determined (like Nest Weave which hasn't been released yet or setting up a website for generating tokens specifically for HomeBridge-Nest), you will have to setup an developer account for Nest. It's a simple process and if you specify that it is for Individual, then you are auto approved (at least in my experience).
Note: The name of the device matches the name displayed in the Nest app. In my case, I originally configured the Nest app so the the "Where" of my Nest was "Hallway" and I also added a label which was "Nest", so the display was "Hallway (Nest)". To fix the name to say "Nest", you can use the Nest app and blank out the "Label" and use the custom "Where" of "Nest". Anther option to fix the name is through HomeKit. HomeKit allows you to rename Accessories and Services, but it requires an app like Insteon+ that has the ability to change the name.
- 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/chrisjshull/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/chrisjshull/homebridge-nest
- Redirect URL: [LEAVE BLANK]
- Permissions (minimum):
- Enable Thermostat with read/write
- Enable Away with read/write
- Enable Smoke+CO alarm with read (if you ever might want Nest Protect)
- Enable Camera with read (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), but you can keep them around if you wish, they will be ignored.
Configuration sample:
"platforms": [
{
"platform": "Nest",
"clientId": "developer Product ID from Nest",
"clientSecret": "developer Product Secret from Nest",
"code": "your Pincode from Nest"
}
],
Fields:
- "platform": Must always be "Nest" (required)
- "clientId": developer Product ID (see instructions)
- "clientSecret": developer Product Secret (see instructions)
- "code": your Pincode from Nest (see instructions)
- "token": The only (and final) authentication piece you need to use the new API (see instructions)
- "structureId": "your structure's ID" // optional structureId to filter to (see logs on first run for each device's structureId)
- "disable": [] // optional list of features to disable ("Thermostat.Fan", "Thermostat.Home", "Thermostat.Eco")