Obtain Device Messages

Feature Description

Obtain device messages based on device ID

Interface Address

GET /v1.0/devices/{device_id}

Header Parameter

Parameter name Type Parameter position Description Required
client_id String header client_id Yes
access_token String header Access token for obtaining token-related interface Yes
sign String header Signature calculated by the “after get token” signature algorithm Yes
sign_method String header Digestion algorithm of signature, HMAC-SHA256 Yes
t Long header 13-digit standard time stamp Yes

Request Parameters

Parameter name Type Parameter position Description Required
deviceId String URI Deviceid Yes

Request Example

GET /v1.0/devices/XXXXXXc3c53fbd6f3ewqfa

Return Messages

Parameter name Type Description
code Integer Response code(see error code section for details)
success Boolean Success or failed: (true: success, false: failed)
msg String Request failed message. Empty when successful
t Long Timestamp, 13-bit length
result Object Return results

Result Description

Parameter name Type Description
id String Device ID
uid String Userid
local_key String Key
category String Product category
product_id String Productid
sub Boolean Whether it is a sub-device(true: Yes, false: No)
uuid String Unique device identifier
owner_id String Device ownerid
online Boolean Device online status
name String name
ip String ip
time_zone String time_zone
create_time Long Timestamp of the initial distribution of the device
update_time Long Timestamp of device status update
active_time Long Timestamp of the last network distribution of the device
status List Device status list

status Description

Parameter name Type Description
code String status code
value String Value of status code

Return Example

{
"success": true,
"t": 1545450842372,
"result": {
"uuid": "vdevo154304046613390",
"uid": "XXXXXX040189023TbBIw",
"name": "BRT-RGB-vdevo",
"ip": null,
"sub": false,
"category": "dj",
"online": true,
"id": "vdevo154304046613390",
"time_zone": "+08:00",
"local_key": "XXXXc3666fe5ea76",
"create_time": 1543040466,
"update_time": 1543040466,
"active_time": 1543040466,
"owner_id": "3269040",
"product_id": "iDdXdkIr84vFcAgA",
"status": [
{
"code": "switch_led",
"value": "true"
},
{
"code": "work_mode",
"value": "scene_2"
},
{
"code": "bright_value",
"value": "25"
},
{
"code": "temp_value",
"value": "0"
},
{
"code": "colour_data",
"value": "{\"h\":37.0,\"s\":255.0,\"v\":189.0}"
},
{
"code": "scene_data",
"value": ""
},
{
"code": "flash_scene_1",
"value": ""
},
{
"code": "flash_scene_2",
"value": ""
},
{
"code": "flash_scene_3",
"value": ""
},
{
"code": "flash_scene_4",
"value": "{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":300.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"
}
]
}
}

400 Call

Consult

400-881-8611