Check Device Online Status - Imou Open Platform
deviceOnline: Get device online status
Function details
Get the online status of the specified device and all channels under the device.
Note: This interface cannot obtain the online status of devices that have been bound by others. For unbound devices, the returned result only indicates the online status of the device (not the given channel 0).
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/deviceOnline
request format
Please refer to the Development Specification for the API request method and some authentication parameters such as sign calculation method
The sub-account token can be requested without permission
Incoming parameter description
| Parameter name | Parameter type | Required or not | Default value | Legal value | Parameter description |
|---|---|---|---|---|---|
| token | String | Yes | Administrator or sub-account accessToken | ||
| deviceId | String | Yes | Device serial number |
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"222317f687a11f4db0a1261e8151692c",
"time":1603370654,
"nonce":"0a95c2a0-5c6f-4e83-91ec-5723253416c7"
},
"id":"66363b83-c699-4513-b16b-2ee54fd62031",
"params":{
"deviceId":"TESTQWERXXXX",
"token":"At_00000ad9e6e87f0142eb92e207aec46a"
}
}
Return data field description
| Field name | Field type | Field description | |
|---|---|---|---|
| deviceId | String | Device serial number | |
| onLine | String | Device online status, 0: means offline; 1: means online; 3: means upgrading; 4: means sleeping | |
| channels | channelId | String | Device channel number |
| onLine | String | Device online status, 0: means offline; 1: means online; 3: means upgrading; 4: means sleeping | |
Sample output
{
"result":{
"msg":"The operation was successful.",
"code":"0",
"data":{
"channels":[
{
"channelId":"0",
"onLine":"1"
}
],
"deviceId":"TESTQWERXXXX",
"onLine":"1"
}
},
"id":"66363b83-c699-4513-b16b-2ee54fd62031"
}
