Device Detail Page
The Device Detail page (route /system/devices/:deviceId) is the single-screen workspace for inspecting and operating one device. It aggregates device information, tag lists, live data, historical trends, and write/control actions.
1. Page Layout
The page is organized into tabs:
- Info — Device metadata and connection parameters
- Tags — Tag list with inline editing and batch operations
- Realtime — Live tag values pushed via WebSocket
- History — Time-series charts queried from InfluxDB
- Control — Write values to writable tags (requires
device:write)
2. Device Info
The Info tab shows:
| Field | Description |
|---|---|
| Name | Display name of the device |
| Group | Ancestor path (breadcrumbs) from groups/:id/path |
| Protocol | Modbus / OPC UA / MQTT / S7 / Virtual |
| Address | IP:port, connection string, or broker URL |
| Scan Rate | Collection interval in milliseconds |
| Online Status | online / offline / unknown |
| Template | Applied template name (if any) |
Use Edit to modify fields; changes are saved with PUT /devices/:id.
3. Tag List
The Tags tab lists every data tag bound to the device. Columns:
- Name — Human-readable label
- Address — Protocol-specific address (e.g.
HR40001,ns=2;s=Temperature) - Data Type —
bool,int16,uint16,float32,string, ... - Access —
ro(read-only) /rw(read-write) - Scale / Offset — Linear transform applied to raw values
- Deadband — Minimum change before a value is published
Operations:
- Add Tag —
POST /devices/:deviceId/tags - Batch Add —
POST /devices/:deviceId/tags/batch(paste a JSON array) - Edit / Delete — inline row actions
- Apply Template — merge tags from a device template
4. Realtime Data
The Realtime tab subscribes to WebSocket updates for the current device. The frontend joins a room named device:{deviceId} so the gateway only pushes relevant data points.
Each update payload looks like:
{
"deviceId": "...",
"tagId": "...",
"value": 23.4,
"quality": "good",
"timestamp": "2026-07-13T08:30:00.000Z"
}
Values are displayed in a sortable table and optional live gauge widgets. The page also calls GET /devices/:id/data/latest on mount to render the most recent cached value immediately, before the first WebSocket frame arrives.
5. Historical Data
The History tab queries InfluxDB through the backend:
GET /devices/:id/data/history?start=2026-07-13T00:00:00Z&end=2026-07-13T23:59:59Z&tagId=...
Features:
- Time range picker (last 1h / 6h / 24h / 7d / custom)
- Multi-tag overlay charts
- Aggregation selector (raw / mean / max / min per interval)
- CSV export of the queried series
If the query returns no points, verify the tag is being persisted (the persist.step pipeline step must be enabled) and that the InfluxDB bucket in projectinfo.json is correct.
6. Device Control
The Control tab lets authorized users write values to writable tags. Only tags with access = rw are listed.
- Select a tag
- Enter the target value (type-validated)
- Click Write — sends
POST /devices/:id/data/writewith{ tagId, value } - The collector executes
doWriteTagand the result is reflected in the Realtime tab
Caution — Writing to physical equipment can cause real-world effects. Confirm the action in the confirmation dialog before proceeding.
7. Diagnostic Tools
From the page header:
- Ping —
POST /devices/:id/pingchecks basic connectivity - Diagnostic —
POST /devices/:id/diagnosticruns connection + sample tag read + latency report
Use these when a device appears offline or values look stale.
8. FAQ
Q: The Realtime tab is empty even though the device is online.
A: Confirm the WebSocket connection is established (check the browser network panel for a socket.io connection). Then verify the collector is publishing for this device — look for device.data events in the backend logs.
Q: History returns "No data".
A: Check that the tag's persist flag is on, the InfluxDB token is valid, and the bucket name in projectinfo.json matches the one configured in InfluxDB.
Q: Write operations are greyed out.
A: Either the tag's access is ro, or the current user lacks the device:write permission. Switch to a writable tag or contact an administrator.
Q: Can I export the tag list? A: Yes. Use the Export button on the Tags tab to download a JSON or CSV file that can later be re-imported.
9. Related Links
../../03-device/README.md../../09-websocket/README.md../../07-storage/README.md- Device Controller Source