Get Device State
Fetches the latest state of a single device. The server actively refreshes the device before responding. If the device is offline, the response contains the state from the last time it was online.
Use this endpoint when the caller explicitly needs the newest state for one device. For dashboards, bulk lists, and background sync, prefer List Devices.
Rate Limit
| Dimension | Rule | On Limit |
|---|---|---|
| Real-time refresh per device | Maximum 1 request per 10 seconds | Returns 429 RATE_LIMITED with Retry-After |
Endpoint
http
GET /wlte/v1/devices/{deviceId}Authorization Requirements
| Scope | Required | Description |
|---|---|---|
device:read | Yes | Read the current state of a single device |
Request
Full URL:
http
GET {baseUrl}/wlte/v1/devices/{deviceId}Request headers:
http
Authorization: Bearer {accessToken}
Accept: application/jsonPath parameters:
| Parameter | Type | Required | Rule |
|---|---|---|---|
deviceId | string | Yes | Must not be empty |
Success Response
HTTP status:
text
200 OKResponse body:
json
{
"code": "SUCCESS",
"message": "OK.",
"requestId": "req_001",
"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-29T10:28:45.258Z"
}
}Response Rules
- When the device is online, the response reflects the state after the current refresh
- When the device is offline, the response contains the state from the last time it was online;
statusisOFFLINEandstateUpdatedAtreflects the last update time - A single sensor interface may return multiple measurement types at the same
index. Useindex + typeas the composite key
Response data Schema
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | Unique device identifier |
name | string | Yes | Device display name |
deviceType | string | Yes | Device capability type code used to identify the device capability profile |
status | string | Yes | Device connectivity status. Enum: ONLINE, OFFLINE |
peripherals | object | No | Current device peripheral state |
peripherals.relays | array<RelayState> | No | Relay state list. See Relay Outputs |
peripherals.digitalInputs | array<DigitalInputState> | No | Digital input state list. See Digital Inputs |
peripherals.sensors | array<SensorState> | No | Sensor reading list. See Sensor Readings |
peripherals.analogInputs | array<AnalogInputState> | No | Analog input reading list. See Analog Input Readings |
stateUpdatedAt | string | Yes | Device state update time in RFC3339 UTC |
Notes:
- When
deviceTypereturnsUNSUPPORTED, no OpenAPI device type definition is currently available for that device, so it cannot be integrated through the standard capability model yet
Error Responses
Possible responses:
400 INVALID_REQUEST401 AUTH_REQUIRED401 AUTH_INVALID401 AUTH_EXPIRED403 AUTH_SCOPE_DENIED404 DEVICE_NOT_FOUND429 RATE_LIMITED503 GATEWAY_UNAVAILABLE504 DEVICE_TIMEOUT
429 RATE_LIMITED Response Body
When the rate limit is triggered, the response includes a data field and a Retry-After header:
json
{
"code": "RATE_LIMITED",
"message": "Too many requests",
"requestId": "req_001",
"data": {
"retryAfterSeconds": 10
}
}retryAfterSeconds carries the same value as the Retry-After response header, in seconds.
