Skip to main content

Overview

No Longer Evil exposes two separate APIs depending on how you run it:

Hosted Service API

https://nolongerevil.com/api/v1 — REST API for cloud-managed devices. Requires an nle_ API key.

Self-Hosted Control API

http://your-server:8082 — Local control API for self-hosted deployments. No auth required by default.

Two-Port Architecture (Self-Hosted)

The self-hosted server runs two independent HTTP services on different ports:
Port 8000 speaks the Nest Cloud Protocol. Thermostats connect here using long-poll subscribe/PUT requests.Port 8082 is where you send commands, query status, and manage devices. This is the API you call from scripts, Home Assistant, or any automation tool.

Self-Hosted Base URLs


Hosted Service Base URL

The hosted REST API (/api/v1) does not exist on the self-hosted server. Self-hosted uses a flat control API on port 8082.

Quick Start

Self-Hosted: Send a Command

No API key needed. Just POST to port 8082:

Self-Hosted: Get Device Status

Hosted Service: List Devices


Response Format

Success Response

Error Response


API Sections

Self-Hosted Control API

Commands, status, device management — port 8082

Device Protocol API

Nest protocol endpoints — port 8000 (advanced/reference)

Hosted Service API

REST API for the hosted service at nolongerevil.com

Authentication

Auth differences between hosted and self-hosted