230 lines
6.4 KiB
JSON
230 lines
6.4 KiB
JSON
{
|
|
"version": "1.0",
|
|
"properties": [
|
|
{
|
|
"id": "time",
|
|
"name": "time",
|
|
"required": false,
|
|
"desc": "",
|
|
"mode": "rw",
|
|
"define": {
|
|
"type": "timestamp"
|
|
}
|
|
},
|
|
{
|
|
"id": "float",
|
|
"name": "float",
|
|
"required": false,
|
|
"desc": "",
|
|
"mode": "r",
|
|
"define": {
|
|
"type": "float",
|
|
"min": "-10",
|
|
"max": "10",
|
|
"start": "-5",
|
|
"step": "0.5",
|
|
"unit": "cm"
|
|
}
|
|
},
|
|
{
|
|
"id": "light_switch",
|
|
"name": "电灯开关",
|
|
"required": true,
|
|
"desc": "控制电灯开灭",
|
|
"mode": "rw",
|
|
"define": {
|
|
"type": "bool",
|
|
"mapping": {
|
|
"0": "关",
|
|
"1": "开"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"name": "颜色",
|
|
"desc": "灯光颜色",
|
|
"mode": "rw",
|
|
"define": {
|
|
"type": "enum",
|
|
"mapping": {
|
|
"0": "Red",
|
|
"1": "Green",
|
|
"2": "Blue"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "brightness",
|
|
"name": "亮度",
|
|
"required": false,
|
|
"desc": "灯光亮度",
|
|
"mode": "rw",
|
|
"define": {
|
|
"type": "int",
|
|
"min": "-9",
|
|
"max": "100",
|
|
"start": "-1",
|
|
"step": "5",
|
|
"unit": "cm"
|
|
}
|
|
},
|
|
{
|
|
"id": "name",
|
|
"name": "灯位置名称",
|
|
"desc": "灯位置名称:书房、客厅等",
|
|
"mode": "rw",
|
|
"required": true,
|
|
"define": {
|
|
"type": "string",
|
|
"min": "1",
|
|
"max": "64"
|
|
}
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"id": "all_function",
|
|
"name": "ALL_FUNCTION",
|
|
"required": false,
|
|
"desc": "",
|
|
"params": [
|
|
{
|
|
"id": "bool",
|
|
"name": "bool",
|
|
"desc": "",
|
|
"define": {
|
|
"type": "bool",
|
|
"mapping": {
|
|
"0": "关",
|
|
"1": "开"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "int",
|
|
"name": "int",
|
|
"desc": "",
|
|
"define": {
|
|
"type": "int",
|
|
"min": "1",
|
|
"max": "100",
|
|
"start": "1",
|
|
"step": "1",
|
|
"unit": "cm"
|
|
}
|
|
},
|
|
{
|
|
"id": "str",
|
|
"name": "str",
|
|
"desc": "",
|
|
"define": {
|
|
"type": "string",
|
|
"min": "1",
|
|
"max": "64"
|
|
}
|
|
},
|
|
{
|
|
"id": "float",
|
|
"name": "float",
|
|
"desc": "",
|
|
"define": {
|
|
"type": "float",
|
|
"min": "0",
|
|
"max": "100",
|
|
"start": "0",
|
|
"step": "1.5",
|
|
"unit": "cm"
|
|
}
|
|
},
|
|
{
|
|
"id": "enum1",
|
|
"name": "enum1",
|
|
"desc": "",
|
|
"define": {
|
|
"type": "enum",
|
|
"mapping": {
|
|
"0": "color",
|
|
"1": "door"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "time",
|
|
"name": "time",
|
|
"desc": "",
|
|
"define": {
|
|
"type": "timestamp"
|
|
}
|
|
}
|
|
],
|
|
"type": "alert"
|
|
},
|
|
{
|
|
"id": "status_report",
|
|
"name": "DeviceStatus",
|
|
"desc": "Report the device status我是中文",
|
|
"type": "info",
|
|
"required": true,
|
|
"params": [
|
|
{
|
|
"id": "status",
|
|
"name": "running_state",
|
|
"desc": "Report current device running state",
|
|
"define": {
|
|
"type": "bool",
|
|
"mapping": {
|
|
"0": "normal",
|
|
"1": "fault"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "message",
|
|
"name": "Message",
|
|
"desc": "Some extra message",
|
|
"define": {
|
|
"type": "string",
|
|
"min": "1",
|
|
"max": "64"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "hardware_fault",
|
|
"name": "Hardware_fault",
|
|
"required": false,
|
|
"desc": "Report hardware fault",
|
|
"params": [
|
|
{
|
|
"id": "name",
|
|
"name": "Name",
|
|
"desc": "Name like: memory,tf card, censors ...",
|
|
"define": {
|
|
"type": "string",
|
|
"min": "1",
|
|
"max": "64"
|
|
}
|
|
},
|
|
{
|
|
"id": "error_code",
|
|
"name": "Error_Code",
|
|
"desc": "Error code for fault",
|
|
"define": {
|
|
"type": "int",
|
|
"unit": "",
|
|
"step": "1",
|
|
"min": "0",
|
|
"max": "2000",
|
|
"start": "0"
|
|
}
|
|
}
|
|
],
|
|
"type": "fault"
|
|
}
|
|
],
|
|
"profile": {
|
|
"productID": "C0NEMO9UO0"
|
|
}
|
|
} |