Atrium Gateway › Developer Documentation
Platform 2.9.3

Atrium Gateway REST API

Pull live sensor readings, alerts, and gateway state out of your Atrium Gateway and into any external system — a CMMS, ERP, historian, SCADA platform, or your own application.

Audience
Integration developers
Endpoints
191 documented
Applies to
EG5120 & EG5100
Last updated
2026-11-25

1. Overview

Every Atrium Gateway exposes the same HTTP API that its own web interface uses. There is no separate integration product to license, no cloud account to create, and no data leaves your network unless you choose to send it.

Atrium is a self-contained platform. NCD wireless sensors report over a sub-GHz DigiMesh radio to a modem on the gateway; the gateway decodes, stores, alerts on, and visualizes that telemetry locally. The API is simply the same interface the built-in web app consumes, available to you on equal terms.

🔒
Local first
The API is served by the gateway itself. No cloud dependency, no vendor relay, no per-call fees.
📜
Plain JSON
Standard HTTP verbs, bearer-token auth, and JSON bodies. Any HTTP client works.
🔊
Pull or push
Poll the REST API, or have the gateway publish every reading to your MQTT broker.
🔧
Full surface
Not a cut-down read API — sensor config, alerting, and gateway administration are all reachable.

What you can do with it

  • Read sensor telemetry — current values and full history, per sensor and per metric.
  • Read the sensor inventory — device IDs, types, names, locations, assets, battery, signal, and online/offline health.
  • Read and manage alerts — active alert state, complete alert history, threshold rules, and multi-condition automations.
  • Write sensor metadata — push your own asset names, locations, and install dates from your system of record into Atrium.
  • Diagnose the radio network — each sensor’s link grade, test history and noise, and a log of every frame exchanged with it.
  • Request waveforms and update sensors — raw vibration captures on demand, sensor configuration, and over-the-air sensor firmware.
  • Administer the gateway — configuration, network settings, scheduled reports, and firmware updates.
  • Connect an AI assistant — the gateway serves the Model Context Protocol at /api/mcp, with scoped tokens or OAuth.

Two services behind one door

Internally the gateway runs two Node services. You do not need to care about this — nginx listens on port 80 and routes each path to the correct service, so every endpoint in this guide is reachable at the same base URL. It is documented only because the service labels appear throughout this guide and in error messages.

ServiceInternal portOwns
atrium-api3001Authentication, all telemetry and inventory reads, most CRUD, gateway configuration
atrium-ingest3002The radio itself — sensor configuration push, network tests, waveform requests, sensor firmware updates, the network ID, MQTT, and report delivery

2. Base URL and Access

All endpoints are relative to a single base URL: your gateway’s address. How you reach it depends on where your client runs.

From the same network (recommended)

If your integration runs on the same LAN as the gateway, use its IP address or hostname over plain HTTP on port 80:

textBase URL forms
http://192.168.1.50           # by IP address (most reliable)
http://ncd-b00e.local         # by mDNS hostname, if your network resolves it

The gateway’s hostname follows the pattern ncd-xxxx, where xxxx is the last four characters of its LAN MAC address — the same code printed on the physical label. You can confirm the address on the gateway’s own Settings page.

From outside the network (Remote Access)

Cloud-hosted platforms such as ServiceNow cannot reach a private LAN address. For those, enable Remote Access under Settings → Network → Services. This opens a secure outbound Cloudflare tunnel and publishes the gateway at a stable HTTPS hostname:

textRemote Access base URL
https://b00e.iolight.com      # <label-code>.iolight.com, HTTPS only

The exact hostname for your unit is shown on the Settings page once Remote Access is enabled. It requires no inbound firewall rule and no port forwarding, because the tunnel is established outbound from the gateway.

Settings, Network, Services panel showing the Remote Access toggle enabled with the gateway's public remote address, and the Node-RED service toggle below it.
Settings → Network → Services. With Remote Access on, the gateway’s public address is shown under Remote Address — that value, with https://, is your API base URL. The same panel carries the optional Node-RED toggle (Section 13).

Health check

One endpoint needs no authentication at all, which makes it useful as a liveness probe from a monitoring system:

GET /api/_health api No auth

Returns immediately if the API service is up.

bashRequest
curl http://192.168.1.50/api/_health
jsonResponse 200
{ "ok": true, "service": "atrium-api" }

3. Authentication

Every request carries a bearer token. There are three ways to get one: log in for a session token, issue a scoped API token, or have an app sign itself in with OAuth. An integration should use an API token.

CredentialLifetimeReachesUse it for
Session token7 days, fixedEverything the account’s role allowsThe web interface, one-off scripts, and the few administrative endpoints no API token can reach
API token 2.6.0+Until revoked, or an expiry you setOnly the scopes you tickIntegrations: a CMMS, historian, dashboard, or your own service
OAuth access token 2.6.0+1 hour, refreshed for 30 daysOnly the scopes the operator approvesApps that sign themselves in, such as an AI assistant on a phone

All three are sent the same way, as Authorization: Bearer <token>. The steps below cover the session login; API tokens and OAuth follow.

Step 1 — Log in

POST /api/auth/login api No auth

Exchanges credentials for a session token. This is the same login the web interface uses, so any Atrium user account works.

Request body

FieldTypeRequiredDescription
usernamestringYesAtrium account username
passwordstringYesAccount password
bashRequest
curl -X POST http://192.168.1.50/api/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"username":"ncdio","password":"your-password"}'
jsonResponse 200
{
  "token": "e407a4ba1f73b881c6d7bc819e0e2f6e640b75a1ccabb35eb4c3c1de2dade81b",
  "username": "ncdio",
  "role": "admin",
  "allowed_pages": null,
  "enabled": true
}

Response fields

FieldDescription
token64-character hex session token. Send this as your bearer credential.
roleadmin or viewer.
allowed_pagesnull for an admin. For a viewer, the array of interfaces an admin has granted.
enabledWhether the account is active.

Error responses

StatusBodyCause
400{"error":"Username and password required"}Either field missing or blank
401{"error":"Invalid credentials"}Wrong username or password
403{"error":"This account is disabled…"}Viewer account currently disabled by an admin

Step 2 — Send the token

Every other endpoint requires the token in an Authorization header using the Bearer scheme:

bashAuthenticated request
curl http://192.168.1.50/api/sensors \
  -H 'Authorization: Bearer e407a4ba1f73b881c6d7bc819e0e2f6e640b75a1ccabb35eb4c3c1de2dade81b'

Token lifetime and renewal

The correct pattern is to treat 401 as “log in again and retry”, rather than tracking expiry dates:

  1. 1
    Cache the token
    Log in once, keep the token in memory or a credential store, and reuse it across requests. Do not log in on every call — each login inserts a new session row on the gateway.
  2. 2
    Watch for 401
    On any 401 response, discard the cached token, call /api/auth/login again, and retry the original request once.
  3. 3
    Optionally refresh early
    If you prefer not to fail even once, re-authenticate on a fixed schedule — daily is comfortable and well inside the 7-day window.

Checking a token

GET /api/auth/verify api

Confirms a token is still valid and reports the account it belongs to. Useful as a cheap pre-flight after a long idle period.

jsonResponse 200
{ "valid": true, "username": "ncdio", "role": "admin",
  "allowed_pages": null, "enabled": true }
POST /api/auth/change-credentials api

Changes the authenticated account’s username and/or password. Requires the current password.

jsonRequest body
{
  "current_password": "old-password",
  "new_password": "new-password",
  "new_username": "integrations"   // optional; omit to keep the username
}

API tokens (recommended for integrations)

An API token is a credential for software, not a person. It does not expire every 7 days, it carries only the permissions you grant it, and it can be revoked without changing anyone’s password. Requires platform 2.6.0 or newer.

Issue one in the web interface under Settings → Users & Security → API Tokens → Issue Token: name it, tick its scopes, optionally set an expiry, and copy the token. It is shown once. The gateway stores only a hash, so a lost token is replaced, not recovered.

bashUsing an API token
curl http://192.168.1.50/api/sensors \
  -H 'Authorization: Bearer 5f1c0a9e...the-64-character-token'

Scopes

A token reaches an endpoint only if one of its scopes lists that method and path. Anything else answers 403:

jsonResponse 403
{ "error": "Forbidden", "message": "API token scope does not permit this resource" }
ScopeGrantsChanges things?
telemetry:readSensors, devices, sensor types, telemetry, metrics, metadata, labels, conversions, thresholds, status history; sensor firmware status and the firmware catalogNo
alerts:readAlerts, alert history, alert templates, triggers, automationsNo
mesh:readMesh topology and route maps, stored waveform captures, DigiMesh peers, network monitoring settings and results, each sensor’s communication logNo
apps:readInstalled apps, /api/apps/reads, and the bus catalog, state, events, runs, bindings and statusNo
system:readGateway time and configuration, network status, MQTT status, the radio network IDNo
apps:dataThe data views an installed app declares (/api/apps/<app-id>/…). Each app chooses what to offerNo
sensors:writePOST a sensor’s metadata, thresholds, metric labels, conversions, chart order and whitelist stateYes
alerts:writeCreate, edit and delete alert templates, triggers and automationsYes
automations:writeCreate, edit and delete bus bindings. A binding outlives the token that made itYes
apps:actionsPOST /api/bus/actions/:appId/:actionId: run any action an installed app declares, including switching a relayYes
network:writePUT the network monitoring settings and the communication log settingsYes
radio:fftPOST /api/sensors/:id/request-fftYes, radio
radio:meshPOST /api/sensors/:id/mesh-mapYes, radio
radio:configRead the configuration schema and a sensor’s configuration, and POST a changeYes, radio
radio:firmwareThe firmware catalog, download and upload, and starting or cancelling a sensor firmware updateYes, radio
radio:networkRead and change the gateway’s radio network IDYes, radio

GET /api/api-tokens/scopes returns this list from the gateway itself, with the wording the Issue Token form shows.

What no API token can reach

