Skip to main content

Overview

The Control API is the interface you use to control your thermostats, query device status, and manage registrations. It runs on port 8082 and has no authentication by default.
Port 8082 is separate from port 8000 (the device protocol port). Thermostats connect to port 8000. You connect to port 8082.

Base URL

http://your-server:8082
Replace your-server with your server’s IP address or hostname.

Authentication

The Control API has no authentication by default. It is designed for use on a trusted local network. If you expose it to the public internet, put it behind a reverse proxy with authentication.

Available Endpoints

Thermostat Control

MethodEndpointDescription
POST/commandSend a command to a thermostat
POST/notify-deviceForce-push current state to device subscribers

Status & Monitoring

MethodEndpointDescription
GET/statusGet full device state
GET/api/eventsSSE stream of device state changes
GET/api/scheduleGet the current weekly schedule
GET/api/statsServer statistics
GET/healthServer health check

Device Management

MethodEndpointDescription
GET/api/devicesList all registered devices
POST/api/registerClaim entry key and register a device
POST/api/dismiss-pairing/{serial}Dismiss pairing dialog on device

Network Discovery

MethodEndpointDescription
POST/api/scan-networkScan subnet for Nest devices
POST/api/configure-nestPoint a discovered Nest device at this server

Configuration

MethodEndpointDescription
GET/api/configServer configuration (for the dashboard)
POST/api/mqtt-configConfigure MQTT integration

Request Format

All requests that have a body use Content-Type: application/json.

Response Format

Success responses always return 200 OK with a JSON body. Error responses use appropriate 4xx/5xx status codes.
// Success
{"success": true, "data": {...}}

// Error
{"success": false, "message": "Device not found"}

// Some endpoints return data directly (not wrapped in success/data)
{"serial": "...", "current_temperature": 21.5, ...}

Port Configuration

The control API port is configured via the CONTROL_PORT environment variable (default: 8082). The bind address is configured via CONTROL_HOST (default: 0.0.0.0).

POST /command

Send thermostat commands

GET /status

Query device state