How to configure the Nest Learning Thermostat with Homebridge using your Google Account

Last Updated on May 8, 2023 by Freddy Reyes

To configure the Nest Learning Thermostat with Homebridge using your Google Account, you’ll need to set up the Homebridge-Nest plugin, which allows you to control your Nest devices using Apple HomeKit. Here’s a step-by-step guide to help you with the process:

  1. Install Homebridge: First, make sure you have Homebridge installed on a compatible device (like a Raspberry Pi or a computer running macOS, Linux, or Windows). You can follow the official installation guide here:
  2. Install Homebridge-Nest plugin: After successfully installing Homebridge, you need to install the Homebridge-Nest plugin. Open a terminal or command prompt and run the following command:
npm install -g homebridge-nest
  1. Create a Google Cloud Project: Go to the Google Cloud Console ( and sign in with your Google Account. Create a new project by clicking on the project dropdown, then the “New Project” button.
  2. Enable the Nest API: In your Google Cloud project, open the “APIs & Services” dashboard, and click “Enable APIs and Services”. Search for “Nest” and enable the “Nest Device Access” API.
  3. Create OAuth2 credentials: Click “Create Credentials” and select “OAuth client ID”. Choose “Web application” as the application type, and set the “Authorized redirect URIs” to ““. Click “Create” and note down the “Client ID” and “Client secret”.
  4. Get the authorization code: Open a new browser window and visit the following URL (replace YOUR_CLIENT_ID with your actual Client ID):

After granting permission, you’ll be redirected to with an authorization code in the URL. Copy the value of the code parameter.

  1. Get the access token and refresh token: Using the terminal or command prompt, run the following command (replace YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, and YOUR_AUTHORIZATION_CODE with the respective values):
curl -L -X POST '' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=YOUR_CLIENT_ID' \
--data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \
--data-urlencode 'code=YOUR_AUTHORIZATION_CODE' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'redirect_uri='

The response will include an access_token and a refresh_token. Save both values.

  1. Configure Homebridge: Open the Homebridge config.json file (located in the .homebridge folder within your user directory) and add the following configuration under the “platforms” section (replace the placeholders with your respective values):
  "platform": "Nest",
  "googleAuth": {
    "issueToken": "",
    "cookies": "",
    "clientId": "YOUR_CLIENT_ID",
    "clientSecret": "YOUR_CLIENT_SECRET",