Skip to content

数据模型

ResInfo

json
{
  "rid": "string",
  "rtype": "string"
}

属性

名称类型必选约束中文名说明
ridstringtruenone资源UUIDnone
rtypestringtruenone资源类型none

DeviceDetail

json
{
  "id": "string",
  "type": "string",
  "name": "string",
  "join_status": 0,
  "online": 0,
  "has_new": 0,
  "product": {
    "cat1_id": 0,
    "cat1_name": "string",
    "cat2_id": 0,
    "cat2_name": "string",
    "cat3_id": 0,
    "cat3_name": "string",
    "manufacturer": "string",
    "model": "string",
    "hardware_version": "string",
    "software_version": "string",
    "zigbee_version": "string"
  },
  "services": [
    {
      "rid": "string",
      "rtype": "string"
    }
  ]
}

属性

名称类型必选约束中文名说明
idstringtruenone设备UUIDnone
typestringtruenone类型此处必然为 device
namestringtruenone名称none
join_statusintegertruenone入网状态一般, 需要过滤 join_status=1 的设备, 若=0, 代表不是用户想加的设备
onlineintegertruenone在线状态1在线, 0离线
has_newintegertruenone是否有新版本1有更新, 0无
productobjecttruenone产品信息none
» cat1_idintegertruenone1类id1网关, 2灯具, 3同步器
» cat1_namestringtruenone1类名称none
» cat2_idintegertruenone2类id分类信息, 如 203为CW灯, 205为RGBCW灯
» cat2_namestringtruenone2类名称none
» cat3_idintegertruenone3类id精确到产品, 如 20504 为 Bar灯
» cat3_namestringtruenone3类名称none
» manufacturerstringtruenone厂商信息zigbee basic cluster 中的 manufacturer
» modelstringtruenone型号zigbee basic cluster 中的 model
» hardware_versionstringtruenone硬件版本号none
» software_versionstringtruenone软件版本号none
» zigbee_versionstringtruenoneZigbee版本号none
services[ResInfo]truenonenone

PowerOn

json
{
  "mode": 0,
  "on_mode": 0,
  "on": 0,
  "brightness_mode": 0,
  "brightness": 0,
  "color_mode": 0,
  "color_x": 0,
  "color_y": 0,
  "color_cw": 0
}

属性

名称类型必选约束中文名说明
modeintegertruenone模式0 默认, 1 记忆, 2 自定义, 3 亮, 4 灭
on_modeintegertruenone开关模式0 默认, 1 记忆, 2 自定义
onintegertruenone开关none
brightness_modeintegertruenone亮度模式0 默认, 1 记忆, 2 自定义
brightnessintegertruenone亮度0-100
color_modeintegertruenone颜色模式0 默认, 1 记忆, 2 自定义xy, 3 自定义cw
color_xintegertruenone彩色x值none
color_yintegertruenone彩色y值none
color_cwintegertruenone冷暖2000 - 6500

ColorXY

json
{
  "x": 0,
  "y": 0
}

属性

名称类型必选约束中文名说明
xintegertruenoneX值none
yintegertruenoneY值none

LightDetail

json
{
  "id": "string",
  "type": "string",
  "name": "string",
  "on": 0,
  "brightness": 0,
  "color_mode": 0,
  "color_cw": 0,
  "color_x": 0,
  "color_y": 0,
  "color_len": 0,
  "color_arr": [
    {
      "x": 0,
      "y": 0
    }
  ],
  "pack": [
    "string"
  ],
  "position_x": 0,
  "position_y": 0,
  "positions": "string",
  "power_on": {
    "mode": 0,
    "on_mode": 0,
    "on": 0,
    "brightness_mode": 0,
    "brightness": 0,
    "color_mode": 0,
    "color_x": 0,
    "color_y": 0,
    "color_cw": 0
  },
  "support_segment": 0
}

属性

名称类型必选约束中文名说明
idstringtruenone灯具UUIDnone
typestringtruenone类型此处固定为 light
namestringtruenone名字none
onintegertruenone开关状态none
brightnessintegertruenone亮度1-100
color_modeintegertruenone颜色模式0 彩色HSV模式, 1 彩色XY模式, 2 冷暖色, 3 彩色多组XY模式
color_cwintegertruenone冷暖值2000 - 6500
color_xintegertruenoneXY模式X值XY色盘中的x值
color_yintegertruenoneXY模式Y值XY色盘中的y值
color_lenintegertruenone分段长度分段调光时, 分几段
color_arr[object]truenone分段数据none
» xintegertruenonex值none
» yintegertruenoney值none
pack[string]falsenoneBweeApp专用
position_xintegerfalsenoneBweeApp专用
position_yintegerfalsenoneBweeApp专用
positionsstringtruenoneBweeApp专用
power_onPowerOnfalsenone通电反应none
support_segmentintegertruenone分段能力1支持分段色, 0 不支持

