Skip to main content

Overview

Updates a Nest thermostat’s cloudregisterurl setting to point at this NLE server. After this call, the device will connect to this server on its next boot or reconnect. This is the second step in the device setup flow, after using /api/scan-network to discover devices.

Endpoint

POST http://your-server:8082/api/configure-nest

Request

First Attempt (no API key)

{
  "ip": "192.168.1.55"
}

Retry With API Key (if first attempt returns 401)

{
  "ip": "192.168.1.55",
  "api_key": "02AB01AC012345678"
}
FieldTypeRequiredDescription
ipstringYesIP address of the Nest device to configure
api_keystringNoDevice serial/API key, required if device demands auth

Response

Success (200 OK)

{
  "success": true,
  "device_name": "Nest Thermostat"
}

Authentication Required (401)

{
  "success": false,
  "auth_required": true
}
Retry the request with "api_key": "{device_serial}" to authenticate.

Error (4xx/5xx)

{
  "success": false,
  "error": "Connection failed: ..."
}
StatusMeaning
401Device requires authentication — retry with api_key
502Could not connect to the device

What It Sets

The server sends a POST to the device’s local API (http://{ip}:8080/cgi-bin/api/settings) with:
{
  "endpoint": "http://your-server:8000"
}
This updates the device’s cloudregisterurl, which is the URL it uses for all cloud communication.

Examples

# Step 1: try without key
curl -X POST http://your-server:8082/api/configure-nest \
  -H "Content-Type: application/json" \
  -d '{"ip": "192.168.1.55"}'

# If auth_required: true, step 2: retry with serial
curl -X POST http://your-server:8082/api/configure-nest \
  -H "Content-Type: application/json" \
  -d '{"ip": "192.168.1.55", "api_key": "09AA01AB12345678"}'

POST /api/scan-network

Discover devices on the network first

POST /api/register

Register a device after pointing it here