detection.door.contactState(获取门磁状态属性)
detection.door.contactState:获取门磁状态属性
detection.door.contactState · 设备级 · 权限 Config
功能详情
读门磁触点状态。0 关、1 开(int)。
请求地址
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.property.get
最小权限
管理员操作自己绑定的设备不需要权限。操作被分享设备需要基础配置权限。子用户绑定不需要。子账号需要 Config。设备级不要传 channelId。设备和通道写在同一次请求里返回 DV2008。
传入参数说明
| 参数名 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
token | String | 是 | 管理员、子用户或子账号 accessToken |
deviceId | String | 是 | 设备序列号 |
productId | String | 否 | 可省略。传了且与该设备实际型号不一致 → DV2009 |
properties | Array | 是 | ["detection.door.contactState"] |
样例输入
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"system": {
"ver": "1.0",
"appId": "lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time": 1706511734,
"nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
},
"params": {
"token": "<yourAccessToken>",
"deviceId": "TESTIPC000012345",
"properties": ["detection.door.contactState"]
}
}
返回 data 字段说明
| 参数名 | 说明 | 类型 | 必填 | 取值 |
|---|---|---|---|---|
detection.door.contactState | 门磁触点 | int | 是 | 0 关;1 开 |
样例输出
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"result": {
"code": "0",
"msg": "Operation is successful",
"data": {
"properties": {
"detection.door.contactState": 0
}
}
}
}
错误码
网关
DV20xx
