获取指定设备下指定参数的实时值
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
work_bench_context | WorkBenchContext | 必须 | 请求端信息 | ||
|
|||||
uuid | String | 必须 | 73214648-8474-4063-be58-ff46be43a5e7 | 设备uuid | |
property_code | String | 必须 | screen_control | 参数code,如灯亮度参数为brightness;参数code信息请查阅‘平台技术’下‘设备详细信息开发文档’[根据设备类型查看该设备所拥有的采集类参数]。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | PojoResult | 返回查询结果 | |
|
1 2 3 4 5 6 7 8 9 10 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaCampusDeviceOpenapiGetdevicerealtimedataRequest req = new AlibabaCampusDeviceOpenapiGetdevicerealtimedataRequest(); AlibabaCampusDeviceOpenapiGetdevicerealtimedataRequest.WorkBenchContext obj1 = new AlibabaCampusDeviceOpenapiGetdevicerealtimedataRequest.WorkBenchContext(); obj1.setCompanyId(10000L); obj1.setCampusId(100001L); req.setWorkBenchContext(obj1); req.setUuid( "73214648-8474-4063-be58-ff46be43a5e7" ); req.setPropertyCode( "screen_control" ); AlibabaCampusDeviceOpenapiGetdevicerealtimedataResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | < alibaba_campus_device_openapi_getdevicerealtimedata_response > < result > < content > < property_code >screen_control</ property_code > < property_name >屏幕内容设置</ property_name > < value >屏幕内容</ value > < property_kind >30600</ property_kind > < unit_code >KA</ unit_code > < ref_device_id >d360dcc2-c443-11e7-9a06-024210058642</ ref_device_id > < ref_property_code >lightSwitchStatus</ ref_property_code > </ content > < request_id >null</ request_id > < error_code >200</ error_code > < error_msg >null</ error_msg > < success >true</ success > </ result > </ alibaba_campus_device_openapi_getdevicerealtimedata_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|