node-red-contrib-tdn-dss 1.0.0
Node-RED node for DSS Pro / DSS Express (OpenAPI) and RPC2 devices: login, keepalive and API calls
node-red-contrib-tdn-dss
Node-RED node for DSS platforms and RPC2 devices:
- Devices (IPC, NVR, XVR, IVSS, VTO, OEM firmware) via the RPC2 API (
/RPC2_Login,/RPC2) - VMS platforms (DSS Pro, DSS Express and other
brms-based platforms) via the OpenAPI (/brms/api/v1.0/accounts/authorize,X-Subject-Token)
The node logs in, caches the session, optionally keeps it alive, and makes API calls with it.
Installation
From the Node-RED editor: Menu → Manage palette → Install, search for node-red-contrib-tdn-dss.
Or from the command line:
cd ~/.node-red
npm install node-red-contrib-tdn-dss
Requires Node-RED 2.0+ and Node.js 14+.
Examples
Import from Menu → Import → Examples → node-red-contrib-tdn-dss:
- RPC2 device login and call: login,
magicBoxcalls, logout - DSS login and call: token login, device page query, logout
Configuration
| Field | Notes |
|---|---|
| Platform | Device – RPC2 or VMS – OpenAPI |
| Host / Port | Port defaults: 80 (device), 443 (HTTPS / VMS) |
| HTTPS / Allow self-signed | VMS defaults to HTTPS; DSS ships a self-signed cert |
| Username / Password | Stored as Node-RED credentials |
| API prefix | VMS only, default /brms/api/v1.0 |
| Client type | VMS only, default WINPC_V2 |
| Keep alive / Interval | Background keepalive (default 30 s device, 22 s VMS) |
| Global key | Global context key for the session/token (default rpc2Session) |
Usage
msg.action: login | request | keepalive | logout. If omitted, the node sends a request when one is described, otherwise logs in.
Device RPC2 call:
msg.payload = { method: "magicBox.getDeviceType" };
// optional: params, object
VMS OpenAPI call:
msg.method = "POST"; // default POST
msg.path = "/brms/api/v1.1/device/page"; // or relative to the API prefix
msg.payload = { pageNum: 1, pageSize: 100 };
Output: msg.payload = response body, msg.session = session/token, msg.statusCode (VMS).
Connection overrides are still accepted on input:
msg.payload = { host: "10.0.0.5", user: "admin", pass: "secret" };
Expired sessions are re-established automatically (one retry per request). The session is logged out on redeploy.