These are refused for every API token whatever its scopes, and need a session token: /api/auth/*, /api/api-tokens/*, /api/oauth/*, /api/users/*, /api/sqlite/*, /api/synthetic-variables/*, /api/purge-all-data, platform and sensor-library updates, the Node-RED switch, app install, licensing and enable/disable, the proxy settings, the webhook signing secret, every /api/network/* call except GET /api/network/status, DELETE /api/thresholds/:id, POST /api/gateway/config and POST /api/gateway/radio-link.

An endpoint that appears in no scope, such as the Monitor views, scheduled reports and saved queries, is also session-only.

Managing tokens over the API

These five endpoints need an operator session. An API token cannot issue, edit or revoke tokens.

GET /api/api-tokens/scopes api

The scope vocabulary: {scopes: [{id, label, write, note}]}.

GET /api/api-tokens api

Issued tokens, newest first. Never returns a token or its hash; prefix is the first 8 characters, to match a row to the copy you saved.

jsonResponse 200
{
  "tokens": [
    { "id": 4, "name": "CMMS connector", "prefix": "5f1c0a9e",
      "scopes": ["telemetry:read", "alerts:read", "sensors:write"],
      "created_by": "ncdio", "created_at": 1795000000000, "expires_at": null,
      "last_used_at": 1795618000000, "revoked_at": null,
      "updated_at": null, "updated_by": null, "revoked": false, "expired": false }
  ],
  "count": 1
}

last_used_at is updated at most once a minute.

POST /api/api-tokens api

Issues a token. Returns 201 with the plaintext token, the only time it exists.

FieldTypeRequiredDescription
namestringYesUp to 80 characters. Name it after what will hold it.
scopesstring[]YesAt least one. An unknown scope is a 400 listing the valid ones.
expires_in_daysintegerNo1 to 3650. Omit for a token that lasts until revoked.
jsonResponse 201
{
  "token": "5f1c0a9e...64 hex characters",
  "id": 4, "name": "CMMS connector", "prefix": "5f1c0a9e",
  "scopes": ["telemetry:read", "alerts:read", "sensors:write"],
  "created_at": 1795000000000, "expires_at": null,
  "warning": "This token is shown once and cannot be retrieved again. Copy it now."
}
PATCH /api/api-tokens/:id api

Changes a token’s name, its scopes, or both, keeping the secret. Scopes can be widened or narrowed. Expiry cannot be changed, and a revoked token cannot be edited. Returns {ok: true, token}.

DELETE /api/api-tokens/:id api

Revokes a token at once. The row is kept, marked revoked, so its history stays readable. 404 if unknown or already revoked.

OAuth 2.1 for apps that sign themselves in

The gateway is its own OAuth 2.1 authorization server (platform 2.6.0 or newer). An app registers itself, sends the operator to the gateway’s consent page, and receives tokens limited to the scopes the operator approved. This is how an AI assistant connects with no token pasted anywhere; see Section 24. The access token it receives is an ordinary API token: same scopes, same refusals.

StepEndpointNotes
DiscoverGET /.well-known/oauth-authorization-server
GET /.well-known/oauth-protected-resource
Public. RFC 8414 and RFC 9728 metadata. Read endpoints and supported methods from here, not from this page.
RegisterPOST /api/oauth/registerPublic. Dynamic client registration (RFC 7591). redirect_uris must be https, or http on localhost.
Authorize<base>/oauth/authorizeA page in the web interface. An administrator logs in and approves all or some of the requested scopes. PKCE with S256 is mandatory.
TokenPOST /api/oauth/tokenauthorization_code and refresh_token grants, form-encoded or JSON. Access tokens last 1 hour. Refresh tokens last 30 days, sliding, and rotate on every use.
RevokePOST /api/oauth/revokeRFC 7009. Revoking either token ends the connection.

Errors from the token endpoint are RFC 6749 codes: invalid_grant, invalid_client, invalid_request, invalid_target, unsupported_grant_type. An authorization code is single-use and expires after 5 minutes.

The operator sees each connection under Settings → Users & Security → Connected Apps. The endpoints behind that panel need an operator session:

MethodPathPurpose
GET/api/oauth/grantsConnected apps: client, the user who approved, scopes, created, last refreshed, last used
PATCH/api/oauth/grants/:idChange a connected app’s scopes ({scopes: [...]}). Takes effect at once, with no new sign-in
DELETE/api/oauth/grants/:idDisconnect an app. Its refresh and access tokens stop working
GET/api/oauth/clientsRegistered clients, with the number of active connections each
POST/api/oauth/clientsRegister a client by hand ({name, redirect_uris, confidential}). A secret is returned once
DELETE/api/oauth/clients/:idRemove a client and disconnect its apps
GET/api/oauth/authorize-infoThe consent page’s own read. Administrator only
POST/api/oauth/authorizeThe consent page’s approve or deny. Administrator only

If you must use a login: a dedicated account

On platform 2.6.0 or newer, use an API token and skip this. On older firmware, rather than embedding the admin credentials in an external system, create a second account for the integration. Atrium supports one admin and one viewer account, and the viewer can be restricted to a granted set of interfaces — see Section 13.

4. Conventions

These rules hold across every endpoint. Read this section once and the rest of the guide becomes predictable.

Requests and responses

AspectBehavior
Content typeapplication/json for both requests and responses. Send Content-Type: application/json on any request with a body.
Empty POST bodiesAllowed. An empty body on a JSON POST is parsed as {}, so action endpoints can be called with no payload.
ParametersPath parameters are shown as :name. Query parameters are documented per endpoint. Bodies are JSON objects.
CORSEvery response carries Access-Control-Allow-Origin: *, and OPTIONS /api/* returns 204. Browser-based clients work without a proxy.
Unknown fieldsIgnored on write. Sending extra keys is harmless.
Partial updatesPUT and PATCH endpoints update only the fields you send. Omitted fields are left unchanged.

Timestamps

Two conveniences to be aware of:

  • Some objects also carry a pre-formatted ISO 8601 companion field — the sensor object, for example, has both last_seen_epoch and last_seen_utc.
  • The gateway’s display timezone (a Settings preference) affects the web interface and report rendering only. The API always speaks UTC. Convert on your side.
GET /api/system/time api

Returns the gateway’s current clock. Use it to detect clock skew between your system and the gateway before building time-window queries — if the two disagree, a “last 15 minutes” query can silently return nothing.

jsonResponse 200
{ "epoch_ms": 1788874900454, "iso": "2026-09-08T13:41:40.454Z" }

Status codes

CodeMeaning
200Success.
201Created. Returned by most resource-creating POST endpoints.
204No content. Returned for OPTIONS preflight.
400Bad request — missing or invalid parameters. The body explains what.
401Missing, invalid, or expired token. Re-authenticate.
402An installed app requires a license.
403Forbidden — admin-only endpoint, unsupported hardware, or a scoped token out of bounds.
404Resource not found, or the endpoint does not exist on this platform version.
409Conflict — the resource already exists, or an operation is already running.
500Server error.
502An underlying system helper failed — seen on network-configuration endpoints.
503A required subsystem is unavailable — e.g. MQTT not configured, or a helper script missing.

Error body shape

Errors return a JSON object with an error key. Authentication failures add a message; some validation failures add an errors array or a machine-readable code.

jsonRepresentative errors
// 401 — no token supplied
{ "error": "Authentication required", "message": "No authorization token provided" }
// 401 — token expired or unknown
{ "error": "Authentication failed", "message": "Invalid or expired session token" }
// 400 — validation
{ "error": "whitelist parameter must be 0 or 1" }
// 400 — multi-field validation
{ "error": "Validation failed", "errors": ["Label 1: metric is required"] }
// 503 — subsystem unavailable, with a code to branch on
{ "error": "wifi helper not installed", "code": "helper_missing" }

There is no realtime channel

Polling guidance

  • Match your poll interval to the sensor report interval, not to your dashboard’s refresh rate. Most NCD sensors report every 10 minutes by default; polling every 30 seconds for a sensor that reports hourly just burns cycles on an embedded gateway.
  • Poll incrementally. Track the newest timestamp you have already ingested and pass it as start_time on the next request, rather than re-fetching a fixed window.
  • Prefer one call per sensor+metric over broad queries. The readings table grows without bound, and the database index is built for device_id + metric + ts lookups.
  • Be gentle. The EG5100 is a single-core device with no swap. A tight polling loop across dozens of sensors is felt by the whole system.

5. Quick Start

A complete round trip — log in, list sensors, and pull readings — in three calls. Every response below was captured from a live gateway.

  1. 1
    Get a token
    bashLog in and capture the token
    GATEWAY="http://192.168.1.50"
    TOKEN=$(curl -s -X POST "$GATEWAY/api/auth/login" \
      -H 'Content-Type: application/json' \
      -d '{"username":"ncdio","password":"your-password"}' \
      | python3 -c 'import sys,json; print(json.load(sys.stdin)["token"])')
    echo "$TOKEN"
  2. 2
    Find your sensors
    bashList the sensor inventory
    curl -s "$GATEWAY/api/sensors" \
      -H "Authorization: Bearer $TOKEN"

    Note the device_id of a sensor you care about — it is the 64-bit radio MAC, and it is the key for every other call.

  3. 3
    Discover its metrics, then read them
    bashMetrics, then the 10 newest temperature readings
    DEVICE="00:13:a2:00:42:41:65:28"
    # Which metrics does this sensor actually report?
    curl -s "$GATEWAY/api/sensors/$DEVICE/metrics" \
      -H "Authorization: Bearer $TOKEN"
    # → {"device_id":"00:13:a2:00:42:41:65:28",
    #    "metrics":["battery_pct","battery_v","counter","humidity","rssi","temperature"]}
    # Pull the 10 most recent temperature readings
    curl -s "$GATEWAY/api/sensors/$DEVICE/telemetry?metric=temperature&limit=10" \
      -H "Authorization: Bearer $TOKEN"

6. Sensors and Inventory

The sensor object is the backbone of the API. It carries identity, your own asset metadata, the latest health readings, and a computed status — enough to build an asset list in an external system without any further calls.

GET /api/sensors api

Lists all whitelisted sensors, newest-reporting first. Returns a bare JSON array, not a wrapper object.

Query parameters

ParameterTypeDefaultDescription
qstring—Case-insensitive substring search across device ID, sensor name, location, asset, and custom name. Also matches a device ID typed without separators.
limitinteger1000Maximum rows. Clamped to the range 1–5000.
bashRequest
curl -s "$GATEWAY/api/sensors?q=office&limit=50" \
  -H "Authorization: Bearer $TOKEN"
jsonResponse 200 — one element of the array
[
  {
    "device_id": "00:13:a2:00:42:41:65:28",
    "sensor_type": 1,
    "sensor_name": "1 - Temperature/Humidity",
    "firmware": 10,
    "last_seen_epoch": 1788874772898,
    "last_seen_utc": "2026-09-08T13:39:32.000Z",
    "last_rssi": 40,
    "last_battery_v": 3.29,
    "last_battery_pct": 99.64,
    "location": "Travis' Office",
    "asset": "Jesse's Desk",
    "name": "Travis Office Temperature/Humidity",
    "install_date": "2026-06-02",
    "report_interval": 600,
    "last_error": null,
    "last_error_ts": null,
    "first_seen_ts": 1788536218806,
    "is_online": true,
    "has_active_alert": false,
    "status": "healthy"
  }
]

The sensor object

FieldTypeDescription
device_idstringThe sensor’s 64-bit DigiMesh MAC. Immutable, and the key for every per-sensor endpoint.
sensor_typeintegerNCD numeric sensor type (e.g. 1 = Temperature/Humidity). See /api/sensor-types.
sensor_namestring|nullFactory-reported type name.
firmwareinteger|nullSensor firmware revision.
last_seen_epochinteger|nullLast packet received, epoch ms.
last_seen_utcstring|nullThe same instant as an ISO 8601 string, for convenience.
last_rssinumber|nullSignal strength from the last packet. Lower is better — this is a positive dBm magnitude, so 40 is a strong link and 90 is marginal.
last_battery_vnumber|nullBattery volts.
last_battery_pctnumber|nullBattery percentage, 0–100.
locationstring|nullOperator-assigned location. Writable — see Section 8.
assetstring|nullOperator-assigned asset. Use this to carry your CMMS asset ID.
namestring|nullOperator-assigned friendly name, overriding sensor_name in the UI.
install_datestring|nullYYYY-MM-DD.
report_intervalintegerExpected seconds between reports. Defaults to 600. Drives the offline calculation.
last_errorstring|nullMost recent sensor-reported error, if any.
last_error_tsinteger|nullWhen that error arrived, epoch ms.
first_seen_tsinteger|nullFirst time the gateway ever saw this device. Present on the list endpoint only.
is_onlinebooleantrue when the last packet is newer than twice report_interval.
has_active_alertbooleantrue if any enabled trigger or alert template is currently firing for this device. Present on the list endpoint only.
statusstringComputed health. See the table below.

How status is computed

Evaluated in this order, first match wins:

StatusCondition
offlineis_online is false — no packet within twice the report interval.
errorA last_error is present, or battery ≤ 30%, or RSSI ≥ 75 (weak signal).
healthyEverything else.
GET /api/sensors/:id api

A single sensor, keyed by device_id. Returns the same object as the list endpoint, minus first_seen_ts and has_active_alert.

bashRequest
curl -s "$GATEWAY/api/sensors/00:13:a2:00:42:41:65:28" \
  -H "Authorization: Bearer $TOKEN"

Returns 404 with {"error":"Sensor not found"} for an unknown device ID.

GET /api/sensor-types api

Every sensor type present on this gateway with a count of devices, most common first. A cheap way to learn what hardware is deployed before iterating the full inventory.

jsonResponse 200
[
  { "type": 111, "count": 449 },
  { "type": 115, "count": 209 },
  { "type": 1,   "count": 60  }
]
GET /api/sensors/:id/status-history api

Health transitions for one sensor, newest first — the audit trail behind the current status. Useful for reliability reporting and for confirming an intermittent sensor really is intermittent.

Query parameters

ParameterTypeDefaultDescription
limitinteger50Maximum transitions returned.
jsonResponse 200
[
  {
    "id": 4127,
    "device_id": "00:13:a2:00:42:41:65:28",
    "old_status": "healthy",
    "new_status": "offline",
    "reason": "no report within 2x interval",
    "ts": 1788861600000
  }
]

7. Telemetry Readings

This is the endpoint most integrations spend all their time in. Readings are stored as one row per (timestamp, device_id, metric), so a single sensor reporting temperature and humidity produces two rows per report.

GET /api/sensors/:id/metrics api

Lists the metric names this sensor has actually reported. Always call this before hard-coding metric names — the available metrics depend on sensor type, firmware, and configuration, not on a fixed catalog.

jsonResponse 200
{
  "device_id": "00:13:a2:00:42:41:65:28",
  "metrics": ["battery_pct","battery_v","counter","humidity","rssi","temperature"]
}

Note that battery_pct, battery_v, rssi, and counter appear alongside the real measurements — the gateway stores sensor health as ordinary metrics, so you can trend battery life exactly like temperature.

GET /api/sensors/:id/telemetry api

Returns readings for one sensor, optionally filtered to a single metric and time window.

Query parameters

ParameterTypeDefaultDescription
metricstringall metricsRestrict to one metric name. Strongly recommended — without it you get every metric interleaved in one list.
start_timeinteger—Inclusive lower bound on timestamp, epoch ms.
end_timeinteger—Inclusive upper bound on timestamp, epoch ms.
limitinteger1000Maximum rows, capped at 10000. Applies to raw queries only.
bucket_msinteger—Requests time-bucketed aggregation: one averaged row per bucket of this many milliseconds.
bashThe three requests you will actually make
# 1. Current value of one metric
curl -s "$GATEWAY/api/sensors/$DEVICE/telemetry?metric=temperature&limit=1" \
  -H "Authorization: Bearer $TOKEN"
# 2. Everything new since the last time you polled (incremental — do this)
curl -s "$GATEWAY/api/sensors/$DEVICE/telemetry?metric=temperature&start_time=1788874000000&limit=5000" \
  -H "Authorization: Bearer $TOKEN"
# 3. A fixed historical window
curl -s "$GATEWAY/api/sensors/$DEVICE/telemetry?metric=temperature&start_time=1788790000000&end_time=1788876400000" \
  -H "Authorization: Bearer $TOKEN"
jsonResponse 200 — raw readings
{
  "device_id": "00:13:a2:00:42:41:65:28",
  "metric": "temperature",
  "bucket_ms": null,
  "count": 3,
  "readings": [
    {
      "timestamp": 1788874772898,
      "device_id": "00:13:a2:00:42:41:65:28",
      "metric": "temperature",
      "value": 25.2,
      "counter": 14,
      "sensor_type": 1,
      "firmware": 10,
      "rssi": 40,
      "tags": "{\"nodeId\":0}"
    },
    {
      "timestamp": 1788874742279,
      "device_id": "00:13:a2:00:42:41:65:28",
      "metric": "temperature",
      "value": 25.26,
      "counter": 13,
      "sensor_type": 1,
      "firmware": 10,
      "rssi": 40,
      "tags": "{\"nodeId\":0}"
    }
  ]
}

The reading object

FieldTypeDescription
timestampintegerWhen the gateway recorded the reading, epoch ms UTC.
device_idstringSource sensor.
metricstringMetric name.
valuenumberThe measurement, in the sensor’s native unit.
counterinteger|nullSensor’s own transmission counter. Gaps indicate packets that never arrived — useful for link-quality auditing.
sensor_typeinteger|nullType as reported in that packet.
firmwareinteger|nullFirmware as reported in that packet.
rssiinteger|nullSignal strength for that packet.
tagsstring|nullA JSON-encoded string, not an object — e.g. "{\"nodeId\":0}". Parse it a second time if you need the contents.

Bucketed aggregation

Passing bucket_ms switches the endpoint into an aggregating mode that groups readings into fixed time buckets and returns an average per bucket, plus min_v, max_v, and a sample count n. Accepted values are clamped to between 1 second and 24 hours, and the aggregated result is capped at 5000 buckets.

jsonAggregated response shape (fields, not values, are reliable)
{
  "device_id": "00:13:a2:00:42:41:65:28",
  "metric": "temperature",
  "bucket_ms": 3600000,
  "count": 250,
  "readings": [
    {
      "timestamp": 1788867578278,   // bucket start (currently NOT aligned — see warning)
      "device_id": "00:13:a2:00:42:41:65:28",
      "metric": "temperature",
      "value": 24.71,               // mean of the bucket
      "min_v": 24.71,
      "max_v": 24.71,
      "n": 1,                       // samples in the bucket
      "counter": 35,
      "sensor_type": 1,
      "firmware": 10,
      "rssi": 40
    }
  ]
}

Note that bucketed results are ordered ascending by bucket, the opposite of raw results.

GET /api/sensors/:id/fft api

Lists stored raw vibration waveform captures for a vibration sensor, newest first. Returns capture metadata — probe, sample rate, sample count, full-scale range, temperature, RPM, and a confidence figure — not the waveform itself. To ask a sensor for a new capture, see Waveform requests.

ParameterTypeDefaultDescription
start_timeinteger—Lower bound, epoch ms.
end_timeinteger—Upper bound, epoch ms.
limitinteger50Maximum captures, capped at 200.
probe1 | 2—Only captures from this probe of a two-probe sensor. Any other value is a 400. Platform 2.9.3+.
jsonResponse 200
{
  "device_id": "00:13:a2:00:5a:00:00:07",
  "count": 1,
  "fft_readings": [
    { "id": 2145, "timestamp": 1794865703904, "device_id": "00:13:a2:00:5a:00:00:07",
      "sensor_type": 111, "probe": "1", "odr": 1640, "total_samples": 2048, "fsr": "8g",
      "temperature": 23.3, "rpm": 1800, "fft_confidence": "100.00%",
      "created_at": 1794865703000 }
  ]
}
GET /api/sensors/:id/fft/:fftId api

Retrieves one stored capture by its id, including the samples (raw_data) and, from platform 2.9.3, its probe. To compute a spectrum from it, see Section 15.

probe is "1", "2", or null for a capture stored before the gateway recorded it.

8. Metadata, Labels and Units

Atrium stores operator-supplied context alongside each sensor. These endpoints are writable, which makes the gateway a downstream consumer of your system of record rather than a second place to maintain asset names by hand.

GET /api/sensors/:id/meta api

The raw metadata row for one sensor. Returns {} if no metadata has ever been saved.

jsonResponse 200
{
  "device_id": "00:13:a2:00:42:41:65:28",
  "location": "Travis' Office",
  "asset": "Jesse's Desk",
  "name": "Travis Office Temperature/Humidity",
  "install_date": "2026-06-02",
  "report_interval": 600,
  "offline_alert_enabled": 1,
  "offline_alert_emails": "travis@ncd.io"
}
POST /api/sensors/:id/meta api

Creates or replaces the metadata row and returns the merged result.

Request body

FieldTypeNotes
locationstringFree text. Blank or omitted becomes null.
assetstringFree text. The natural home for an external asset ID.
namestringFriendly name. sensor_name is accepted as an alias.
install_datestringYYYY-MM-DD. A longer date string is truncated to that form.
report_intervalintegerSeconds. Defaults to 600 if omitted or unparseable. Drives offline detection.
offline_alert_enabledbooleanEmail when this sensor stops reporting.
offline_alert_emailsstringRecipient list for the offline alert.
bashPush your CMMS asset ID onto a sensor
curl -s -X POST "$GATEWAY/api/sensors/$DEVICE/meta" \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
        "location": "Plant 2 / Line 4",
        "asset": "PUMP-00417",
        "name": "Line 4 Feed Pump — Bearing",
        "install_date": "2026-06-02",
        "report_interval": 600,
        "offline_alert_enabled": true,
        "offline_alert_emails": "maintenance@example.com"
      }'

The response is the stored row, so you can confirm exactly what was persisted.

GET /api/sensors/:id/metric-labels api

Custom display labels for this sensor’s metrics.

jsonResponse 200
{ "labels": [ { "metric": "temperature", "label": "Bearing Temp" } ] }
POST /api/sensors/:id/metric-labels api

Sets labels in bulk. Send {"labels":[{"metric":"...","label":"..."}]}. An empty-string label deletes that label.

The core metrics battery_pct, rssi, and counter cannot be relabeled; attempting it returns 400 with a per-item errors array.

GET /api/sensors/:id/metric-conversions api

Unit-conversion formulas configured for this sensor’s metrics. Important for integrators: these are applied by the web interface for display. Stored telemetry — and therefore what the API returns — is always unconverted. If a customer has configured a conversion, read it here and apply the same arithmetic so your figures match what they see on screen.

jsonResponse 200
{
  "conversions": [
    { "metric": "temperature", "formula": "value * 9 / 5 + 32",
      "unit": "°F", "label": "Bearing Temp", "visible": true }
  ]
}

The formula is a JavaScript expression in a single variable, value.

POST /api/sensors/:id/metric-conversions api

Sets conversions in bulk via {"conversions":[…]}. Each formula is validated by evaluation against sample inputs before it is stored, so a malformed expression is rejected with 400 rather than silently breaking the customer’s dashboard. Core metrics cannot be converted.

GET /api/sensors/:id/chart-order api

The operator’s preferred chart ordering for this sensor’s metrics, as an array of metric names. Purely a display preference.

POST /api/sensors/:id/chart-order api

Sets it. Body is {"order":["temperature","humidity"]}; maximum 100 entries.

Synthetic variables

Synthetic variables are computed metrics — a formula over readings from one or more real sensors, stored back into the readings table under the device ID synthetic. Use them to expose a derived value (a differential, an efficiency figure, a total) to your integration without recomputing it downstream.

GET /api/synthetic-variables api

Lists all synthetic variables as {synthetic_variables:[…], count}. Each carries id, name, formula, unit, label, and its inputs array.

GET /api/synthetic-variables/:id api

One synthetic variable. 404 if unknown.

POST /api/synthetic-variables api

Creates one. Requires name, formula, and a non-empty inputs array in which every entry has var, device_id, and metric. The formula is validated before saving. Returns 201 with the generated id.

jsonRequest body
{
  "name": "supply_return_delta",
  "formula": "supply - return_",
  "unit": "°C",
  "label": "Supply/Return Δ",
  "inputs": [
    { "var": "supply",  "device_id": "00:13:a2:00:42:41:65:28", "metric": "temperature" },
    { "var": "return_", "device_id": "00:13:a2:00:42:41:65:99", "metric": "temperature" }
  ]
}

Read the resulting values back from the readings table using device ID synthetic and the variable’s name as the metric.

POST /api/synthetic-variables/test api

Dry-runs a formula against literal values without saving anything. Body is {"formula":"a+b","inputs":[{"var":"a","value":1},{"var":"b","value":2}]}; returns {"ok":true,"result":3,…}, or 400 with the evaluation error.

DELETE /api/synthetic-variables/:id api

Deletes the variable and purges its computed readings. Not reversible.

9. Device Management

Atrium separates devices it has heard from devices it is watching. A gateway in a busy RF environment often sees hundreds of neighboring NCD sensors; only whitelisted ones appear in the sensor list and generate alerts.

GET /api/devices api

Lists devices on one side of the whitelist.

Query parameters

ParameterTypeRequiredDescription
whitelist0 or 1Yes1 for whitelisted devices, 0 for those seen but not whitelisted.
jsonResponse 200 — bare array
[
  { "device_id": "00:13:a2:00:42:38:62:c6", "sensor_type": 115,
    "sensor_name": null, "is_whitelisted": false, "last_seen_ts": 1780690645050 }
]
POST /api/sensors/:id/whitelist api

Whitelists or un-whitelists a single device. Body is {"is_whitelisted": true}. Anything other than boolean true is treated as false.

POST /api/devices/bulk-whitelist api

Whitelists or un-whitelists many devices at once — the efficient way to commission a batch of sensors.

jsonRequest body
{
  "device_ids": ["00:13:a2:00:42:41:65:28", "00:13:a2:00:42:41:65:99"],
  "is_whitelisted": true
}

Returns {"ok":true,"updated_count":2,"is_whitelisted":true}. An empty or missing array returns 400.

POST /api/devices/bulk-delete api

Removes devices and all associated data — every reading, raw ingest row, metadata row, and alert condition — in a single transaction.

Body is {"device_ids":[…]}; returns {"ok":true,"deleted_count":n}.

POST /api/purge-all-data api

Deletes all telemetry, devices, metadata, and alert rules, then compacts the database. Configuration, users, and sessions survive.

10. Alerts and Alert History

For a CMMS integration, alert history is often more valuable than raw telemetry: it is already a list of discrete events with a device, a metric, a value, and a trigger/clear state — the natural shape of a work order.

GET /api/alerts/history api

The alert event log, newest first. This is the endpoint to poll for CMMS work-order creation.

Query parameters

ParameterTypeDefaultDescription
qstring—Substring match against device ID, sensor name, or metric.
limitinteger100Page size.
offsetinteger0Rows to skip, for paging.
bashRequest
curl -s "$GATEWAY/api/alerts/history?limit=50" \
  -H "Authorization: Bearer $TOKEN"
jsonResponse 200
{
  "history": [
    {
      "id": 338,
      "device_id": "00:13:a2:00:42:41:65:28",
      "sensor_name": "Temperature/Humidity",
      "metric": "automation",
      "alert_type": "automation",
      "event_type": "triggered",
      "value": null,
      "threshold_value": null,
      "condition": "High Temperature Alarm Email",
      "timestamp": 1788190592479,
      "recipient_email": "travis@ncd.io",
      "created_at": 1788190592000,
      "sensor_type": 1
    }
  ],
  "count": 1,
  "limit": 50,
  "offset": 0,
  "search": null
}

The alert-history object

FieldTypeDescription
idintegerMonotonically increasing event ID. Use this as your high-water mark when polling incrementally.
device_idstringSensor that caused the event.
sensor_namestring|nullDisplay name at the time of the event.
metricstringThe metric that breached — or the literal "offline" or "automation" for those event kinds.
alert_typestringthreshold, offline, template, or automation.
event_typestringtriggered or cleared. Both are logged — match them up to compute a duration.
valuenumber|nullReading that caused it. null for offline and automation events.
threshold_valuenumber|nullThe limit that was crossed.
conditionstring|nullabove or below for thresholds. For an automation event this carries the automation’s name instead — a quirk worth handling.
timestampintegerWhen the event occurred, epoch ms.
recipient_emailstring|nullWho was emailed, if anyone.
created_atintegerWhen the row was written, epoch ms.
sensor_typeinteger|nullJoined from the device record.
GET /api/alerts api

Current alert-rule state — one row per rule condition, with active rules first. This is a state view (“what is wrong right now”), where alert history is an event view (“what happened”).

jsonResponse 200
{
  "alerts": [
    { "id": 12, "device_id": "00:13:a2:00:42:41:65:28",
      "sensor_name": "Travis Office Temperature/Humidity",
      "metric": "temperature", "threshold_value": 30, "condition": "above",
      "swing_value": 1.0, "recipient_email": null,
      "alert_active": true, "enabled": true, "created_at": 1780499419019 }
  ],
  "count": 1
}

An empty fleet returns {"alerts":[],"count":0}.

GET /api/sensors/:id/thresholds api

Threshold rules scoped to one sensor, including live alert_active state and the email recipients attached to each rule.

jsonResponse 200
{
  "device_id": "00:13:a2:00:42:41:65:28",
  "thresholds": [
    { "id": 12, "device_id": "00:13:a2:00:42:41:65:28", "metric": "temperature",
      "threshold_value": 30, "condition": "above", "enabled": true,
      "swing_value": 1.0, "alert_active": false,
      "last_alert_time": null, "created_at": 1780499419019,
      "recipient_email": "maintenance@example.com" }
  ]
}
POST /api/sensors/:id/thresholds api

Creates or replaces a simple threshold on one metric.

Request body

FieldTypeRequiredDescription
metricstringYesMetric to watch.
threshold_valuenumberYesThe limit.
conditionstringYesabove or below. Any other value returns 400.
swing_valuenumberNoHysteresis band, default 1.0. Must be ≥ 0. Prevents an alert flapping on a value hovering at the limit.
enabledbooleanNoDefaults to true.
recipient_emailstringNoNotification recipient.
DELETE /api/thresholds/:threshold_id api

Deletes an alert rule by ID. Despite the legacy path name, :threshold_id is an alert-rule ID — the id from GET /api/alerts. Returns {"ok":true,"deleted_id":n}.

Alert templates

A template applies one threshold rule to every sensor matching a pattern — all sensors of a type, or everything in a location or asset group — instead of configuring each device individually. Newly discovered matching sensors inherit it automatically.

GET /api/alert-templates api

All templates, each annotated with matched_device_count so you can see the blast radius before changing one.

jsonResponse 200
{
  "templates": [
    { "id": 3, "name": "Cold room over-temp",
      "match_type": "location", "match_value": "Cold Room A",
      "metric": "temperature", "threshold_value": 8, "condition": "above",
      "swing_value": 0.5, "recipient_email": "ops@example.com",
      "enabled": true, "matched_device_count": 12,
      "created_at": 1780499419019, "updated_at": 1788190592479 }
  ],
  "count": 1
}
GET /api/alert-templates/match-preview api

Previews which devices a match rule would cover, without creating anything. Call this before POSTing a template.

ParameterTypeDefaultDescription
match_typestringallall, sensor_type, location, or asset.
match_valuestring—The value to match. Ignored when match_type is all.
bashRequest
curl -s "$GATEWAY/api/alert-templates/match-preview?match_type=location&match_value=Cold%20Room%20A" \
  -H "Authorization: Bearer $TOKEN"

Returns {"devices":[{device_id, sensor_name, sensor_type, display_name, location, asset}], "count":n}.

POST /api/alert-templates api

Creates a template. Requires name, match_type, metric, and threshold_value; match_value is required unless match_type is all. condition defaults to above, swing_value to 1.0. Returns 201.

PUT /api/alert-templates/:id api

Partial update — send only the fields you want changed.

DELETE /api/alert-templates/:id api

Deletes a template. Returns {"ok":true,"deleted_id":n}.

11. Triggers and Automations

Triggers and automations are the modern, fully manageable alerting path. A trigger is a named condition on one sensor metric. An automation combines one or more triggers with one or more actions. This is the pair to use when your integration needs to create alerting that the customer can also see and edit in the web interface.

GET /api/triggers api

All triggers, each enriched with the sensor’s display name and its current live value for that metric — so one call tells you both the rule and how close it is to firing.

ParameterTypeDescription
device_idstringRestrict to one sensor.
jsonResponse 200
{
  "triggers": [
    { "id": 14, "name": "High Temperature Alarm",
      "device_id": "00:13:a2:00:42:41:65:28", "metric": "temperature",
      "threshold_value": 23.888424038887024, "condition": "above",
      "swing_value": 1, "condition_met": true, "enabled": true,
      "sensor_display_name": "Travis Office Temperature/Humidity",
      "current_value": 25.2,
      "created_at": 1780499419019, "updated_at": 1788190592479 }
  ],
  "count": 1
}

condition_met is the live evaluated state, including hysteresis — not a recomputation of current_value against threshold_value. Trust condition_met.

POST /api/triggers api

Creates a trigger. Requires name, device_id, metric, and threshold_value. condition defaults to above (any value other than below becomes above), swing_value to 1.0. Returns 201.

jsonRequest body
{
  "name": "Bearing over-temp",
  "device_id": "00:13:a2:00:42:41:65:28",
  "metric": "temperature",
  "threshold_value": 85,
  "condition": "above",
  "swing_value": 2
}
PUT /api/triggers/:id api

Partial update of name, threshold_value, condition, swing_value, or enabled. Note that device_id and metric cannot be changed — delete and recreate to re-point a trigger.

DELETE /api/triggers/:id api

Deletes a trigger.

GET /api/automations api

All automations with their triggers and actions nested inline — a complete picture of the customer’s alerting logic in one call.

jsonResponse 200
{
  "automations": [
    {
      "id": 13,
      "name": "High Temperature Alarm Email",
      "logic": "AND",
      "enabled": true,
      "active": true,
      "last_triggered_time": 1788190592479,
      "created_at": 1780499419019,
      "updated_at": 1788190592479,
      "triggers": [
        { "id": 14, "name": "High Temperature Alarm",
          "device_id": "00:13:a2:00:42:41:65:28", "metric": "temperature",
          "threshold_value": 23.888424038887024, "condition": "above",
          "swing_value": 1, "condition_met": true,
          "sensor_display_name": "Travis Office Temperature/Humidity" }
      ],
      "actions": [
        { "id": 13, "action_type": "email",
          "config": { "recipients": "travis@ncd.io", "subject": "", "body": "" },
          "enabled": true, "fires_on": "trigger" }
      ]
    }
  ]
}
FieldDescription
logicHow multiple triggers combine. Currently always AND — every trigger must be met.
activeWhether the automation is currently in its triggered state.
enabledWhether it is being evaluated at all.
actions[].action_typeemail or relay_command. There is no HTTP or webhook action type.
actions[].fires_ontrigger, clear, or both — which edge runs the action.
POST /api/automations api

Creates an automation from existing triggers. Requires name, a non-empty trigger_ids array, and a non-empty actions array. Returns 201 with the new id.

jsonRequest body
{
  "name": "Bearing over-temp → maintenance",
  "trigger_ids": [14],
  "actions": [
    { "action_type": "email",
      "config": { "recipients": "maintenance@example.com",
                  "subject": "Bearing over-temperature",
                  "body": "" },
      "fires_on": "trigger" }
  ]
}
PUT /api/automations/:id api

Updates an automation. Supplying trigger_ids or actions replaces the existing sets rather than adding to them.

DELETE /api/automations/:id api

Deletes an automation. Its triggers survive and can be reused.

12. Event Bus

The inter-app event bus lets installed Atrium apps publish events and expose actions, which an operator wires together on the Automations page. Most external integrations will not need it — but two of its read endpoints are genuinely useful as a diagnostic feed.

How it works, briefly

The bus is level-triggered. Producers publish the current state of an entity rather than an edge event, the broker retains the last value per topic and entity, and a binding fires only when its match result changes. The practical consequence for you: a value you read from /api/bus/state is the current truth, not a transient you might have missed.

GET /api/bus/state api

The retained current value for every (topic, entity) pair — “what does the bus believe right now”. Filter with topic, source, or a free-text q.

jsonResponse 200
{
  "state": [
    { "topic": "atrium/alert", "entity_key": "00:13:a2:00:42:41:65:28:temperature",
      "source": "atrium", "seq": 8814, "ts": 1788190592479,
      "payload": { "kind": "threshold", "state": "triggered", "active": true,
                   "device_id": "00:13:a2:00:42:41:65:28",
                   "metric": "temperature", "value": 25.2, "threshold": 23.88,
                   "condition": "above" } }
  ],
  "count": 1
}
GET /api/bus/events api

The recent event log, newest first. Roughly a week of traffic is retained.

ParameterTypeDefaultDescription
topicstring—Exact topic match, e.g. atrium/alert.
sourcestring—Publishing source — atrium or an app ID.
entity_keystring—Exact entity match.
sinceinteger—Epoch-ms floor on ts. Use the gateway’s clock, from /api/system/time.
qstring—Free-text contains across topic, entity, and payload.
limitinteger100Capped at 500.

Each event carries seq, topic, entity_key, source, a parsed payload object, ts, origin, and delivered.

GET /api/bus/catalog api

Everything wireable on this gateway: sources, publishable events with their payload schemas, and invocable actions. This is how you discover what the installed apps expose without reading their manifests.

GET /api/bus/bindings api

Configured event→action bindings. Filter by source_topic or target_app.

GET /api/bus/bindings/:id api

One binding, plus its per-entity match state and its 50 most recent dispatch runs — the first place to look when a customer says an automation “didn’t fire”.

POST /api/bus/bindings api

Creates a binding. Requires name, a source_topic of the form <source>/<name>, and target_kind of app or email; app additionally requires target_app and target_action. fires_on is enter, exit, or both (default). match, params, and clear_params are JSON. Returns 201 with the created binding.

PATCH /api/bus/bindings/:id api

Partial update. Re-enabling or re-pointing a binding also clears its failure counter and circuit breaker.

DELETE /api/bus/bindings/:id api

Deletes a binding; its state and run history cascade away with it.

GET /api/bus/runs api

Dispatch history across all bindings. Filter by binding_id, ok (true/false), edge (enter/exit/manual), since, and free-text q; limit defaults to 100, capped at 500.

POST /api/bus/publish api

Publishes a diagnostic event into the atrium namespace. Body is {"topic":"my-event","key":"entity-1","payload":{…} }; topic must be an unqualified name and is published as atrium/<topic>.

This lets an external system inject an event that the customer can then wire to an Atrium action — the one place the API can push into gateway logic. Delivery is asynchronous, handled by the daemon within about a second.

GET /api/bus/status ingest

Broker counters plus which declared actions are actually bound. The answer to “why is my binding reporting action not available“.

POST /api/bus/bindings/:id/run ingest

Dispatches a binding immediately against its current retained state, bypassing the circuit breaker — an end-to-end wiring test. Body may set {"edge":"exit"}; the default is enter.

13. Gateway Configuration and System

Read the gateway’s identity and settings, manage user accounts, and drive firmware updates.

GET /api/gateway/config api

The full configuration as a flat key/value object. Call this first in any integration — it tells you the platform version and hardware model, which determine which endpoints exist.

jsonResponse 200 — representative keys
{
  "gateway_name": "Gateway-D8FC",
  "platform_version": "2.5.3",
  "gateway_model": "EG5120",
  "display_timezone": "America/Chicago",
  "data_retention_days": "30",
  "temperature_unit": "C",
  "dashboard_refresh_interval": "30",
  "new_sensor_handling": "whitelist",
  "default_home_page": "/sensors",
  "remote_access_enabled": true,
  "remote_access_provisioned": true,
  "remote_access_hostname": "d8fc.iolight.com",
  "nodered_enabled": false,
  "proxy_enabled": false,
  "proxy_scheme": "http",
  "proxy_auth_type": "none"
}

Keys worth knowing

KeyTypeDescription
gateway_namestringDisplay name. Also substituted into MQTT topic paths as {gateway_id}.
platform_versionstringAtrium version, e.g. 2.5.3. Gate your feature use on this.
gateway_modelstringEG5120 or EG5100. The EG5100 has no cellular modem and hides Remote Access.
data_retention_daysstringHow long telemetry is kept before nightly deletion. Your integration must poll often enough to stay inside this window, or you will lose data permanently.
temperature_unitstringC or F. A display preference only — the API always returns native units.
display_timezonestringIANA zone for the UI and reports. The API always returns UTC.
remote_access_enabledbooleanWhether the tunnel is intended to be up.
remote_access_provisionedbooleanWhether this unit actually has a tunnel provisioned. If enabled is true but this is false, remote access will never come up.
remote_access_hostnamestring|nullThe public hostname, with no scheme. Prefix with https://.
POST /api/gateway/config api

Writes the settings keys. gateway_name is required on every call; omitting it returns 400.

Toggling remote_access_enabled starts or stops the tunnel immediately. If the unit was never provisioned, the response includes a warning and the setting is stored but has no effect.

GET /api/users api

Admin username plus viewer-account state. Admin only — a viewer token gets 403 {"error":"Admin access required"}.

jsonResponse 200
{
  "admin_username": "ncdio",
  "viewer": { "exists": true, "username": "integrations",
              "enabled": true, "allowed_pages": ["/sensors","/monitor"] }
}

Webhook bindings 2.6.0+

A binding’s target_kind may be webhook as well as app or email. The gateway then POSTs the event to a URL you configure whenever the binding’s match result changes. This is the one way the gateway calls an external system over HTTP.

params fieldTypeNotes
urlstringRequired. http:// or https://. No {{placeholders}}: it is sent exactly as written.
headersobjectOptional header map, for example an Authorization header for your receiver. Not templated.
bodyobject or stringOptional, templated. Omit it to receive the standard envelope below.
jsonStandard webhook body
{
  "gateway": { "name": "Gateway-1A2B" },
  "event": { "topic": "machine-health/asset.health", "entity_key": "asset:7",
             "source": "machine-health", "ts": 1757400000000, "seq": 4812 },
  "edge": "enter", "manual": false,
  "binding": { "id": 3, "name": "notify the CMMS" },
  "payload": { "asset_id": 7, "asset_name": "Pump 7", "severity": "critical" }
}

Every delivery carries X-Atrium-Timestamp (epoch ms) and X-Atrium-Signature, which is v1= followed by the hex HMAC-SHA256 of timestamp + "." + body under the gateway’s signing secret. It also carries X-Atrium-Event, X-Atrium-Entity, X-Atrium-Edge, X-Atrium-Binding and X-Atrium-Delivery (a UUID per attempt).

GET /api/bus/webhook-secret api

The signing secret: {secret, created_at, scheme: "v1", signed}. Created on first request. Operator sessions only; no API token can read it.

POST /api/bus/webhook-secret/rotate api

Replaces the secret. It applies to the next delivery, and every receiver still holding the old one fails verification from then on. Same shape, plus "rotated": true.

Running an app action directly 2.6.0+

POST /api/bus/actions/:appId/:actionId ingest

Runs one action an installed app declares, now, outside any binding. Body is {"params": {…} } with the parameters that action takes; GET /api/bus/catalog and GET /api/apps/reads list the actions and their parameters.

Needs an operator session or the apps:actions scope. Returns the action’s result. 404 when the app does not declare the action, 409 when the app is not running a handler for it, 400 when the app rejects the parameters.

POST /api/users/viewer api

Creates or updates the single viewer account — the recommended way to provision a dedicated login for an integration. Admin only.

jsonRequest body
{
  "username": "integrations",
  "password": "a-strong-unique-password",
  "enabled": true,
  "allowed_pages": ["/sensors", "/monitor"]
}
  • A blank password preserves the existing one, so you can change grants without knowing it.
  • A password is required when creating the account for the first time.
  • The viewer username must differ from the admin’s.
  • Setting enabled: false immediately invalidates that account’s active tokens.
DELETE /api/users/viewer api

Removes the viewer account and its sessions. Admin only.

Settings added since 2.5.3

Key in /api/gateway/configSinceMeaning
network_id2.7.0The radio network ID. Read it here; change it only through the network ID endpoints.
sensor_link_recovery2.9.1Sensor Link Assurance, true or false (default). A POST changes it only when the body carries it.
network_monitoring2.9.1The network monitoring settings document, the same one Section 16 reads and writes.

Firmware updates

Atrium updates itself over the air from NCD’s public release repository. These endpoints drive that process; all four are on atrium-api.

POST /api/system/check-updates api

Queries the release repository and caches the result. Returns {"ok":true,"update_available":bool,"available_version":string|null}. A transient network failure still returns 200 with ok:false and an error string, so branch on ok rather than on the status code.

POST /api/system/execute-update api

Applies the update found by the last check. Returns immediately with {"ok":true,"status":"running"}; the work happens in the background. 400 if no update is pending.

POST /api/system/force-update api

Installs a specific version regardless of what the check found. Body is {"version":"2.5.3"}; required. Returns 404 if no such release or package exists.

GET /api/system/update-progress api

Poll this during an update. Returns {step, message, percent, status, timestamp}, with status of idle, running, or error. When nothing is running you get {"step":"none","status":"idle","percent":0}.

Sensor library

The decoder library that turns radio packets into named metrics is versioned separately from the platform and can be updated without a full firmware update.

GET /api/system/sensor-library api

Returns {package, installed_version, latest_version, update_available, last_checked, updating, progress}.

POST /api/system/sensor-library/check api

Queries the npm registry for the newest published version and caches it. Like the firmware check, registry failures return 200 with ok:false.

POST /api/system/sensor-library/update api

Installs a version — {"version":"2.0.4"}, or the cached latest if omitted — then restarts the ingest daemon. Returns 409 if an update is already running, 400 for a malformed version or when nothing is cached.

Because this restarts the daemon, the radio stops briefly and radio-coupled endpoints will fail for a few seconds.

GET /api/system/sensor-library/update-progress api

Progress of an in-flight library update, in the same shape as the firmware progress endpoint.

Email and outbound proxy

POST /api/gateway/smtp-test ingest

Sends a single test email using credentials supplied in the body, without saving them. Returns 200 on success; 400 for a validation failure and 500 for a send failure, with a stage field indicating where it went wrong.

GET /api/gateway/proxy api

Outbound HTTP proxy settings, for gateways behind a corporate proxy. Secrets are never returned — instead you get has_password, has_client_cert, has_client_key, and has_ca_cert booleans.

POST /api/gateway/proxy api

Saves proxy settings. When proxy_enabled is true, proxy_host is required and proxy_port must be 1–65535. Any supplied PEM material is validated before it is persisted. Supports none, basic, and digest authentication, plus client certificates.

POST /api/gateway/proxy-test api

Tests a proxy configuration before committing it, optionally against your own test_url. Returns the observed HTTP status and a stage on failure.

Node-RED

Node-RED ships installed but dormant. A customer can enable it to run their own flows against the gateway’s raw-frame TCP feed on port 2101. It is never in the /api path and never owns the radio.

GET /api/system/nodered api

Returns {enabled, running, registered, status}, separating the user’s intent (enabled) from live process state.

POST /api/system/nodered api

Body {"enabled": true|false}. Starts or removes the process and persists the choice across reboots. Once running, the Node-RED editor is on port 1880.

14. Network Configuration

Atrium manages the gateway’s own WAN, LAN, WiFi, cellular, and NTP settings. These endpoints exist so the customer never has to visit the underlying router dashboard.

The commit-confirm pattern

  1. 1
    Apply the change
    POST to /api/network/ipv4, /api/network/lan, or /api/network/wifi. The gateway applies it and arms a rollback timer.
  2. 2
    Re-establish contact
    Reach the gateway again at its new address. If you cannot, do nothing — the watchdog reverts the change on its own.
  3. 3
    Confirm
    POST /api/network/confirm to make the change permanent. Miss the window and the gateway returns to its previous configuration.
GET /api/network/status api

Complete network state — interfaces, addresses, cellular, NTP, and the available timezone list. Read-only and always safe.

On a gateway that cannot report (helper not installed) it returns 200 with {"ok":true,"available":false,"code":"helper_missing"} rather than an error, so treat available as the gate. On an EG5100, cellular is null and cellular_supported is false — that is the hardware fact, not a missing configuration.

POST /api/network/confirm api

Confirms a pending network change, cancelling the rollback. Returns {"ok":true,"confirmed":true}. Takes no body.

POST /api/network/ipv4 api

Sets the IPv4 configuration of one interface. Requires target (wifi or ethernet) and connection_type (dhcp or manual); a manual configuration also takes address, gateway, dns1, and dns2. Arms the watchdog.

POST /api/network/lan api

Sets the LAN address and DHCP server pool: address, dhcp_enable, pool_start, pool_end, dns1, dns2, lease_time. Subnet and pool arithmetic is validated before anything is applied. Always requires the watchdog.

GET /api/network/wifi/status api

Current WiFi mode, SSID, link state, IP, and the reason for any previous rollback. Also reports watchdog — if false, a client-mode switch will be refused.

GET /api/network/wifi/scan api

Scans for visible networks and returns {"ok":true,"networks":[…]}. Takes up to 30 seconds — set your client timeout accordingly.

POST /api/network/wifi api

Switches WiFi mode. Requires mode of ap or client; client mode also takes ssid, password, security, hidden, and bssid. A client switch requires the watchdog, so a wrong password reverts to the access point instead of stranding the unit.

POST /api/network/cellular api

Configures the cellular modem: primary_sim (sim1/sim2), apn, username, password, auth_type (none/chap/pap), and optional extra_at_cmd. A username is required when authentication is CHAP or PAP.

EG5120 only. On an EG5100 this returns 403 with {"code":"unsupported_hardware"} — enforced server-side, not merely hidden in the UI.

POST /api/network/ntp api

Sets time synchronization: primary_server, optional secondary_server, and timezone. Servers must be a hostname or IPv4 address.

15. Radio, Mesh and Sensor Configuration

These endpoints reach the DigiMesh radio itself. They live on the ingest daemon because only that process owns the serial port — and unlike a database read, they have physical consequences.

GET /api/sensors/config-options/:type ingest

The configuration schema for a sensor type — every option, its valid range, and its meaning. Call this before attempting to write a sensor configuration, so you send only fields the hardware accepts.

ParameterTypeDefaultDescription
:typeinteger—Path parameter: the numeric sensor type.
firmwareinteger1Firmware revision, since options vary by revision.

Returns 400 with an error string for a type the sensor library does not recognize.

GET /api/sensors/:id/sensor-config ingest

One sensor’s configuration: reported_configs (what the sensor last told us), desired_configs (what is queued for it), plus report_interval_info explaining the expected cadence and diagnostics for read-only counters. A device that has never checked in returns {"reported_configs":{},"desired_configs":{} }. Needs a session or the radio:config scope.

From platform 2.7.1 it also reports what happened to your last change, in sync_status:

sync_status.outcomeMeaning
in_syncNothing is waiting. Reported matches desired.
sendingA push is on the air now.
appliedThe sensor acknowledged and now holds the new values.
not_keptThe sensor acknowledged but still reports its old values.
rejectedThe sensor refused the push. rejection carries its error code.
no_ackThe settings were sent and the sensor did not answer.
not_acceptedThe gateway has stopped pushing after three not_kept or rejected results. A new save or a discard re-arms it.
deferredThe radio was busy; the push goes at a later check-in.
unreachableWith Sensor Link Assurance on: no route to the sensor was found in its window, so nothing was sent. It goes again at the next check-in.
unmanagedAtrium’s configuration of this sensor is switched off.

Alongside it: last_check_in, an estimated next_check_in, message (a sentence for a person), keys (the settings concerned), delivery (the gateway modem’s transmit status for each frame, from 2.8.2) and out_of_range (values outside the schema). config_management is false when Atrium is not configuring the sensor, and link is the sensor’s radio link as the gateway last saw it.

Diagnostic values arrive on the sensor’s check-in packet rather than with telemetry, so they refresh on the sync interval (default one hour). Present them as “as of last check-in”, not as live values.

POST /api/sensors/:id/sensor-config ingest

Queues a configuration change. The body is an array, not an object: [{"addr":"<device_id>","configs":{…},"type":<sensor_type>}]. Send only the settings you are changing; the gateway merges them into the stored configuration.

Needs a session or the radio:config scope. With a token, every entry’s addr must equal the :id in the path, or the call is a 400: one call configures one sensor. 409 while configuration management is off for the sensor.

POST /api/sensors/:id/sensor-config/management ingest

Body {"enabled": true | false}. Whether Atrium configures this sensor at all. Turn it off for a sensor something else configures, such as a Node-RED flow, so the two do not rewrite it at every wake. While off, the gateway records what the sensor reports and never pushes. Either direction discards pending changes. Operator sessions only. Platform 2.7.1+.

POST /api/sensors/:id/sensor-config/discard ingest

Drops the sensor’s pending changes, setting desired back to reported, and re-arms a push the gateway gave up on. 404 if the sensor has never checked in. Operator sessions only. Platform 2.7.1+.

POST /api/sensors/:id/sensor-config/point-to-multipoint ingest

Body {"enabled": true | false}. Sends this sensor’s configuration frames straight to its radio with no mesh route. Use it when pushes end no_ack because finding a route takes longer than the sensor listens. It reaches only a sensor in the gateway’s direct radio range. Takes effect at the next check-in. Operator sessions only. Platform 2.8.2+.

GET /api/mesh-topology api

The whole mesh as {nodes, edges, routes} — a graph you can render directly. Nodes carry a role of gateway, repeater, or sensor plus their hop depth; edges carry link-test results including retry counts and min/max/average RSSI. A pure database read, safe to poll.

GET /api/sensors/:id/mesh-map api

The stored route for one sensor: status, route array, hop_count, and timing. Returns {"exists":false,"device_id":"…"} if no mapping has ever been requested.

POST /api/sensors/:id/mesh-map ingest

Queues a route trace and link test. Returns {"success":true,"device_id":"…","status":"pending"}. Poll the GET above for the result. Needs a session or the radio:mesh scope. From platform 2.9.1 the result is also recorded as a network test in Section 16.

POST /api/sensors/:id/request-fft ingest

Asks a vibration sensor for a raw waveform capture. The web interface calls this a waveform request; the path keeps its older name. Needs a session or the radio:fft scope.

FieldTypeDescription
probestring"1" (default), "2", "both" or "custom". Anything else is a 400.
customobjectRequired when probe is "custom". Platform 2.9.2+.
custom.probestring"1", "2" or "both".
custom.sample_rateintegerSamples per second: 100, 200, 400, 800, 1600, 3200, 6400, 12800 or 25600.
custom.duration_msinteger50 to 5000, in steps of 50.
bashRequest a custom capture
curl -X POST http://192.168.1.50/api/sensors/00:13:a2:00:5a:00:00:07/request-fft \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"probe":"custom","custom":{"probe":"1","sample_rate":3200,"duration_ms":1000} }'
jsonResponse 200
{ "success": true, "device_id": "00:13:a2:00:5a:00:00:07", "probe": "custom",
  "custom": { "probe": "1", "sample_rate": 3200, "duration_ms": 1000 },
  "status": "pending" }

The response carries no data. The request goes out right after the sensor’s next data report, and the capture arrives later as a new row in GET /api/sensors/:id/fft. A "both" request produces two rows, one per probe. To see whether a request was delivered, answered or refused, read the sensor’s communication log with purpose=fft.

POST /api/sensors/:id/fft/:fftId/analyze ingest

Runs spectral analysis on a stored capture and returns the computed spectrum. No radio involved — it processes data already on the gateway — but it is CPU-intensive Python. On an EG5100 (single core, no swap) expect it to be slow and avoid running several at once. Returns 503 if the analysis subsystem is unavailable.

Radio network ID 2.7.0+

The network ID (DigiMesh PAN ID) decides which sensors the gateway can hear. Changing it is a two-part move: each sensor is told the new ID at its next check-in, and the gateway follows once they have gone. All four endpoints need an administrator session or the radio:network scope; the read also accepts system:read.

GET /api/gateway/network-id ingest
jsonResponse 200
{
  "network_id": "7FFF",
  "modem_network_id": "7FFF",
  "sensors": { "on_network": 9, "other_network": [], "manual": ["00:13:a2:00:5a:00:00:01"] },
  "migration": null,
  "radio_busy": false
}

network_id is the configured ID and modem_network_id what the radio reports now (null while a sensor firmware update holds it). sensors.manual lists sensors that do not report a network ID, which the gateway cannot move for you. migration is the change in progress, or the last one.

POST /api/gateway/network-id ingest

Body {"network_id": "7FFE", "move_sensors": true}. The ID is hexadecimal, 0000 to 7FFF, and not 7AAA, which is reserved for firmware updates.

move_sensorsBehaviour
true (default)Queues the new ID for every sensor now on the gateway’s network and returns at once. Each sensor counts as moved when it accepts the change at a check-in. When none is left waiting, the gateway switches.
falseSwitches the gateway immediately. Its sensors stay behind unless you move them another way.

409 while a sensor firmware update is running or another change is in progress.

POST /api/gateway/network-id/switch ingest

Finishes a change now: the gateway moves even if some sensors have not. If a firmware update holds the radio, it is applied when that ends.

DELETE /api/gateway/network-id/migration ingest

Cancels a change in progress. Sensors still waiting keep the old ID. Sensors that already moved cannot be reached and are returned as stranded. Not rate-limited, so a token can always back out of a change it started.

Radio link 2.9.1+

Where the gateway reaches its radio modem. Administrator sessions only; no API token can call either endpoint.

GET /api/gateway/radio-link ingest
jsonResponse 200 on an EG5120 or EG5100
{
  "transport": "serial",
  "serial": { "port": "/dev/ttymxc2", "baud": 115200 },
  "status": { "configured": true, "connected": true,
              "modem_mac": "00:13:A2:00:5A:00:00:FE",
              "redials": 0, "last_redial": null, "modem_changed": null }
}

On a container the transport is "tcp" and a link object replaces serial: the stored wireless modem, with config: {host, port}, name, location and notes, or null when none has been saved. modem_changed becomes non-null when a different modem has answered since the service started; the Gateway ID follows the modem, so app licences bound to the previous ID need re-issuing.

POST /api/gateway/radio-link ingest

Container only. Body {"config": {"host": "192.168.1.50", "port": 2101}, "name": "…", "location": "…", "notes": "…"}. Saves the wireless modem’s address and re-points the link at once, with no restart. Returns the GET shape plus repointed.

400 names the bad field in field. 409 with code: "radio_busy" during a sensor firmware update or a network ID change, and with code: "serial_transport" on an EG5120 or EG5100, whose radio is its own serial port.

DigiMesh peer registry

Non-sensor radio hardware — relay controllers and similar — that the operator has authorized apps to command. Deliberately separate from the sensor inventory. Requires platform 2.5.0 or newer.

GET /api/digimesh-peers api

Registered peers as an array of {address, name, notes, enabled, created_at, updated_at}.

POST /api/digimesh-peers api

Registers a peer. address is required — a 64-bit DigiMesh MAC. Upper case and unseparated hex are accepted and normalized to lower-case colon form. Returns 201, or 409 if already registered, or 400 for a malformed address.

PUT /api/digimesh-peers/:address api

Updates name, notes, or enabled. 404 if unknown.

DELETE /api/digimesh-peers/:address api

Removes a peer, revoking app authority to command it.

16. Network Monitoring

How well each sensor’s radio link is working, measured by the gateway itself: a grade per sensor, the hops behind it, noise at each node, and the history of every test.

From platform 2.9.1 the gateway tests each sensor’s radio link itself and keeps every result. A test traces the route to the sensor, runs a link test on each hop, and scans the radio noise at each node. Tests run on a schedule, when a lost route is found again, when a sensor is whitelisted, and on request. The Network page in the web interface is drawn from these endpoints.

Settings

GET /api/network-monitoring api

The settings, with defaults filled in. Needs a session or mesh:read.

jsonResponse 200 (abridged)
{
  "settings": {
    "schedule_enabled": false, "schedule_hours": 6,
    "reform_enabled": false, "reform_min_hours": 6,
    "whitelist_test": true, "noise_scans": true, "retention_days": 30,
    "thresholds": {
      "rssi":         { "good": -60, "ok": -80 },
      "success_rate": { "good": 90,  "ok": 50 },
      "retries":      { "good": 1,   "ok": 4 },
      "margin":       { "good": 20,  "ok": 10 },
      "noise_floor":  { "good": -95, "ok": -85 }
    }
  },
  "defaults": { "...": "the same shape, factory values" },
  "measures": { "rssi": { "dir": "high", "min": -120, "max": 0, "unit": "dBm", "label": "Hop RSSI" } },
  "limits": { "schedule_hours": [1, 168], "reform_min_hours": [1, 168], "retention_days": [1, 365] },
  "sensor_link_assurance": true,
  "whitelisted_sensors": 9
}
SettingMeaning
schedule_enabled, schedule_hoursTest every whitelisted sensor every so many hours (1 to 168). Off by default.
reform_enabled, reform_min_hoursTest a sensor when the gateway finds a lost route to it again, at most once in that many hours. Off by default; needs Sensor Link Assurance.
whitelist_testTest a sensor once when it is whitelisted.
noise_scansInclude a noise scan at each node in a test.
retention_daysHow long test results and scans are kept (1 to 365).
thresholdsThe Good and Ok limits for each measure. A value at least Good grades good, at least Ok marginal, otherwise poor. retries is average retries per packet. noise_floor is the one measure where lower is better.
PUT /api/network-monitoring api

Changes the settings. Send only what changes; the rest is kept. Needs an administrator session or the network:write scope. An unknown key, an out-of-range number, or a Good threshold weaker than its Ok is a 400 with {error, errors: […]}, and nothing is written.

bashTurn on a 12-hour schedule
curl -X PUT http://192.168.1.50/api/network-monitoring \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"schedule_enabled":true,"schedule_hours":12}'

Results

GET /api/connectivity api

Every whitelisted sensor, graded, plus the site’s topology. One call draws a site-wide network view. Needs a session or mesh:read.

jsonResponse 200 (one sensor shown, abridged)
{
  "counts": { "good": 6, "marginal": 0, "poor": 0, "untested": 1,
              "unreachable": 0, "waiting": 3, "not_testable": 2 },
  "tests_24h": { "settled": 33, "complete": 15 },
  "sensors": [
    {
      "device_id": "00:13:a2:00:5a:00:00:07", "name": "Pump 3 vibration", "sensor_type": 111,
      "grade": "good", "limited_by": null, "reason": null, "stale": false,
      "reachable": true, "reachability": "Route up",
      "sleep_mode": { "value": 1, "enabled": true, "ts": 1795618745961 },
      "reports_in": { "last_seen_ts": 1795620510055, "last_rssi": 56 },
      "route": ["00:13:a2:00:5a:00:00:fe", "00:13:a2:00:5a:00:00:20", "00:13:a2:00:5a:00:00:07"],
      "hops": [
        { "idx": 0, "source": "00:13:a2:00:5a:00:00:fe", "destination": "00:13:a2:00:5a:00:00:20",
          "avg_rssi": -52, "min_rssi": -52, "max_rssi": -52,
          "iterations": 50, "successful_iterations": 50, "retries": 0,
          "success_rate": 100, "retries_per_packet": 0, "rx_floor_dbm": -83, "margin": 31,
          "grade": "good", "limited_by": null, "tested_at": 1795618754631,
          "measures": { "rssi": "good", "success_rate": "good", "retries": "good", "margin": "good" } }
      ],
      "noise_at_sensor": { "floor_dbm": -89, "peak_dbm": -53, "scans": 8, "hot_channels": [] },
      "last_test": { "id": 596, "trigger": "schedule", "requested_at": 1795618023230,
                     "completed_at": 1795618764120, "outcome": "complete", "error": null },
      "open_test": null, "next_check_in": 1795622343821,
      "testable": true, "not_testable_reason": null,
      "check_in": { "how": "sync", "last_at": 1795618743819 }
    }
  ],
  "nodes": [ { "address": "00:13:a2:00:5a:00:00:fe", "role": "gateway", "name": "Gateway-1A2B", "hop": 0,
               "noise": { "floor_dbm": -83, "peak_dbm": -74, "scans": 8 } } ],
  "links": [ "...each hop of every sensor's latest route, graded as in hops[]" ],
  "gateway": { "address": "00:13:a2:00:5a:00:00:fe", "noise": { "floor_dbm": -83 }, "noise_history": [] },
  "settings": { "...": "as GET /api/network-monitoring" },
  "sensor_link_assurance": true
}
FieldMeaning
gradegood, marginal, poor, or null when the sensor has never been tested. A sensor’s grade is its weakest hop’s.
limited_by, reasonWhich hop and which measure set the grade, and a sentence saying so, for example “margin 9 dB at Repeater A”.
reachable, reachabilitytrue, false or null, and the same in words. From Sensor Link Assurance’s link state.
staleThe last measurement is older than the route it describes may be.
hops[].marginSignal over the noise floor at the receiving node (rx_floor_dbm), in dB.
hops[].avg_rssiNegative dBm here, unlike the positive rssi on sensor and reading objects.
sleep_modeThe sensor radio’s sleep mode as last read during a test. Platform 2.9.2+.
open_testA test in flight: state is waiting, running or linking.
testablefalse for a sensor that never opens a receive window (older firmware that only sends data), with not_testable_reason. null while it is too early to tell.
last_test.triggerschedule, reform, whitelist, operator, or api for a mesh map asked for by a token or app.
last_test.outcomecomplete; partial (the sensor slept before its own hop was measured); failed, with error; missed (it never checked in). null while queued or running.
GET /api/sensors/:id/connectivity api

One sensor in depth: everything /api/connectivity has for it, plus history. Needs a session or mesh:read. 404 for an unknown sensor.

ParameterTypeDefaultDescription
daysinteger7How far back hop_history reaches, 1 to 90.
Added fieldMeaning
path.nodes[]Each node on the route with its noise summary. hot_channels are channels at least 15 dB over the scan’s median in half or more of the last 8 scans.
hop_history[]Per hop of the current route: points[] of {test_id, at, avg_rssi, min_rssi, max_rssi, success_rate, retries}.
noise_history, heatmapKeyed by node address. History is {at, floor_dbm, peak_dbm}; the heatmap is the latest 8 scans, one dBm value per channel.
tests[], tests_totalThe last 50 tests, newest first, each with its hops and scans.
linkThe sensor’s radio link as the gateway last saw it: route state, direct or repeated path, the last delivery, the last recovery.
next_scheduled_atWhen the schedule will next test this sensor, epoch ms.
POST /api/sensors/:id/connectivity ingest

Test now. Queues a network test for the sensor’s next check-in. Nothing is on the radio until then.

jsonResponse 200
{ "success": true, "already_queued": false, "test": { "id": 612, "trigger": "operator" } }

If a test is already open for the sensor it is returned with already_queued: true. 409 with not_testable: true for a sensor that never opens a receive window.

17. Communication Log

Every frame between the gateway and a sensor, with what the radio said happened to it.

From platform 2.9.1 the gateway records every frame it exchanges with each whitelisted sensor, with the modem’s transmit status for each one it sent. Related frames are grouped into rounds: a check-in window, a waveform request, a raw waveform, a firmware update. It answers the question the data endpoints cannot: did the sensor receive what was sent, and did it answer.

GET /api/sensors/:id/comm-log api

The sensor’s log, newest first. Needs a session or mesh:read. 404 for an unknown sensor.

ParameterTypeDefaultDescription
directionlist—tx (gateway to sensor), rx (sensor to gateway), event (a note from the gateway). Comma-separated.
purposelist—sync, fly, configuration, ota, fft, waveform, network_test, link, data, power_up, error, external, app, other.
resultlist—ok, failed, partial, sent, info, pending.
since, untilinteger—Time bounds, epoch ms.
qstring—Text to find in the summary or detail.
limitinteger1001 to 1000.
beforestring—The previous page’s next_before, to page backwards.
expandall—Include every round’s frames. Without it only failed, partial and open rounds carry their children.
formatcsv—Return the matching rounds with their frames, oldest first, as a CSV file.
jsonResponse 200 (abridged)
{
  "device_id": "00:13:a2:00:5a:00:00:07", "name": "Pump 3 vibration",
  "sensor_type": 111, "firmware": 12, "whitelisted": true,
  "settings": { "enabled": true, "retention_days": 30, "data_retention_days": 7, "max_mb": 250 },
  "counts_24h": { "total": 338, "failed": 2, "tx": 36, "rx": 346,
                  "by_purpose": { "data": 303, "sync": 28, "error": 2 } },
  "entries": [
    { "id": 85031, "ts": 1795618744107, "end_ts": 1795618750666,
      "direction": "rx", "purpose": "sync", "result": "ok",
      "summary": "Sync check-in - network test, ended",
      "is_group": true, "child_count": 9, "parent_id": null, "routine": false,
      "detail": { "sensor_type": 111, "work": ["mesh map"], "reached": "route", "duration_ms": 6559 } },
    { "id": 85460, "ts": 1795620510055, "end_ts": null,
      "direction": "rx", "purpose": "data", "result": "ok", "summary": "Sensor data",
      "is_group": false, "child_count": 0, "parent_id": null, "routine": true,
      "detail": { "bytes": "7F 00 0C 03 FC B4 00 6F ...", "length": 104, "counter": 180, "rssi": -56 } }
  ],
  "next_before": "1795619010008_85110"
}

Only top-level entries are listed: rounds (is_group: true) and frames outside any round. A round matches a filter when it or any frame inside it matches.

FieldMeaning
resultok; failed; partial; sent for a broadcast, which has no acknowledgment to expect; info; pending for a round still open.
detail.statusOn a frame the gateway sent: the modem’s transmit status, verbatim. Success, MAC ACK failure, Network ACK failure, Route not found, or No transmit status from the modem.
detail.retries, detail.route_search, detail.status_msRetries the modem made, whether it searched for a route first (yes/no), and the time from send to status.
detail.method, detail.addressingDigiMesh or point-to-multipoint, and unicast or broadcast.
detail.bytesThe frame’s payload, hex.
detail.rssiOn a frame received: signal strength of the last hop, dBm.
detail.requested_byOn a waveform request round: the user, API token or app that asked.
detail.outcomeOn a waveform request round: no_waveform when it was delivered and not answered, or refused with refusal_code when the sensor’s firmware refused it.
detail.packets_expected, detail.packets_received, detail.missing_packetsOn a raw waveform round.
GET /api/sensors/:id/comm-log/:entry api

One round with its frames in time order, in children. 404 when the entry is not this sensor’s. Needs a session or mesh:read.

GET /api/comm-log/settings api

Whether the log is recorded and how long it is kept. Needs a session or mesh:read.

jsonResponse 200
{
  "settings": { "enabled": true, "retention_days": 30, "data_retention_days": 7, "max_mb": 250 },
  "defaults": { "enabled": true, "retention_days": 30, "data_retention_days": 7, "max_mb": 250 },
  "limits": { "retention_days": [1, 365], "data_retention_days": [1, 365], "max_mb": [10, 4096] }
}

data_retention_days applies to ordinary data reports outside any round, which are most of the log.

PUT /api/comm-log/settings api

A partial update. Needs an administrator session or network:write. 400 with errors[] for an out-of-range value, or a data_retention_days longer than retention_days.

18. Sensor Firmware Updates

Update the firmware on a wireless sensor over the air, and follow the update to completion.

From platform 2.7.0 the gateway can update a sensor’s firmware over the radio. An update is two steps: put a firmware file in the gateway’s store, from NCD’s catalog or by upload, then queue it for a sensor. Writes need an administrator session or the radio:firmware scope. Reads also accept telemetry:read.

The firmware store

GET /api/firmware/catalog api

NCD’s published sensor firmware, from a cached copy the gateway refreshes every 6 hours and keeps on disk for offline use. ?refresh=1 fetches it again; only a session or a radio:firmware token may force that.

jsonResponse 200 (one build shown)
{
  "source_url": "https://github.com/ncd-io/Sensor-Firmware/releases/download/catalog/catalog.json",
  "fetched_at": 1795620601663, "generated": "2026-10-12T20:48:46.908Z", "error": null,
  "firmware": [
    { "id": "111-55950d-v18", "sensor_type": 111, "hardware_id": "55950d", "version": 18,
      "name": "Two Channel Vibration Sensor", "channel": "stable",
      "released": "2026-09-28T22:12:37Z", "size": 196127,
      "sha256": "e30f38f7ef4c3130f58f8b7eef1c264f1a95f53f8627db1a19836d18e6de3da3",
      "url": "https://github.com/ncd-io/Sensor-Firmware/releases/download/...",
      "notes": "...", "warnings": [] }
  ]
}

A failed fetch keeps the last good copy and reports the failure in error.

POST /api/firmware/download api

Body {"id": "<catalog id>"}. Downloads a catalog build into the store and returns its sha256 and header fields. The file must hash to the catalog’s sha256, or it is discarded with a 502. A file already in the store is not downloaded again.

POST /api/firmware/files api

Uploads an .ncd firmware file. Send the raw bytes as application/octet-stream, at most 1 MB, with an optional X-File-Name header kept for display. A truncated or non-firmware file is a 400. Same response as the download.

POST /api/firmware/settings api

Body {"chunk_delay_ms": 250}: the pause after each chunk of a transfer, 50 to 2000 ms; null restores the default of 250. A longer pause is slower and more tolerant of a weak link. Administrator sessions only. Returns {chunk_delay_ms, default_ms, min_ms, max_ms}. Platform 2.8.0+.

Updating a sensor

GET /api/sensors/:id/firmware api

Everything about one sensor’s firmware: what it runs, which builds fit it, and its update jobs.

jsonResponse 200 (abridged)
{
  "supported": true,
  "device": { "device_id": "00:13:a2:00:5a:00:00:07", "sensor_type": 111,
              "firmware_version": 12, "hardware_id": "55950d", "last_seen_ts": 1795620510055 },
  "builds": [ { "id": "111-55950d-v18", "version": 18, "channel": "stable",
                "sha256": "e30f38f7...", "is_current": false, "is_newer": true } ],
  "transfer": { "chunk_delay_ms": 250, "default_ms": 250, "min_ms": 50, "max_ms": 2000 },
  "job": null,
  "history": []
}

builds lists catalog builds for exactly this sensor type and hardware, newest first. hardware_id is null until the sensor has checked in once. supported is false when the gateway’s sensor library predates firmware updates. job is the active update, if any, and history the last 10.

POST /api/sensors/:id/firmware ingest

Queues an update. Any version other than the installed one is accepted, downgrades included. Queuing a new update replaces one that has not started.

FieldTypeRequiredDescription
sha256hex stringYesA file already in the store, from the download or upload call.
file_namestringNoFor display.
sourcestringNo"catalog" or "upload" (default). For display.
release_idstringNoThe catalog id the file came from.

The file’s header is checked against the sensor’s type and hardware ID, and a mismatch is a 400. The call returns immediately and nothing has happened yet: the job waits for the sensor to wake. Poll the GET above and read job.state:

StateMeaning
armedWaiting for the sensor’s next check-in. A transfer that failed part-way is also armed, and resumes where it stopped.
runningOn the air. stage is manifest, enter_ota, send_manifest, transfer or reboot; bytes_sent and bytes_total give progress.
verifyingTransferred and rebooted; waiting for the sensor to report the new version.
completeThe sensor reports the target version.
failedAn incompatible file, five failed attempts, the old version still reported after the reboot, or no wake within 7 days. error says which.
cancelledWithdrawn or replaced before it started.
DELETE /api/sensors/:id/firmware ingest

Cancels an armed update. 409 once it is running or verifying, because a transfer cannot be abandoned half-written. 404 when nothing is pending.

GET /api/firmware/active api

Updates on the air right now: {active: [{device_id, sensor_name, stage, target_version, from_version, bytes_sent, bytes_total, started_ts}]}. Only running jobs are listed, which is exactly the window when the gateway hears no other sensor. Poll it before judging a sensor offline.

19. Monitor Views and Widgets

The Monitor page is a per-user dashboard of tabs (views) containing widgets. These endpoints exist mainly so you can provision dashboards programmatically — handy when commissioning many gateways to a house standard.

GET /api/dashboard/views api

The caller’s views, ordered by position. A user with none gets a default “Dashboard” view created automatically, so this never returns an empty array.

POST /api/dashboard/views api

Creates a view. name is required; position defaults to the end of the tab strip.

PUT /api/dashboard/views/:id api

Renames or reorders a view via name and position.

DELETE /api/dashboard/views/:id api

Deletes a view and all its widgets. A user must always keep at least one view, so deleting the last returns 400.

GET /api/dashboard/widgets api

The caller’s widgets, with config parsed into an object. Pass view_id to scope to one tab.

POST /api/dashboard/widgets api

Creates a widget. widget_type is required and must be one of:

textValid widget_type values
line_graph   metric_card   bar_chart   gauge   area_chart
sparkline    stat_card     table       tank_level

width is clamped to 1–4 (default 2) and height to 1–6 (default 2). config must be an object. If view_id is omitted the widget lands in the caller’s default view; a view_id the caller does not own returns 403.

PUT /api/dashboard/widgets/:id api

Partial update. Setting view_id moves the widget to another of the caller’s views.

DELETE /api/dashboard/widgets/:id api

Deletes a widget.

20. Scheduled Reports and Saved Queries

Atrium can generate PDF reports on a schedule and email them. If your requirement is “a summary in someone’s inbox every Monday”, this is cheaper to set up than building it in your own system.

GET /api/scheduled-reports api

All configured reports, with config parsed and last_sent populated.

POST /api/scheduled-reports api

Creates a report. name, report_type, schedule, and recipient_email are required.

FieldAccepted values
report_typefleet_summary, sensor_group, alert_digest, oee_summary, custom_query, productivity_summary
scheduledaily, weekly, monthly
schedule_dayInteger day-of-week or day-of-month, for weekly and monthly schedules
schedule_hourHour of day, default 8
configFree-form object, stored as JSON — the report type determines what it needs

An invalid report_type or schedule returns 400 listing the accepted values. Returns 201 on success.

PUT /api/scheduled-reports/:id api

Partial update. Sending no updatable fields returns 400.

DELETE /api/scheduled-reports/:id api

Deletes a report.

POST /api/scheduled-reports/:id/send-now ingest

Generates and emails a report immediately, ignoring its schedule — useful for verifying a report before trusting it to a schedule. Returns {"success":true,"id":n}, or 404 if the report is unknown or disabled.

This runs PDF generation synchronously, so it can take a while on constrained hardware. Set a generous client timeout.

Saved queries

Named SQL snippets stored on the gateway, used by the SQL Query tool and by custom_query reports.

GET /api/saved-queries api

Returns {queries:[{id, name, sql_text, created_at}], count}.

POST /api/saved-queries api

Creates one. name and sql_text are both required. Returns 201 with the new id.

DELETE /api/saved-queries/:id api

Deletes one.

21. Apps and App Center

Atrium features such as AssetPulse machine health, OEE, and productivity monitoring ship as installable apps. Each app can add its own API endpoints, which is where you look if the data you want is not in the platform surface.

GET /api/apps api

Installed apps with version, enabled state, declared capabilities, model support, and license status. Also returns gateway_model and gateway_id at the top level.

jsonResponse 200 — one app
{
  "apps": [
    { "id": "machine-health", "name": "AssetPulse", "version": "1.4.2",
      "description": "Vibration-based machine health monitoring",
      "enabled": true, "model_supported": true, "available": true,
      "path": "/apps/machine-health", "ui": {},
      "capabilities": ["readings:read","events:publish"],
      "license": { "required": true, "state": "licensed", "reason": null,
                   "reason_text": null, "customer": "Example Mfg",
                   "expires_at": 1820000000000 } }
  ],
  "count": 1,
  "gateway_model": "EG5120",
  "gateway_id": "0013a200424165 28"
}

available is the field to check before calling an app’s endpoints: it is true only when the app is enabled, supported on this hardware, and licensed. A license.state of unlicensed means the app’s routes return 402.

GET /api/apps/:id/license api

License status for one app, including the gateway ID a license must be bound to. 404 if the app is not installed.

POST /api/apps/:id/license api

Activates a license. Body is {"license":"<token>"} (token is accepted as an alias). The license is verified against this gateway before being saved, so a license issued for another unit is rejected with 400 and a machine-readable reason. On success both services restart.

409 means the gateway ID is not yet known because the radio has not reported in — retry shortly.

DELETE /api/apps/:id/license api

Removes a stored license and restarts services. Intended for support and testing.

POST /api/apps/install api

Installs a signed app package uploaded as raw bytes — Content-Type: application/gzip or application/octet-stream, up to 200 MB. Optional query parameters expect_id pins the target app and allow_downgrade=1 permits installing an older version.

POST /api/apps/:id/uninstall api

Uninstalls an app and restarts services. Returns {"ok":true,"id":"…","purged_data":bool,"restarting":true}. Purging also deletes the app’s database.

POST /api/apps/:id/enable api

Enables an app. Revokes its existing scoped tokens and restarts services. 404 if not installed.

POST /api/apps/:id/disable api

Disables an app without uninstalling it. Same token revocation and restart.

POST /api/apps/:id/token api

Mints a scoped token for an app’s sandboxed UI. Returns {token, expires_at, capabilities}.

GET /api/apps/reads api

The data views and actions installed apps offer to integrations and AI assistants: {reads, count, actions, action_count}. Each read names its app_id, method and path (relative to /api/apps/<app-id>), a title, a description and its params. Each action carries an inputSchema. Platform 2.6.0+. Needs a session or apps:read.

An API token holding apps:data can call exactly the reads listed here, and one holding apps:actions can run the actions through POST /api/bus/actions/:appId/:actionId (Section 12). An app that is disabled or unlicensed lists nothing.

GET /api/apps/catalog api

The App Center catalog, annotated with what is installed and what this gateway can run. Pass refresh=1 to bypass the cache. If the catalog is unreachable you still get 200, with unavailable:true and an error string.

GET /api/apps/catalog/:id api

One catalog app in detail: all versions with their platform and model requirements, release dates, sizes, changelogs, an install_blocked_reason per version, and the README as sanitized HTML or raw markdown.

POST /api/apps/install-from-catalog api

Downloads and installs an app by ID. Body is {"id":"machine-health","allow_downgrade":false}. Returns 502 if the App Center is unreachable.

GET /app-ui/:appId/* api No auth

Static frontend assets for an installed app’s UI. Unauthenticated, exactly as nginx would serve any static bundle — the app’s data still requires a token. Not useful to an integration; documented for completeness.

22. Direct SQL Access

Atrium exposes its SQLite database through an HTTP endpoint. It is an administrative tool that powers the built-in SQL Query page — occasionally the right escape hatch, and easy to misuse.

GET /api/sqlite/tables api

Lists table names: {"tables":["readings","devices",…]}.

GET /api/sqlite/schema api

Column definitions for one table. table is a required query parameter and must be a valid identifier; anything else returns 400. Each column reports cid, name, type, notnull, dflt_value, and pk.

POST /api/sqlite/query api

Executes a statement. Body is {"query":"SELECT …"}. A SELECT returns rows; a non-returning statement executes and yields an empty rows array. A SQL error returns 400 with the engine’s message.

bashExample — daily averages, correctly bucketed
curl -s -X POST "$GATEWAY/api/sqlite/query" \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"query":"SELECT (ts/86400000)*86400000 AS day, AVG(value) AS avg_c, MIN(value) AS min_c, MAX(value) AS max_c, COUNT(*) AS n FROM readings WHERE device_id = '\''00:13:a2:00:42:41:65:28'\'' AND metric = '\''temperature'\'' GROUP BY day ORDER BY day DESC LIMIT 30"}'
jsonResponse 200
{
  "success": true,
  "rows": [
    { "day": 1788872400000, "avg_c": 24.93, "min_c": 24.1, "max_c": 25.8, "n": 86 }
  ],
  "count": 1,
  "query": "SELECT (ts/86400000)*86400000 AS day, …"
}

Tables you are most likely to want

TableContents
readingsAll telemetry: ts, device_id, metric, value, counter, sensor_type, firmware, rssi, tags. Always filter by device_id, metric, and ts — the index is built for exactly that, and the table grows without bound.
devicesDevice registry including whitelist state and last-seen values.
sensor_metaOperator metadata — location, asset, name, install date.
alert_historyAlert events, the same rows served by /api/alerts/history.
status_historyDevice health transitions.
gateway_configConfiguration key/value pairs.

23. MQTT Push — the Streaming Alternative

The REST API is poll-only. If you want the gateway to push data to you as it arrives, configure MQTT instead. For continuous ingestion this is almost always the better architecture.

⚡
No polling lag
Readings arrive as the gateway decodes them, rather than up to one poll interval later.
🔒
Outbound only
The gateway connects out to your broker. No inbound firewall rule, no Remote Access tunnel needed.
📦
Nothing missed
Published at QoS 1, so a brief broker outage does not silently drop readings.
📈
Lighter on the gateway
One persistent connection instead of repeated authenticated HTTP queries against a growing table.

When to choose which

RequirementUse
Continuously stream every reading into a historian, data lake, or message busMQTT
React to alerts promptly — open a ticket when something tripsMQTT (alerts topic)
Backfill history, or query a past time windowREST (telemetry endpoint)
Read or write configuration, metadata, and alert rulesREST
Your platform cannot subscribe to MQTT (many SaaS ITSM tools cannot)REST polling
On-demand lookup — “what is this sensor reading right now?”REST

The two are not exclusive, and the most robust integrations use both: MQTT for the live stream, REST to backfill anything missed during an outage and to read metadata.

Configuring it in the interface

MQTT is set up under Settings → MQTT Client. It takes two steps that are easy to conflate: first point the gateway at your broker, then separately grant the Atrium publisher so sensor telemetry, alerts, and status changes are actually published.

Settings, MQTT Client panel showing the remote broker connection, the three default topic patterns, the Publishers list, and the Test Publish tool.
Settings → MQTT Client. Broker connection, the three topic patterns, the publisher grant list, and the Test Publish tool. Note the state captured here: a broker is configured, but the Atrium publisher is switched off while an installed app is switched on — so apps use the connection and no sensor data is published. That is exactly the condition described in the warning below.

Topics

Topic patterns are configurable. {gateway_id} is replaced with the gateway name and {device_id} with the sensor’s device ID:

FeedDefault patternQoSRetained
Telemetry{gateway_id}/telemetry/{device_id}1No
Alerts{gateway_id}/alerts/{device_id}1No
Status{gateway_id}/status/{device_id}1Yes

Status messages are retained, so a subscriber that connects late still learns each device’s current online/offline state without waiting for the next transition. Subscribe with a wildcard such as Gateway-D8FC/telemetry/# to receive every sensor.

Payloads

All three payloads are JSON, with epoch-millisecond timestamps, exactly as in the REST API.

jsonTelemetry payload
{
  "device_id": "00:13:a2:00:42:41:65:28",
  "timestamp": 1788874772898,
  "sensor_type": 1,
  "data": { "temperature": 25.2, "humidity": 41.8 },
  "battery": 99.64,
  "rssi": 40
}

Note that data is an object of all metrics from that one packet, whereas the REST telemetry endpoint returns one row per metric. The MQTT shape is usually the more convenient of the two for ingestion.

jsonAlert payload
{
  "device_id": "00:13:a2:00:42:41:65:28",
  "sensor_name": "Line 4 Feed Pump — Bearing",
  "alert_type": "threshold",
  "metric": "temperature",
  "value": 88.4,
  "threshold": 85,
  "condition": "above",
  "timestamp": 1788874772898
}

alert_type is threshold or offline; for an offline alert, metric is the literal string "offline".

jsonStatus payload (retained)
{
  "device_id": "00:13:a2:00:42:41:65:28",
  "old_status": "healthy",
  "new_status": "offline",
  "reason": "no report within 2x interval",
  "timestamp": 1788874772898
}

Security

The broker connection supports username/password authentication, TLS, broker-certificate verification with an uploaded CA, and mutual TLS with a client certificate. Private keys and passphrases are encrypted at rest on the gateway. Use the Test Publish tool after saving to confirm the connection before relying on it.

MQTT endpoints

Everything in the interface is also reachable over the API. All MQTT endpoints are on the ingest daemon, and all return 503 if the MQTT subsystem is unavailable.

GET /api/mqtt/status ingest

Whether Atrium publishing is on, the resolved topic paths, and the publisher grant list. Verified live:

jsonResponse 200
{
  "publishing_enabled": false,
  "topics": [
    "Article_Channel/Gateway-D8FC/telemetry/<device_id>",
    "Article_Channel/Gateway-D8FC/alerts/<device_id>",
    "Article_Channel/Gateway-D8FC/status/<device_id>"
  ],
  "publishers": [
    { "id": "atrium", "name": "Atrium (sensor telemetry, alerts & status)",
      "granted": false }
  ]
}

The resolved topics array is the quickest way to confirm exactly what to subscribe to — the placeholders are already substituted. The gateway above has a custom prefix (Article_Channel/) configured ahead of the default pattern, which is why its topics are longer than the defaults listed earlier — another reason to read the resolved list rather than assume the default.

GET /api/mqtt/config ingest

Broker settings. The password is returned masked, never in clear text, and certificate material is reported only as has_ca_cert, has_client_cert, has_client_key booleans.

POST /api/mqtt/config ingest

Saves broker settings and reconnects immediately. host is required and must be a valid hostname; port must be 1–65535. Topic patterns are validated. PEM material is checked before it is stored.

Submitting a blank password — or the mask returned by GET — preserves the stored password, so you can change topics without knowing the credential.

POST /api/mqtt/publishers ingest

Sets the publisher grant list — the switch that actually starts the sensor-data feed. Grant atrium to enable automatic publishing.

POST /api/mqtt/toggle ingest

Turns publishing on or off without discarding the broker configuration.

POST /api/mqtt/test-publish ingest

Publishes one message immediately, bypassing the grant list — the fastest way to prove host, port, credentials, and TLS are correct before enabling the real feed. A broker host must be saved first.

24. MCP for AI Assistants

Connect an AI assistant straight to the gateway. It reads sensors, alerts and network health, and can act, within the scopes you grant it.

From platform 2.6.0 the gateway is a Model Context Protocol server. An AI assistant that supports remote MCP servers connects to it directly and works through named tools instead of raw endpoints. There is nothing to install on the gateway or beside it.

textMCP endpoint
http://192.168.1.50/api/mcp          # on the LAN
https://b00e.iolight.com/api/mcp     # through Remote Access
MethodPathPurpose
POST/api/mcpJSON-RPC requests (Streamable HTTP transport)
GET/api/mcpThe server-to-client notification stream
DELETE/api/mcpEnd a session
GET/api/mcp/sessionsWhat is connected now: client name, protocol version, last seen. Operator sessions only

Authentication is the same bearer token as the REST API: paste an API token into the assistant’s connector settings, or let the assistant sign in with OAuth, in which case an unauthenticated request to /api/mcp answers 401 with a WWW-Authenticate header pointing at the discovery document. Each tool calls the REST endpoints in this guide with that token, so a tool can do exactly what the token’s scopes allow and nothing else. A session idle for 30 minutes is dropped, and the client starts a new one.

Tools

AreaToolsScope
Sensors and datalist_sensors, get_sensor, query_telemetry, set_sensor_metatelemetry:read, sensors:write
Alertslist_alerts, alert_history, create_alert_template, create_alert_automationalerts:read, alerts:write
Networkmesh_topology, sensor_mesh_status, site_connectivity, sensor_connectivity, sensor_comm_log, network_monitoring_settings, set_network_monitoring, request_mesh_mapmesh:read, network:write, radio:mesh
Waveformsfft_results, request_fftmesh:read, radio:fft
Sensor configurationget_sensor_config, push_sensor_configradio:config
Sensor firmwarefirmware_status, update_sensor_firmware, cancel_sensor_firmware_updatetelemetry:read, radio:firmware
Network IDnetwork_id_status, change_network_id, finish_network_id_change, cancel_network_id_changesystem:read, radio:network
Apps and automationslist_apps, app_state, app_catalog, invoke_app_action, list_automations, create_automation, set_automation_enabled, delete_automationapps:read, apps:actions, automations:write
Gatewaygateway_infosystem:read

Installed apps add their own tools, named <app-id>__<tool>, for the reads and actions they declare (apps:data, apps:actions). They appear and disappear as apps are installed, enabled or licensed.

Connecting a specific assistant, step by step, is covered in the Atrium Gateway User Manual.

25. Worked Example: Feeding a CMMS

A concrete pattern for pulling Atrium data into a maintenance management system such as ServiceNow, Maximo, Fiix, or Limble. The specifics below are generic HTTP; adapt them to your platform’s integration framework.

Design decisions to make first

  1. 1
    Decide what actually triggers work
    Most CMMS integrations do not want a firehose of temperature readings — they want events. Poll /api/alerts/history and create work orders from alert events; pull telemetry only for the affected sensor, as evidence attached to the record. This keeps the volume low and the mapping obvious.
  2. 2
    Establish how the gateway is reachable
    A cloud-hosted CMMS cannot reach a LAN address. Either enable Remote Access (Section 2) for a public HTTPS hostname, or run a small on-premises connector that polls the gateway locally and forwards to your platform. The connector approach is generally preferable: it keeps the gateway off the public internet entirely.
  3. 3
    Map sensors to your assets
    Write your CMMS asset identifier into the sensor’s asset field with POST /api/sensors/:id/meta (Section 8). Every subsequent alert and reading then carries a device ID you can resolve to an asset in one lookup, with no mapping table to maintain on your side.
  4. 4
    Create a dedicated login
    Provision a viewer account for the integration rather than embedding admin credentials (Section 13). Store its password in your platform’s credential store and plan to rotate it.

The polling loop

A complete, idempotent event-ingestion loop. The high-water mark on id is what makes it safe to re-run.

pythonReference implementation — alert events to work orders
import requests
GATEWAY = "https://b00e.iolight.com"     # or http://192.168.1.50 on-premises
USER, PASSWORD = "integrations", "•••"
_token = None
def login():
    """Exchange credentials for a session token."""
    global _token
    r = requests.post(f"{GATEWAY}/api/auth/login",
                      json={"username": USER, "password": PASSWORD},
                      timeout=15)
    r.raise_for_status()
    _token = r.json()["token"]
    return _token
def call(path, **params):
    """GET with automatic re-auth on 401. Tokens expire after 7 days."""
    global _token
    if _token is None:
        login()
    for attempt in (1, 2):
        r = requests.get(f"{GATEWAY}{path}",
                         headers={"Authorization": f"Bearer {_token}"},
                         params=params, timeout=30)
        if r.status_code == 401 and attempt == 1:
            login()                       # token expired — get a new one and retry
            continue
        r.raise_for_status()
        return r.json()
def poll_alerts(last_seen_id):
    """Return new alert events oldest-first, plus the new high-water mark.
    The endpoint returns newest-first and has no 'since' parameter, so we
    walk the page and stop at the first id we have already processed.
    """
    page = call("/api/alerts/history", limit=100)
    fresh = [e for e in page["history"] if e["id"] > last_seen_id]
    if not fresh:
        return [], last_seen_id
    fresh.sort(key=lambda e: e["id"])     # process in chronological order
    return fresh, fresh[-1]["id"]
def sensor_context(device_id, metric):
    """Fetch the asset mapping and recent readings to attach as evidence."""
    sensor = call(f"/api/sensors/{device_id}")
    readings = call(f"/api/sensors/{device_id}/telemetry",
                    metric=metric, limit=20)
    return sensor, readings["readings"]
# ── main loop ────────────────────────────────────────────────────────────────
last_seen_id = load_high_water_mark()     # persist this in your own store
events, last_seen_id = poll_alerts(last_seen_id)
for ev in events:
    if ev["event_type"] != "triggered":
        resolve_work_order(ev)            # a 'cleared' event — close the ticket
        continue
    sensor, readings = sensor_context(ev["device_id"], ev["metric"])
    create_work_order(
        asset_id    = sensor["asset"],            # your CMMS asset ID
        location    = sensor["location"],
        summary     = f"{sensor['name']}: {ev['metric']} {ev['condition']} "
                      f"{ev['threshold_value']} (read {ev['value']})",
        occurred_at = ev["timestamp"],            # epoch ms, UTC
        evidence    = readings,
        source_ref  = f"atrium:{ev['id']}",       # idempotency key
    )
save_high_water_mark(last_seen_id)

Notes on the pattern

  • Use source_ref for idempotency. Alert event ids are stable and unique, so keying your work orders on them makes a duplicate poll harmless. This matters more than it looks: a network timeout after a successful fetch is the normal case, not the exception.
  • Handle cleared events. Atrium logs both edges. Ignoring cleared leaves tickets open after the condition resolves; using it lets you auto-close, or at least annotate.
  • Do not poll faster than the sensors report. Every 5 minutes is ample for alert events. Alerts are evaluated as readings arrive, so a shorter interval buys you nothing but load.
  • Persist the high-water mark outside the process. If it resets to zero, the loop replays the entire alert history — which the source_ref key will absorb, but noisily.
  • Watch the retention window. If data_retention_days is 30 and your integration is down for 40 days, that data is gone for good. Note that retention purges alert history on the same schedule as telemetry — missed alert events are not recoverable either. Do not treat the gateway as your archive of record.
  • Expect update outages. A firmware update restarts the services. Retry with backoff rather than treating a run of failures as a fault.

26. Complete Endpoint Index

All 191 platform endpoints on Atrium 2.9.3, grouped by purpose. Every path is served from the same base URL; the Service column tells you which internal service answers, which matters only for interpreting errors.

MethodPathServicePurposeDetails
Authentication
POST/api/auth/change-credentialsapiChange the authenticated account's username/password§
POST/api/auth/loginapiExchange credentials for a session token§
GET/api/auth/verifyapiValidate a token and report its account§
API tokens and OAuth
GET/api/api-tokensapiIssued API tokens§
POST/api/api-tokensapiIssue an API token§
PATCH/api/api-tokens/:idapiChange a token’s name or scopes§
DELETE/api/api-tokens/:idapiRevoke an API token§
GET/api/api-tokens/scopesapiThe scope vocabulary§
GET/.well-known/oauth-authorization-serverapiOAuth authorization server metadata§
GET/.well-known/oauth-protected-resourceapiOAuth protected resource metadata§
GET/.well-known/oauth-protected-resource/api/mcpapiThe same, at the path-suffixed form§
POST/api/oauth/registerapiRegister an OAuth client§
POST/api/oauth/tokenapiExchange a code or refresh token§
POST/api/oauth/revokeapiRevoke an OAuth token§
GET/api/oauth/authorize-infoapiDescribe an authorization request (consent page)§
POST/api/oauth/authorizeapiApprove or deny an authorization request§
GET/api/oauth/grantsapiConnected apps§
PATCH/api/oauth/grants/:idapiChange a connected app’s scopes§
DELETE/api/oauth/grants/:idapiDisconnect an app§
GET/api/oauth/clientsapiRegistered OAuth clients§
POST/api/oauth/clientsapiRegister an OAuth client by hand§
DELETE/api/oauth/clients/:idapiRemove an OAuth client§
Sensors
GET/api/sensor-typesapiSensor types present, with device counts§
GET/api/sensorsapiList whitelisted sensors with health and metadata§
GET/api/sensors/:idapiOne sensor by device ID§
GET/api/sensors/:id/status-historyapiHealth transition history for one sensor§
Telemetry
GET/api/sensors/:id/fftapiStored raw vibration waveform captures§
GET/api/sensors/:id/fft/:fftIdapiOne vibration capture§
GET/api/sensors/:id/metricsapiMetric names this sensor reports§
GET/api/sensors/:id/telemetryapiReadings, filterable by metric and time window§
Metadata
GET/api/sensors/:id/chart-orderapiPreferred chart ordering§
POST/api/sensors/:id/chart-orderapiSet chart ordering§
GET/api/sensors/:id/metaapiOperator metadata for one sensor§
POST/api/sensors/:id/metaapiReplace operator metadata (full replace)§
GET/api/sensors/:id/metric-conversionsapiUnit-conversion formulas§
POST/api/sensors/:id/metric-conversionsapiSet unit conversions in bulk§
GET/api/sensors/:id/metric-labelsapiCustom metric display labels§
POST/api/sensors/:id/metric-labelsapiSet metric labels in bulk§
GET/api/synthetic-variablesapiList computed/synthetic metrics§
POST/api/synthetic-variablesapiCreate a synthetic variable§
DELETE/api/synthetic-variables/:idapiDelete a synthetic variable and its readings§
GET/api/synthetic-variables/:idapiOne synthetic variable§
POST/api/synthetic-variables/testapiDry-run a formula without saving§
Devices
GET/api/devicesapiList devices by whitelist state (param required)§
POST/api/devices/bulk-deleteapiDelete devices and all their data (destructive)§
POST/api/devices/bulk-whitelistapiWhitelist or un-whitelist many devices§
POST/api/purge-all-dataapiDelete all telemetry and devices (destructive)§
POST/api/sensors/:id/whitelistapiWhitelist or un-whitelist one device§
Alerts
GET/api/alert-templatesapiPattern-matching alert templates§
POST/api/alert-templatesapiCreate an alert template§
DELETE/api/alert-templates/:idapiDelete an alert template§
PUT/api/alert-templates/:idapiUpdate an alert template§
GET/api/alert-templates/match-previewapiPreview which devices a match rule covers§
GET/api/alertsapiCurrent alert-rule state§
GET/api/alerts/historyapiAlert event log — poll this for CMMS events§
GET/api/sensors/:id/thresholdsapiThreshold rules for one sensor§
POST/api/sensors/:id/thresholdsapiWrite a threshold (see round-trip caveat)§
DELETE/api/thresholds/:threshold_idapiDelete an alert rule by ID§
Triggers
GET/api/automationsapiAutomations with nested triggers and actions§
POST/api/automationsapiCreate an automation§
DELETE/api/automations/:idapiDelete an automation§
PUT/api/automations/:idapiUpdate an automation (replaces sets)§
GET/api/triggersapiTriggers with live values and match state§
POST/api/triggersapiCreate a trigger condition§
DELETE/api/triggers/:idapiDelete a trigger§
PUT/api/triggers/:idapiUpdate a trigger§
Event bus
GET/api/bus/bindingsapiConfigured event to action bindings§
POST/api/bus/bindingsapiCreate a binding§
DELETE/api/bus/bindings/:idapiDelete a binding§
GET/api/bus/bindings/:idapiOne binding with state and recent runs§
PATCH/api/bus/bindings/:idapiUpdate a binding§
POST/api/bus/bindings/:id/runingestDispatch a binding now (real side effects)§
GET/api/bus/catalogapiWireable events and actions on this gateway§
GET/api/bus/eventsapiRecent event log§
POST/api/bus/publishapiPublish a diagnostic event into the atrium namespace§
GET/api/bus/runsapiBinding dispatch history§
GET/api/bus/stateapiRetained current value per topic and entity§
GET/api/bus/statusingestBroker counters and bound actions§
POST/api/bus/actions/:appId/:actionIdingestRun an installed app’s action now§
GET/api/bus/webhook-secretapiThe webhook signing secret§
POST/api/bus/webhook-secret/rotateapiReplace the webhook signing secret§
Gateway
GET/api/gateway/configapiFull configuration — call this first§
POST/api/gateway/configapiWrite configuration (unsent keys are reset)§
GET/api/gateway/proxyapiOutbound proxy settings (secrets masked)§
POST/api/gateway/proxyapiSave outbound proxy settings§
POST/api/gateway/proxy-testapiTest a proxy configuration§
POST/api/gateway/smtp-testingestSend a test email with supplied credentials§
POST/api/system/check-updatesapiCheck for a firmware update§
POST/api/system/execute-updateapiApply the pending firmware update§
POST/api/system/force-updateapiInstall a specific version§
GET/api/system/noderedapiNode-RED intent and process state§
POST/api/system/noderedapiEnable or disable Node-RED§
GET/api/system/sensor-libraryapiSensor decoder library version state§
POST/api/system/sensor-library/checkapiCheck for a newer decoder library§
POST/api/system/sensor-library/updateapiInstall a decoder library version§
GET/api/system/sensor-library/update-progressapiLibrary update progress§
GET/api/system/timeapiGateway clock, for skew detection§
GET/api/system/update-progressapiFirmware update progress§
GET/api/usersapiAdmin and viewer account state (admin only)§
DELETE/api/users/viewerapiDelete the viewer account (admin only)§
POST/api/users/viewerapiCreate or update the viewer account (admin only)§
Network
POST/api/network/cellularapiConfigure the cellular modem (EG5120 only)§
POST/api/network/confirmapiConfirm a pending change, cancelling rollback§
POST/api/network/ipv4apiSet interface IPv4 (arms watchdog)§
POST/api/network/lanapiSet LAN address and DHCP pool (arms watchdog)§
POST/api/network/ntpapiSet NTP servers and timezone§
GET/api/network/statusapiFull network state (read-only, safe)§
POST/api/network/wifiapiSwitch WiFi AP/client mode (arms watchdog)§
GET/api/network/wifi/scanapiScan for visible networks (slow, up to 30s)§
GET/api/network/wifi/statusapiWiFi mode, SSID, link and rollback reason§
Radio
GET/api/digimesh-peersapiRegistered non-sensor radio peers§
POST/api/digimesh-peersapiRegister a radio peer§
DELETE/api/digimesh-peers/:addressapiRemove a radio peer§
PUT/api/digimesh-peers/:addressapiUpdate a radio peer§
GET/api/mesh-topologyapiWhole mesh as nodes, edges and routes§
POST/api/sensors/:id/fft/:fftId/analyzeingestCompute a spectrum from a stored capture§
GET/api/sensors/:id/mesh-mapapiStored route for one sensor§
POST/api/sensors/:id/mesh-mapingestQueue a route-discovery request§
POST/api/sensors/:id/request-fftingestRequest a raw vibration waveform capture§
GET/api/sensors/:id/sensor-configingestReported and desired sensor configuration§
POST/api/sensors/:id/sensor-configingestQueue a sensor configuration change§
GET/api/sensors/config-options/:typeingestConfiguration schema for a sensor type§
POST/api/sensors/:id/sensor-config/managementingestTurn Atrium’s configuration of a sensor on or off§
POST/api/sensors/:id/sensor-config/discardingestDrop a sensor’s pending configuration changes§
POST/api/sensors/:id/sensor-config/point-to-multipointingestSend a sensor’s configuration frames with no mesh route§
GET/api/gateway/network-idingestThe radio network ID and any change in progress§
POST/api/gateway/network-idingestChange the radio network ID, moving sensors with it§
POST/api/gateway/network-id/switchingestFinish a network ID change now§
DELETE/api/gateway/network-id/migrationingestCancel a network ID change§
GET/api/gateway/radio-linkingestWhere the gateway reaches its radio modem§
POST/api/gateway/radio-linkingestSet the wireless modem’s address (containers)§
Network monitoring
GET/api/network-monitoringapiNetwork monitoring settings§
PUT/api/network-monitoringapiChange network monitoring settings§
GET/api/connectivityapiEvery sensor’s link grade, and the site topology§
GET/api/sensors/:id/connectivityapiOne sensor’s link in depth, with test history§
POST/api/sensors/:id/connectivityingestQueue a network test for a sensor§
Communication log
GET/api/sensors/:id/comm-logapiFrames exchanged with a sensor§
GET/api/sensors/:id/comm-log/:entryapiOne round with its frames§
GET/api/comm-log/settingsapiCommunication log settings§
PUT/api/comm-log/settingsapiChange communication log settings§
Sensor firmware
GET/api/firmware/catalogapiPublished sensor firmware builds§
POST/api/firmware/downloadapiFetch a catalog build into the store§
POST/api/firmware/filesapiUpload a firmware file into the store§
POST/api/firmware/settingsapiSet the transfer’s per-chunk pause§
GET/api/firmware/activeapiUpdates on the air now§
GET/api/sensors/:id/firmwareapiA sensor’s firmware, fitting builds and jobs§
POST/api/sensors/:id/firmwareingestQueue a firmware update for a sensor§
DELETE/api/sensors/:id/firmwareingestCancel a queued firmware update§
Monitor
GET/api/dashboard/viewsapiCaller's dashboard views§
POST/api/dashboard/viewsapiCreate a view§
DELETE/api/dashboard/views/:idapiDelete a view and its widgets§
PUT/api/dashboard/views/:idapiRename or reorder a view§
GET/api/dashboard/widgetsapiCaller's widgets, optionally by view§
POST/api/dashboard/widgetsapiCreate a widget§
DELETE/api/dashboard/widgets/:idapiDelete a widget§
PUT/api/dashboard/widgets/:idapiUpdate or move a widget§
Reports
GET/api/saved-queriesapiSaved SQL snippets§
POST/api/saved-queriesapiCreate a saved query§
DELETE/api/saved-queries/:idapiDelete a saved query§
GET/api/scheduled-reportsapiConfigured scheduled reports§
POST/api/scheduled-reportsapiCreate a scheduled report§
DELETE/api/scheduled-reports/:idapiDelete a scheduled report§
PUT/api/scheduled-reports/:idapiUpdate a scheduled report§
POST/api/scheduled-reports/:id/send-nowingestGenerate and email a report immediately§
Apps
GET/api/appsapiInstalled apps with license and model state§
POST/api/apps/:id/disableapiDisable an app§
POST/api/apps/:id/enableapiEnable an app§
DELETE/api/apps/:id/licenseapiRemove a stored license§
GET/api/apps/:id/licenseapiLicense status for one app§
POST/api/apps/:id/licenseapiActivate a license§
POST/api/apps/:id/tokenapiMint an app-scoped token (not an API key)§
POST/api/apps/:id/uninstallapiUninstall an app§
GET/api/apps/catalogapiApp Center catalog§
GET/api/apps/catalog/:idapiOne catalog app, all versions and README§
POST/api/apps/installapiInstall an uploaded app package§
POST/api/apps/install-from-catalogapiInstall an app from the catalog§
GET/app-ui/:appId/*apiApp UI static assets (no auth)§
GET/api/apps/readsapiData views and actions installed apps offer§
Direct SQL
POST/api/sqlite/queryapiExecute arbitrary SQL (use with care)§
GET/api/sqlite/schemaapiColumn definitions for one table§
GET/api/sqlite/tablesapiList database tables§
MQTT
GET/api/mqtt/configingestBroker settings (password masked)§
POST/api/mqtt/configingestSave broker settings and reconnect§
POST/api/mqtt/publishersingestSet the publisher grant list§
GET/api/mqtt/statusingestPublishing state and resolved topics§
POST/api/mqtt/test-publishingestPublish one test message, bypassing grants§
POST/api/mqtt/toggleingestTurn publishing on or off§
MCP
POST/api/mcpapiMCP JSON-RPC requests§
GET/api/mcpapiMCP notification stream§
DELETE/api/mcpapiEnd an MCP session§
GET/api/mcp/sessionsapiConnected MCP clients§

27. Limits, Gotchas and Known Issues

Collected here so you can scan them before writing code rather than discovering them in production. Each of these has caught a real integrator.

Design constraints

ConstraintWhat it means for you
Session tokens expire after 7 days Not extended by use. Handle 401 by re-authenticating and retrying, or use an API token (2.6.0+), which lasts until you revoke it.
No websockets; webhooks only from the event bus Poll, or use MQTT for push. From 2.6.0 a bus binding can POST an event to your URL (Section 12), best-effort. Alert actions themselves are limited to email and relay_command.
Telemetry is deleted on a retention schedule data_retention_days (default 100, often lowered) governs a nightly purge at 03:00 gateway time that deletes readings, raw ingest rows, and alert history older than the window. Nothing older survives. The gateway is not an archive — poll often enough to stay inside the window.
All times are UTC epoch milliseconds Never seconds. The display timezone and °C/°F preference affect the UI only.
Readings are per metric, not per packet A sensor reporting temperature and humidity produces two rows per report. MQTT telemetry payloads, by contrast, group a packet’s metrics into one data object.
Values are native units Conversions and labels are display metadata. Fetch them separately and apply them yourself if your figures must match the customer’s screen.
Hardware is modest The EG5120 has 4 cores and ~2 GB RAM; the EG5100 has one core, ~1 GB, and no swap. Wide queries and tight polling loops are felt. Prefer narrow, indexed requests.
Result caps /api/sensors: 5000 max. Telemetry raw: 10,000 max. Telemetry aggregated: 5000 buckets. Bus events and runs: 500 max. Waveform capture list: 200 max. Communication log: 1000 entries per page. Sensor connectivity: the last 50 tests.
Firmware gates endpoints /api/bus/* needs 2.4.0+; /api/network/* and /api/digimesh-peers need 2.5.0+; API tokens, OAuth, MCP and webhooks 2.6.0+; sensor firmware and the network ID 2.7.0+; network monitoring and the communication log 2.9.1+; custom waveform requests 2.9.2+. Older firmware returns 404. Check platform_version first.
Radio writes by token are rate-limited A burst of 3, then one call every two minutes per token, across waveform requests, mesh maps, configuration pushes, firmware updates and network ID changes. 429 with Retry-After: 120.
One radio, one job at a time During a sensor firmware transfer the gateway hears no other sensor and defers every other radio write. GET /api/firmware/active tells you when.

Known issues on platform 2.9.3

Easy mistakes

  • Forgetting ?whitelist= on /api/devices — the parameter is mandatory and its absence is a 400, not a default.
  • Treating POST /api/sensors/:id/meta as a merge — it is a full replace. Read, modify, write back.
  • Treating POST /api/gateway/config as a merge — same trap, with more collateral damage: a partial POST resets SMTP, retention, timezone, and temperature unit.
  • Assuming raw and bucketed telemetry share an order — raw comes back newest-first, bucketed oldest-first.
  • Parsing tags as an object — it is a JSON-encoded string, so it needs a second parse.
  • Reading rssi as a conventional negative dBm — Atrium reports a positive magnitude where lower is better. 40 is strong; 90 is marginal.
  • Expecting a trigger to alert on its own — it needs an automation referencing it before anything happens.
  • Assuming an error status means a broken sensor — it also covers low battery and weak signal. Inspect the underlying fields.
  • Paging alert history with offset alone — rows shift as events arrive. Track the highest id instead.
  • Expecting a radio write to take effect immediately — sensors sleep. "status":"pending" means queued, not applied.
  • Reading a transmit Success as “the sensor did it” — it means the sensor’s radio acknowledged the frame. Confirm a configuration change through sync_status, and a waveform request through the new capture.
  • Treating a good grade as proof the sensor is reachable — a grade is the last measured path. Check reachable as well.
  • Giving an integration a session login when a scoped token would do — a session reaches everything its account can, including the SQL endpoint.
  • Comparing RSSI across endpoints — sensor and reading objects report a positive magnitude; network test results and the communication log report negative dBm.
  • Creating dashboards with the integration’s account — views and widgets are per-user, so the customer will not see them.
  • Renaming the gateway after wiring MQTT — it rewrites every topic path and silently orphans subscribers.

Security checklist

  1. 1
    Change the default credentials
    Before anything else, and certainly before enabling Remote Access.
  2. 2
    Give the integration its own API token
    Issue a token with only the scopes it needs, one token per integration, so each can be revoked on its own. Grant a radio:* scope or apps:actions only to something that must transmit or switch equipment. Do not embed admin credentials in an external platform.
  3. 3
    Prefer an on-premises connector to public exposure
    A small local service that polls the gateway and forwards to your platform keeps the gateway off the public internet entirely. Reach for Remote Access only when that is not possible.
  4. 4
    Use TLS on MQTT
    Enable TLS with certificate verification, and mutual TLS if your broker supports it. Verify with Test Publish before trusting the feed.
  5. 5
    Keep the SQL endpoint out of production paths
    It executes arbitrary statements, including writes, and bypasses every validation rule. Use the purpose-built endpoints.