All REST responses are JSON unless noted. All request bodies must be Content-Type: application/json.
Other websites are refused. Every /api and /ws request that a browser marks with an Origin other than the bridge's own address is answered 403 ({ "error": "origin not allowed" }), whether or not sign-in is on. The bridge's own address is the Host the request was sent to, or the X-Forwarded-Host a proxy set. Requests with no Origin (curl, scripts, the CLI) are not affected, nor are /api/health, /mcp and the OAuth and discovery paths, which exist to be called from elsewhere. This keeps a page on another site, open in a browser on your network, from using a bridge that has no sign-in.
Health & System
GET /api/health
Returns the daemon's current health status. Use this for uptime monitoring or readiness checks.
Response:
{
"status": "ok",
"version": "0.1.0",
"timestamp": "2026-04-05T12:00:00.000Z"
}GET /api/system
Returns information about the host machine.
Response:
{
"os": "darwin",
"arch": "arm64",
"hostname": "my-mac.local",
"ip": "192.168.1.10",
"nodeVersion": "v22.23.4",
"uptime": 3600
}| Field | Description |
|---|---|
os | Operating system platform (linux, darwin, win32) |
arch | CPU architecture (x64, arm64) |
hostname | Machine hostname |
ip | Primary local IP address |
nodeVersion | Node.js version string |
uptime | Daemon uptime in seconds |
GET /api/qr
Returns the HomeKit setup URI and pincode. Use the URI to render a QR code or for deep-linking into the Home app.
Response:
{
"setupURI": "X-HM://0098Y4QXZL2031451540",
"pincode": "031-45-154"
}Plugins
GET /api/plugins
Returns all loaded plugins (native and Homebridge).
Response:
{
"plugins": [
{
"id": "my-plugin",
"manifest": {
"name": "my-plugin",
"version": "1.0.0",
"description": "My plugin",
"author": "Jane Dev"
},
"status": "running",
"config": { "host": "192.168.1.1" }
}
]
}GET /api/plugins/:id
Returns a single plugin by its ID (which equals manifest.name).
Path parameters:
| Param | Description |
|---|---|
id | Plugin name (e.g. my-plugin) |
Response: A single PluginInstance object (same shape as the items in GET /api/plugins).
404 if no plugin with that ID is loaded.
POST /api/plugins/refresh
Re-scans the Homebridge plugins directory and updates the plugin list without a full daemon restart. New platform configurations still require a restart to initialize.
Response:
{ "ok": true }Accessories
GET /api/accessories
Returns all HomeKit accessories currently registered with the HAP bridge.
Response:
{
"accessories": [
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Living Room Light",
"services": [
{
"uuid": "...",
"type": "Lightbulb",
"characteristics": [{ "uuid": "...", "type": "On", "value": true }]
}
]
}
]
}POST /api/accessories/:uuid/characteristics
Writes a characteristic value to an accessory. This is how the UI controls devices.
Path parameters:
| Param | Description |
|---|---|
uuid | Accessory UUID |
Request body:
{
"serviceUuid": "service-uuid-here",
"charUuid": "characteristic-uuid-here",
"value": true
}Response:
{
"serviceUuid": "service-uuid-here",
"charUuid": "characteristic-uuid-here",
"value": true
}GET /api/accessories/debug
Returns a lightweight summary of all accessories. Useful for troubleshooting without the full serialized accessory tree.
Response:
{
"count": 4,
"names": ["Living Room Light", "Kitchen Switch", "Front Door Lock", "Thermostat"]
}Configuration
GET /api/config
Returns the raw config file content as a JSON string. Note: the content field is a string (not a parsed object) so the caller controls parsing.
Response:
{
"content": "{\"bridge\":{\"name\":\"OpenBridge\",\"port\":8582},...}"
}POST /api/config
Overwrites the entire config file. The content field must be a valid JSON string that passes the config schema validation.
Request body:
{
"content": "{\"bridge\":{\"name\":\"My Bridge\",\"port\":8582,...}}"
}Response:
{ "ok": true }GET /api/config/platform/:name
Returns the config for a specific platform entry by its platform name.
Path parameters:
| Param | Description |
|---|---|
name | Platform name (e.g. ShellyDS9) |
Response:
{
"config": {
"platform": "ShellyDS9",
"plugin": "/path/to/dist/index.js",
"username": "admin"
}
}404 if no platform with that name exists in config.
POST /api/config/platform
Creates or updates a platform entry in platforms[]. If an entry with the same platform name already exists, it is replaced.
Request body: A platform config object:
{
"platform": "ShellyDS9",
"plugin": "/path/to/dist/index.js",
"username": "admin",
"password": "secret"
}Response:
{ "ok": true }GET /api/bridge
Returns the current bridge config object.
Response:
{
"name": "OpenBridge",
"port": 8582,
"hapPort": 51829,
"pincode": "031-45-154",
"username": "AA:BB:CC:DD:EE:FF",
"logLevel": "info"
}POST /api/bridge
Updates one or more fields in the bridge config. Partial updates are supported — only the fields you include are changed.
Request body:
{
"name": "My Bridge",
"logLevel": "debug"
}Response:
{ "ok": true }GET /api/telemetry
Whether the anonymous install heartbeat is on.
Response:
{ "installHeartbeat": true }POST /api/telemetry
Turns the heartbeat on or off. Applies at once, without a restart.
Request body:
{ "installHeartbeat": false }Response:
{ "saved": true, "installHeartbeat": false }Marketplace
GET /api/marketplace/search
Searches the npm registry for Homebridge plugins.
Query parameters:
| Param | Default | Description |
|---|---|---|
q | "" | Search query |
from | 0 | Pagination offset |
size | 20 | Number of results to return |
Response:
{
"results": [
{
"name": "homebridge-shelly-ds9",
"version": "1.2.3",
"description": "Homebridge plugin for Shelly DS9",
"author": "someone",
"date": "2025-01-01T00:00:00.000Z"
}
],
"total": 142
}GET /api/marketplace/installed
Returns all Homebridge plugins currently installed in ~/.openbridge/plugins/homebridge/node_modules/.
Response:
{
"plugins": [
{
"name": "homebridge-shelly-ds9",
"version": "1.2.3",
"path": "/Users/me/.openbridge/plugins/homebridge/node_modules/homebridge-shelly-ds9"
}
]
}GET /api/marketplace/local
Returns all native OpenBridge plugins found in the plugins directories.
Response:
{
"plugins": [
{
"name": "my-sensor",
"version": "1.0.0",
"path": "/Users/me/.openbridge/plugins/openbridge/my-sensor"
}
]
}GET /api/marketplace/plugin-info/:name
Returns platform metadata for an installed Homebridge plugin — specifically, the platform names it registers.
Path parameters:
| Param | Description |
|---|---|
name | npm package name |
Response:
{
"platforms": ["ShellyDS9", "ShellyGen3"]
}GET /api/marketplace/plugin-schema/:name
Returns the config.schema.json for an installed plugin, if it exists.
Path parameters:
| Param | Description |
|---|---|
name | npm package name |
Response:
{
"schema": {
"pluginAlias": "ShellyDS9",
"pluginType": "platform",
"schema": {
"type": "object",
"properties": { "username": { "type": "string" } }
}
}
}404 if the plugin does not ship a schema file.
POST /api/marketplace/install
Installs a Homebridge plugin package via npm.
Request body:
{
"package": "homebridge-shelly-ds9"
}Response:
{ "ok": true }This runs npm install <package> in ~/.openbridge/plugins/homebridge/. The operation is synchronous — the response returns after installation completes.
DELETE /api/marketplace/uninstall/:name
Uninstalls a Homebridge plugin package.
Path parameters:
| Param | Description |
|---|---|
name | npm package name to remove |
Response:
{ "ok": true }Logs
GET /api/logs
Returns buffered log entries from the in-memory log store.
Query parameters:
| Param | Default | Description |
|---|---|---|
plugin | (all) | Filter by plugin name |
limit | 200 | Maximum number of entries to return |
Response:
{
"entries": [
{
"timestamp": "2026-04-05T12:00:00.000Z",
"level": "info",
"plugin": "my-plugin",
"message": "Plugin started"
}
]
}LogEntry fields:
| Field | Type | Description |
|---|---|---|
timestamp | string | ISO 8601 timestamp |
level | "debug" | "info" | "warn" | "error" | Log severity |
plugin | string | Plugin name that emitted the entry |
message | string | Log message |
Daemon
POST /api/daemon/restart
Restarts the daemon process. All plugins go through their full stop → start lifecycle.
Response:
{ "restarting": true }The connection will drop immediately after this response. The UI reconnects automatically once the daemon is back up (typically within a few seconds).
AI agents (MCP)
The MCP endpoint and what manages it. None of these exist unless the daemon runs with OPENBRIDGE_MCP=on. While it is off, GET /api/access answers { "enabled": false } and /mcp answers 404. When on, /mcp takes a token in Authorization: Bearer obt_..., always, whether or not dashboard sign-in is on, and a token opens nothing else.
| Route | What it is |
|---|---|
POST /mcp | JSON-RPC 2.0 over stateless Streamable HTTP. 401 with a WWW-Authenticate pointer to the metadata below when the token is missing or invalid. |
GET /.well-known/oauth-protected-resource | RFC 9728 resource metadata (also under /mcp path variants). |
GET /.well-known/oauth-authorization-server | RFC 8414 server metadata (also as openid-configuration). |
POST /oauth/register | RFC 7591 dynamic client registration. Public clients only, limited per address. |
GET /oauth/authorize | Starts sign-in. Sends the browser to the dashboard's consent screen. |
POST /oauth/token | authorization_code with S256 PKCE, or refresh_token (rotates on use). |
The dashboard manages tokens and connections through these. They are behind dashboard sign-in when it is on, and refuse requests made from any page other than the dashboard itself.
GET /api/access
{
"endpoint": "http://192.168.1.10:8582/mcp",
"tokens": [
{ "id": "…", "name": "Claude on my laptop", "access": "read", "owner": null, "createdAt": "…", "lastUsedAt": null }
],
"connections": [
{ "clientId": "…", "name": "Claude", "access": "control", "owners": [], "connectedAt": "…", "lastUsedAt": "…" }
]
}POST /api/access/tokens
Body { "name": "Claude on my laptop", "access": "read" | "control" }. Returns { "id", "token" }. The token is returned this once and stored only as a hash.
DELETE /api/access/tokens/:id
Revokes a token immediately.
DELETE /api/access/connections/:clientId
Disconnects an application, cutting every sign-in it holds, refresh tokens included.
Notifications
GET /api/notifications
The newest rows for the person asking, newest first, with their read state. Rows that person has cleared are left out. limit defaults to 50. unread counts every unread row the person still has, not only the ones returned. kind is one of device.offline, device.online, plugin.failed, update.openbridge or update.plugin. target says where the row leads (device, plugin, settings or config), and is null when it leads nowhere.
{
"notifications": [
{
"id": "3f6b2c1e-8a4d-4f0e-9c1a-2b7d5e8f0a13",
"kind": "device.offline",
"title": "Pool pump is not responding",
"body": "No response for 10 minutes.",
"variant": "warning",
"target": { "kind": "device", "id": "shelly-ec6260887f18-switch1" },
"createdAt": "2026-11-05T10:00:00.000Z",
"read": false
}
],
"unread": 1
}POST /api/notifications/read
Marks rows read for the person asking. Send { "ids": ["3f6b2c1e-8a4d-4f0e-9c1a-2b7d5e8f0a13"] } for specific rows, or an empty body for all of them. Returns { "unread": 0 }.
POST /api/notifications/clear
Takes rows out of the list of the person asking, and marks them read. Nobody else's list changes. Send { "ids": [...] } for specific rows, { "before": "2026-11-05T10:00:00.000Z" } for every row created at or before that instant, or an empty body for all of them. The UI's Clear all sends before with the newest row it shows, so a row that arrived in the meantime is not cleared unseen. A before that is not a date is refused with 400. Returns { "unread": 0 }, the person's unread count afterwards.
House plan
GET /api/house
The house plan, its revision, and when it was last saved. plan is null until one is drawn.
Geometry is in grid cells of grid metres (0.5). Rooms sit on cell lines. A device sits on a half cell at most. A placement's ref is device:<id> for a native device or accessory:<uuid> for a HomeKit accessory. A room's kind is room, outdoor, paved or pool. A room's optional parts are more rectangles joined to it along an edge, for an L or U shaped room: each must share an edge with the shape before it and none may overlap. Rooms may sit inside other rooms, and a device belongs to the smallest room around it. opening attaches a shutter to a window, a sliding door or a glass door, color is the glow of a light that cannot report one, circuitRooms lists the rooms a heating device's water circuit serves, a gate's length (cells) and axis (h or v) give its width and the way it runs (axis also turns a TV), a light's mount is ceiling (the default, or pool for a light in a pool), wall, floor, table or pool, and look draws a device as outlet, tv, fridge, washer, dehumidifier, vacuum, mower or tap. An opening's type is door, window, slider (a sliding glass door) or open (a stretch with no wall, where two rooms run into each other). It sits on a wall line, and along the wall its start and len may be half cells (a quarter metre). A floor's optional radiators each have an id, a wall position like an opening (x, y, axis, len) and the side of the wall they hang on (up or down along x, left or right along y). A heating circuit serving the radiator's room runs through it. A floor's optional furniture lists pieces with an id, a kind (sofa, table, cabinet, shelves, rug, island, bed, bath, shower, toilet, basin, lounger, parasol, planter or pergola), a position x, y and a size w (along x) and d (along y), all in half cells, and an optional height in metres (0.1 to 3) when it is not the usual one for its kind, and an optional back (up, down, left or right), the side a bed's head or a sofa's back is on (unset, the side nearest a wall). A light placed on a piece with no mount set is a table lamp standing on it. A door's hinge is start (the end at the lower x or y, the default) or end, and opens is the side it swings into on the plan: up or down for a door in a wall along x, left or right along y (default down or right). A door with glass: true has a glass leaf, and a shutter can sit on it. Only a door can be glass.
{
"plan": {
"version": 1,
"grid": 0.5,
"plot": { "w": 32, "h": 22 },
"floors": [
{
"id": "ground",
"name": "Ground floor",
"level": 0,
"rooms": [{ "id": "room1", "name": "Living room", "kind": "room", "x": 2, "y": 2, "w": 10, "h": 8 }],
"openings": [{ "id": "window1", "type": "window", "axis": "h", "x": 4, "y": 2, "len": 2 }],
"placements": [
{ "ref": "device:shelly-ec6260887f18-switch0", "x": 6.5, "y": 5, "color": "#ffb45e" },
{ "ref": "device:bf0df8f538a5ea6d2a2j39", "x": 9, "y": 3, "circuitRooms": ["room1"] }
]
}
]
},
"rev": 3,
"updatedAt": "2026-11-16T12:00:00.000Z"
}PUT /api/house
Replaces the plan. Send { "plan": {...}, "rev": 3 }, where rev is the revision you read. Returns the new state, with rev one higher. Send "plan": null to remove the plan.
The daemon checks that the plan holds together: rooms inside the plot and on the grid, room ids unique across the whole house, one placement per device, a shutter only on a window, and circuit rooms that exist. A plan that does not is refused with 400 and a message naming the field. If somebody saved since your rev, the save is refused with 409 and the current state, so a stale tab cannot undo someone else's work.
Each device in GET /api/devices carries the room it is placed in, as { "id", "name", "floor": { "id", "name", "level" } }, or null when it is not on the plan.
WebSocket streams
All WebSocket endpoints are at ws://localhost:8582/ws/*. Connect using any standard WebSocket client.
WS /ws/logs
Streams live log entries as they are emitted. Each message is a JSON-serialized LogEntry:
{
"timestamp": "2026-04-05T12:00:00.000Z",
"level": "info",
"plugin": "my-plugin",
"message": "Polling device"
}There is no filtering at the WebSocket level — the client receives all entries and filters locally. Use GET /api/logs?plugin= for server-side filtering of historical entries.
WS /ws/notifications
Says what changed, never the row. A frame is sent when a row is added (to everybody), and when the same person reads or clears rows in another tab (to that person only). Re-read GET /api/notifications when one arrives, and once whenever the socket (re)connects, since nothing is replayed.
{
"verb": "notification.created",
"entity": "notification",
"id": "3f6b2c1e-8a4d-4f0e-9c1a-2b7d5e8f0a13",
"actor": "bridge"
}verb is notification.created, notification.read or notification.cleared. id is the row when one row changed, and null when several did. actor is bridge for a new row and person for reading and clearing.
The socket is refused (closed with 1008) when the browser's Origin is not the host the request was sent to, or the X-Forwarded-Host a proxy set. With sign-in on, a socket older than 30 minutes is closed with 4001 the next time something would be sent on it: reconnect, which checks the session again.
WS /ws/metrics
Streams system and plugin metrics. Messages have a type field that distinguishes snapshots from history:
Snapshot message (sent on connect and periodically):
{
"type": "snapshot",
"data": {
"uptime": 3600,
"memory": { "rss": 104857600, "heapUsed": 52428800 },
"cpu": 0.04
}
}History message (sent on connect to provide initial chart data):
{
"type": "history",
"data": [{ "timestamp": "2026-04-05T11:55:00.000Z", "cpu": 0.02, "memory": 50000000 }]
}WS /ws/terminal
Streams ANSI-formatted log output suitable for rendering in an xterm.js terminal. Each message is a plain string containing ANSI escape sequences. Read-only — the server ignores any messages sent from the client.
[12:00:00] [INFO] [my-plugin] Plugin started\r\nWS /ws/shell
An interactive PTY shell. Bidirectional:
- Client → server: Send keystrokes as UTF-8 strings.
- Server → client: Receive terminal output as UTF-8 strings (with ANSI escape sequences).
This is what the Terminal view in the UI connects to when in shell mode. The shell runs as the same user as the daemon process.
Warning: The shell WebSocket provides full command-line access to the host machine. Never expose port 8582 to an untrusted network without authentication.
Related pages
- Web interface: how the UI uses these endpoints
- The MCP endpoint: connecting Claude and other agents
- Config Reference: the config schema behind the config endpoints
- Homebridge Compatibility: the marketplace endpoints in context
Camera video
GET /api/devices/:id/snapshot returns one JPEG from a device whose plugin offers video (video is set on it in GET /api/devices). GET /api/devices/:id/live streams Motion JPEG (multipart/x-mixed-replace), which an <img> plays directly. The stream runs only while the request is open, and at most three viewers per camera are let in (429 beyond). Plugins offer video with ctx.registerVideo(deviceId, { snapshot, live }).