The Hub exposes a REST API on port 8080 for local LAN control. All endpoints require an API token obtained from the app (Settings → Developer → API Token).
Include the token in the Authorization header:
Authorization: Bearer <your-api-token>
Returns a list of all paired devices and their current state.
Response example:
{ "devices": [{ "id": "d001", "name": "Living Room Light", "type": "light", "state": "on", "brightness": 80 }] }
Send a command to a specific device.
Body parameters:
| Parameter | Type | Description |
|---|---|---|
| command | string | on, off, toggle, set_brightness, set_color |
| value | any | For set_brightness: 0-100. For set_color: hex string. |
Returns Hub firmware version, uptime, and connected device count.
Reboots the Hub. Requires admin token. The Hub will be unavailable for ~30 seconds.
Configure webhooks in Settings → Developer → Webhooks. The Hub will POST a JSON payload to your URL whenever a device state changes.
Payload format:
{ "event": "device_state_changed", "device_id": "d001", "state": "off", "timestamp": 1712345678 }
Local API: 60 requests per minute per token. Exceeding this returns HTTP 429.
Cloud API: 1000 requests per day per account.