文档
测试

设备列表(蓝牙)

POST
{{host}}/api/device/searchBtDevice

请求参数

参数名
类型
描述
必填
page
string
第几页
必填
rows
int
每页数据大小,最大值:100
必填
device_type
string
设备类型ID
必填
online
int
设备状态(初始化-0,已组网-1,已测试-2,待调整-3,设备下线-9,设备上线-10)
必填

响应参数

参数名
类型
描述
必填
ret
int
返回码:0-正常,非0-失败
必填
msg
string
返回消息
必填
result
array
返回数据
必填
total
int
总数
必填
data
array
当前分页数据
必填
bt_device_id
int
蓝牙设备ID
必填
bt_device_content
json
蓝牙设备信息
必填
bt_device_type
string
蓝牙设备类型
必填
gw_device_content
json
网关设备信息,没有关联的时候是null
必填
subscribe_bt_group_name
string
订阅的蓝牙分组名称
必填
subscribe_bt_group_address
string
订阅的蓝牙分组地址
必填
publish_bt_group_address
string
微波传感器控制的组地址-调光
必填
publish_switch_bt_group_address
string
微波传感器控制的组地址-开关
必填
level_id
int
层级ID
必填
level_name
string
层级名称
必填
extend
object
扩展信息 | 组网时需要写入的信息
必填
bqs
hex
485转换器:波特率
必填
delay
hex
微波人体感应:延迟时间
必填
lowLevel
hex
微波人体感应:低亮度
必填
highLevel
hex
微波人体感应:高亮度
必填
gateway
string
网关:名称
必填
mqttService
string
网关:MQTT服务地址
必填
online
int
蓝牙组网状态:0-未组网,1-已组网,2-需要修改
必填

说明 / 示例

###### 示例代码 ```javascript //请求 let res = await post("api/device/searchBtDevice", { page:1, rows:100, device_type: "MeshConverter", online:0 }) //返回 res = { ret: 0, msg: "查询成功", result: { "total": 2, "data": [ { "bt_device_id": 141, "bt_device_name": "蓝牙控制器", "bt_device_content": { "name": "" }, "bt_device_type": "MeshConverter", "device_ids": "14,15,142,148,150", "device_types": "LEDLight,LoopController", "subscribe_bt_group_address": "C01F,C02A,C02B,C02D", "subscribe_bt_group_name": "组网地址,63,全部灯", "level_id": 5, "level_name": "一层候车厅2", "online": 0 }, { "bt_device_id": 149, "bt_device_name": "蓝牙控制器", "bt_device_content": { "name": "" }, "bt_device_type": "MeshConverter", "device_ids": "151,152", "device_types": "LoopController", "subscribe_bt_group_address": "C01F,C02A", "subscribe_bt_group_name": "组网地址,63,全部灯", "level_id": 5, "level_name": "一层候车厅2", "online": 0 } ] } } ```