RoomDetail

json
{
  "id": "string",
  "type": "string",
  "name": "string",
  "room_kind": 0,
  "room_type": "string",
  "icon": "string",
  "background": 0,
  "sequence": 0,
  "children": [
    {
      "rid": "string",
      "rtype": "string"
    }
  ],
  "services": [
    {
      "rid": "string",
      "rtype": "string"
    }
  ]
}

属性

名称类型必选约束中文名说明
idstringtruenone房间UUIDnone
typestringtruenone类型此处必然为 room
namestringtruenone名称房间名字
room_kindintegertruenone房间种类0普通, 1全屋, 2未分配
room_typestringtruenone房间分类任意字符串, 暂未定义, 可以是 "卧室", "厨房" 等
iconstringtruenoneBweeApp专用
backgroundintegertruenoneBweeApp专用
sequenceintegertruenoneBweeApp专用
children[ResInfo]truenone包含的设备目前children的 rtype 必然为 device
services[ResInfo]truenone服务列表一般一个房间会包含一个 group_light 的服务

SceneDetail

json
{
  "id": "string",
  "type": "string",
  "parent_id": "string",
  "parent_type": "string",
  "name": "string",
  "scene_type": 0,
  "is_active": 0,
  "picture_id": "string",
  "picture_type": "string",
  "picture_url": "string",
  "icon": "string",
  "background": "string",
  "sequence": 0,
  "colors": [
    0
  ]
}

属性

名称类型必选约束中文名说明
idstringtruenone场景IDnone
typestringtruenone资源类型此处固定为 scene
parent_idstringtruenone父节点none
parent_typestringtruenone父节点此处固定位 group_light
namestringtruenone名称none
scene_typeintegertruenone场景类型1图片场景, 2颜色场景
is_activeintegertruenone是否激活1已激活, 0否
picture_idstringtruenone图片图片场景需要用到的字段
picture_typestringtruenone资源类型此处固定为 file
picture_urlstringtruenone图片地址none
iconstringtruenoneBweeApp专用
backgroundstringtruenoneBweeApp专用
sequenceintegertruenoneBweeApp专用
colors[integer]truenoneBweeApp专用

SyncDetail

json
{
  "id": "string",
  "type": "string",
  "name": "string",
  "ability": 0,
  "on": 0,
  "brightness": 0,
  "source": 0,
  "mode": 0,
  "frequency": 0,
  "stop_action": 0,
  "color_config": 0,
  "color_config_1": [
    {
      "x": 0,
      "y": 0
    }
  ],
  "color_config_2": [
    {
      "x": 0,
      "y": 0
    }
  ],
  "color_config_3": [
    {
      "x": 0,
      "y": 0
    }
  ],
  "color_config_4": [
    {
      "x": 0,
      "y": 0
    }
  ],
  "area_id": "string",
  "area_name": "string"
}

属性

名称类型必选约束中文名说明
idstringtruenone同步器IDnone
typestringtruenone资源类型此处固定为sync
namestringtruenone名称none
abilityintegertruenone能力预留
onintegertruenone开关0关, 1开
brightnessintegertruenone亮度1 - 100
sourceintegertruenone数据源0 HDMI1, 1 HDMI2
modeintegertruenone模式0视频, 1音乐, 2游戏
frequencyintegertruenone强度0低, 1中, 2高, 3最高
stop_actionintegertruenone停止动作0保持, 2关灯
color_configintegertruenone当前配置勾选哪个 config, 1对应 color_config_1, 2对应 color_config_2, 依次类推
color_config_1[object]truenone配置1none
» xintegertruenoneX值none
» yintegertruenoneY值none
color_config_2[object]truenone配置2none
» xintegertruenoneX值none
» yintegertruenoneY值none
color_config_3[object]truenone配置3none
» xintegertruenoneX值none
» yintegertruenoneY值none
color_config_4[object]truenone配置4none
» xintegertruenoneX值none
» yintegertruenoneY值none
area_idstringtruenone区域ID与之关联的同步区域ID
area_namestringtruenone区域名称与之关联的同步区域名称