Obtain Device Function Point

Feature Description

Obtain device function point messages based on device ID

Interface Address

GET /v1.0/devices/{device_id}/status

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
device_id String URI DeviceID Yes

Request Example

POST /v1.0/devices/012006892c3ae84145fe/status

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 Array Device function point

Result Description

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

Return Example

{
"success": true,
"t": 1545447665981,
"result": [
{
"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