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, or before and after a device operation. For dashboards, bulk lists, and background synchronization, prefer List Devices.
Do not use this endpoint as a high-frequency polling channel for every device under an account. For continuous monitoring of offline, power-loss, and peripheral-state changes, use WebSocket events and confirm one device's state with this endpoint only when needed.
Rate Limit
Real-time refresh is protected by a strict request-frequency limit. Repeated requests in a short period return 429 RATE_LIMITED; wait for the duration specified by Retry-After before retrying.
Endpoint
GET /wlte/v1/devices/{deviceId}Authorization Requirements
| Scope | Required | Description |
|---|---|---|
device:read | Yes | Read the current state of a single device |
Request
Full URL:
GET {baseUrl}/wlte/v1/devices/{deviceId}Request headers:
Authorization: Bearer {accessToken}
Accept: application/jsonPath parameters:
| Parameter | Type | Required | Rule |
|---|---|---|---|
deviceId | string | Yes | Must not be empty |
Success Response
HTTP status:
200 OKResponse body:
{
"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_LIMITED409 DEVICE_BUSY503 GATEWAY_UNAVAILABLE504 DEVICE_TIMEOUT
For handling 429 RATE_LIMITED, see Rate Limits and Retries.
