Get Device Status
Query the current device state of a specified device over a WebSocket connection.
Topic
text
device.status.getPermission
Required:
text
device:readRequest
json
{
"type": "request",
"requestId": "req_status_001",
"topic": "device.status.get",
"data": {
"deviceId": "abc123456789"
}
}Request data Schema
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | Unique device identifier |
Reply
json
{
"type": "reply",
"requestId": "req_status_001",
"topic": "device.status.get",
"success": true,
"data": {
"deviceId": "abc123456789",
"name": "YourDeviceName",
"deviceType": "SM4_T_TH",
"status": "ONLINE",
"peripherals": {
"relays": [
{
"index": 1,
"on": false
},
{
"index": 2,
"on": false
},
{
"index": 3,
"on": true
},
{
"index": 4,
"on": false
}
],
"digitalInputs": [
{
"index": 1,
"active": false
},
{
"index": 2,
"active": false
},
{
"index": 3,
"active": false
},
{
"index": 4,
"active": false
}
],
"sensors": [
{
"index": 1,
"type": "TEMP",
"value": 30.4,
"unit": "C",
"status": "ONLINE"
},
{
"index": 2,
"type": "TEMP",
"value": 32.6,
"unit": "C",
"status": "ONLINE"
},
{
"index": 2,
"type": "HUMI",
"value": 54,
"unit": "%",
"status": "ONLINE"
}
]
},
"stateUpdatedAt": "2026-04-03T00:41:44Z"
}
}Rules
datadirectly reuses the Device schema from REST Get DevicestateUpdatedAtuses RFC3339 UTCperipheralsis the current hardware status snapshot; clients should replace it as a full block
Errors
Possible responses:
INVALID_REQUESTAUTH_SCOPE_DENIEDDEVICE_NOT_FOUNDRATE_LIMITEDINTERNAL_ERROR
