Files
JBao_Temp_Humi_Fan_FW/dp_definition.json
T
wuchuyuan 5cc7e9dbd6 接入温湿度风扇产品固件(仲裁/条件/定时/显示),并补齐规格书与外设驱动
新增 usr_app 产品逻辑:手动>定时>条件仲裁、条件控温湿、定时任务、数码管显示、
按键/LED、风扇档位、NVM 掉电恢复、配对与开关机,上电按规格恢复上次状态。
新增 usr_periph:AHT20、CT1642、板级引脚与硬件封装;见宝协议 cond_config
改为 7 字节编解码,并接入产品 DP。
补充《温湿度风扇_固件需求规格书》,工程加入对应源文件。
.gitignore 忽略 WorkBuddy/Cursor 本地会话
2026-08-31 15:17:27 +08:00

384 lines
8.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"product": {
"name": "温湿度风扇",
"code": "PRCBR3",
"type": "CBR3",
"protocol": "V1.0.0"
},
"dps": [
{
"id": 0,
"display_name": "开关",
"key": "power",
"kind": "normal",
"type": "bool",
"len": 1,
"scale": 1.0,
"dir": "rw",
"description": "设备总开关",
"values": {
"0": "关",
"1": "开"
}
},
{
"id": 1,
"display_name": "模式",
"key": "mode",
"kind": "normal",
"type": "enum",
"len": 1,
"scale": 1.0,
"dir": "rw",
"description": "通风模式:1挡,连续运行25分钟,停止5分钟,循环执行;\n强力模式: 3挡,连续运行15分钟后停止;",
"values": {
"0": "关闭模式",
"1": "通风模式",
"2": "强力模式"
}
},
{
"id": 2,
"display_name": "风速挡位",
"key": "fan_gear",
"kind": "normal",
"type": "enum",
"len": 1,
"scale": 1.0,
"dir": "rw",
"description": "一档35%\n二档65%\n三档100%",
"values": {
"0": "关闭风扇",
"1": "1档风速",
"2": "2档风速",
"3": "3档风速"
}
},
{
"id": 3,
"display_name": "当前温度",
"key": "current_temp",
"kind": "normal",
"type": "float",
"len": 2,
"scale": 0.1,
"dir": "ro",
"description": "单位:℃(float 类型,链路传 uint16",
"values": {}
},
{
"id": 4,
"display_name": "当前湿度",
"key": "current_humi",
"kind": "normal",
"type": "uint8",
"len": 1,
"scale": 1.0,
"dir": "ro",
"description": "单位:%",
"values": {}
},
{
"id": 5,
"display_name": "条件使能",
"key": "cond_en",
"kind": "normal",
"type": "bool",
"len": 1,
"scale": 1.0,
"dir": "rw",
"description": "一键启动/禁用所有条件配置",
"values": {
"0": "关",
"1": "开"
}
},
{
"id": 6,
"display_name": "条件配置1",
"key": "cond_config1",
"kind": "normal",
"type": "raw",
"len": 7,
"scale": 1.0,
"dir": "rw",
"description": "温度阈值:有符号int16大端,值=℃×10Byte0=使能;Byte1-2=温度阈值;Byte3=湿度阈值;Byte4=持续分钟(0=立即)Byte5=动作模式(0/1/2)Byte6=Bit7-5温度比较, Bit4-2湿度比较, Bit1-0保留",
"values": {}
},
{
"id": 7,
"display_name": "条件配置2",
"key": "cond_config2",
"kind": "normal",
"type": "raw",
"len": 7,
"scale": 1.0,
"dir": "rw",
"description": "同上(7字节)",
"values": {}
},
{
"id": 8,
"display_name": "条件配置3",
"key": "cond_config3",
"kind": "normal",
"type": "raw",
"len": 7,
"scale": 1.0,
"dir": "rw",
"description": "同上(7字节)",
"values": {}
},
{
"id": 9,
"display_name": "条件配置4",
"key": "cond_config4",
"kind": "normal",
"type": "raw",
"len": 7,
"scale": 1.0,
"dir": "rw",
"description": "同上(7字节)",
"values": {}
},
{
"id": 10,
"display_name": "条件配置5",
"key": "cond_config5",
"kind": "normal",
"type": "raw",
"len": 7,
"scale": 1.0,
"dir": "rw",
"description": "同上(7字节)",
"values": {}
},
{
"id": 11,
"display_name": "条件配置6",
"key": "cond_config6",
"kind": "normal",
"type": "raw",
"len": 7,
"scale": 1.0,
"dir": "rw",
"description": "同上(7字节)",
"values": {}
},
{
"id": 12,
"display_name": "条件配置7",
"key": "cond_config7",
"kind": "normal",
"type": "raw",
"len": 7,
"scale": 1.0,
"dir": "rw",
"description": "同上(7字节)",
"values": {}
},
{
"id": 13,
"display_name": "定时使能",
"key": "time_en",
"kind": "normal",
"type": "bool",
"len": 1,
"scale": 1.0,
"dir": "rw",
"description": "一键启动/禁用所有定时配置",
"values": {
"0": "关",
"1": "开"
}
},
{
"id": 14,
"display_name": "定时配置1",
"key": "time_config1",
"kind": "normal",
"type": "raw",
"len": 8,
"scale": 1.0,
"dir": "rw",
"description": "定时类型\n0=单次,1=每天,2=每周指定星期\n星期位图\nBit0 = 周一\nBit1 = 周二\nBit2 = 周三\nBit3 = 周四\nBit4 = 周五\nBit5 = 周六\nBit6 = 周日\nBit7 = Reserved",
"values": {}
},
{
"id": 15,
"display_name": "定时配置2",
"key": "time_config2",
"kind": "normal",
"type": "raw",
"len": 8,
"scale": 1.0,
"dir": "rw",
"description": "同上",
"values": {}
},
{
"id": 16,
"display_name": "定时配置3",
"key": "time_config3",
"kind": "normal",
"type": "raw",
"len": 8,
"scale": 1.0,
"dir": "rw",
"description": "同上",
"values": {}
},
{
"id": 17,
"display_name": "定时配置4",
"key": "time_config4",
"kind": "normal",
"type": "raw",
"len": 8,
"scale": 1.0,
"dir": "rw",
"description": "同上",
"values": {}
},
{
"id": 18,
"display_name": "定时配置5",
"key": "time_config5",
"kind": "normal",
"type": "raw",
"len": 8,
"scale": 1.0,
"dir": "rw",
"description": "同上",
"values": {}
},
{
"id": 19,
"display_name": "定时配置6",
"key": "time_config6",
"kind": "normal",
"type": "raw",
"len": 8,
"scale": 1.0,
"dir": "rw",
"description": "同上",
"values": {}
},
{
"id": 20,
"display_name": "定时配置7",
"key": "time_config7",
"kind": "normal",
"type": "raw",
"len": 8,
"scale": 1.0,
"dir": "rw",
"description": "同上",
"values": {}
},
{
"id": 21,
"display_name": "设备故障使能",
"key": "fault_en",
"kind": "normal",
"type": "uint8",
"len": 1,
"scale": 1.0,
"dir": "rw",
"description": "预留,后期可以对某个故障进行使能和禁用",
"values": {}
},
{
"id": 22,
"display_name": "设备故障",
"key": "fault_code",
"kind": "fault",
"type": "uint8",
"len": 1,
"scale": 1.0,
"dir": "ro",
"description": "故障码",
"values": {
"0": "无故障",
"1": "温湿度异常",
"2": "设备故障"
},
"level": 2
},
{
"id": 23,
"display_name": "设备告警使能",
"key": "alarm_en",
"kind": "normal",
"type": "uint8",
"len": 1,
"scale": 1.0,
"dir": "rw",
"description": "预留,后期可以对某个告警进行使能和禁用",
"values": {}
},
{
"id": 24,
"display_name": "设备告警",
"key": "alarm_code",
"kind": "alarm",
"type": "uint8",
"len": 1,
"scale": 1.0,
"dir": "ro",
"description": "预留告警DP",
"values": {},
"level": 1
},
{
"id": 25,
"display_name": "恢复出厂设置",
"key": "factory_reset",
"kind": "normal",
"type": "bool",
"len": 1,
"scale": 1.0,
"dir": "wo",
"description": "写 1 触发",
"values": {
"1": "触发"
}
},
{
"id": 26,
"display_name": "预留DP1",
"key": "reserva_dp1",
"kind": "normal",
"type": "uint32",
"len": 4,
"scale": 1.0,
"dir": "rw",
"description": "预留",
"values": {}
},
{
"id": 27,
"display_name": "预留DP2",
"key": "reserva_dp2",
"kind": "normal",
"type": "uint32",
"len": 4,
"scale": 1.0,
"dir": "rw",
"description": "预留",
"values": {}
},
{
"id": 28,
"display_name": "预留DP3",
"key": "reserva_dp3",
"kind": "normal",
"type": "uint32",
"len": 4,
"scale": 1.0,
"dir": "rw",
"description": "预留",
"values": {}
}
]
}