KNX总览
数据类型
以调光灯设备(light_dimmer)的亮度通道(brightness)为例:
| name | type | config |
|---|---|---|
| 调光灯 | light_dimmer | switch=5/1/1+5/2/1 |
| brightness=5/3/1+5/4/1:5.001 |
其中,5/3/1为brightness的控制地址,5/4/1为brightness的反馈地址,5.001为brightness的数据类型,以冒号作为分隔符。brightness通道的默认数据类型为5.001,故可省略数据类型,简写为brightness=5/3/1+5/4/1。
以空调设备(airtemp)的设置温度通道(settemp)为例:
| name | type | config |
|---|---|---|
| 空调 | aircon | settemp=1/1/2+1/2/2:9.001 |
其中,settemp的控制地址为1/1/2,反馈地址为1/2/2,默认数据类型为9.001(2 byte float),可简写为settemp=1/1/2+1/2/2。
若现场空调设置温度的数据类型为1byte,可写作settemp=1/1/2+1/2/2:5.005;若为signed 1byte(有符号整数,-128-127),可写作settemp=1/1/2+1/2/2:6.010。
数据的值
按键值
以按键设备(button)的第一个按键通道(button1)为例:
| name | type | config |
|---|---|---|
| 按键 | button | button0=6/1/1:5.005:8 |
| button1=6/1/2:1.001:1 |
其中,按键button0被按下后,将向KNX总线发送如下数据:
地址:6/1/1;数据类型:5.005(1byte);值:8。
按键button1被按下后,将向KNX总线发送如下数据:
地址:6/2/1;数据类型:1.001(1bit);值:1。
默认值
以窗帘设备(curtain)的开(open)、关(close)、停(stop)为例:
| name | type | config |
|---|---|---|
| 窗帘 | curtain | open=1/1/1:1.009:0 |
| close=1/1/1:1.009:1 | ||
| stop=1/1/2:1.001:0 |
其中,open和close的默认数据类1.009,open的默认值为0,close的默认值为1。stop的默认数据类型是1.001,默认值是0。
小技巧:
stop的默认数据类型和默认值可以省略,简写为 stop=1/1/2
open和close的地址和数据类型均一致,可以简写为 open|close=1/1/1
枚举值
以空调设备(aircon)的模式通道(mode)和风速通道(fan)为例:
| name | type | config |
|---|---|---|
| 空调 | aircon | switch=8/1/1+8/2/1 |
| mode=8/1/2+8/2/2:5.005:cool/0+heat/1+fan/2+dry/3+auto/4 | ||
| fan=8/1/3+8/2/3:5.005:low/0+mid/1+high/2+auto/3 |
其中,模式(mode)的控制地址为8/1/2,反馈地址为8/2/2,数据类型为5.005,制冷模式对应的值为0,制热模式对应的值为1,送风模式对应的值为2,除湿模式对应的值为3,自动模式对应的值为4;风速(fan)的控制地址为8/1/3,反馈地址为8/2/3,数据类型为5.005,低风对应的值为0,中风对应的值为1,高风对应的值为2,自动风对应的值为3。
地暖、新风、风扇
| name | type | config |
|---|---|---|
| 地暖 | floor_heat | switch=1/1/1+2/1/1 |
| config | settemp=1/4/1+2/4/1 | |
| config | value=1/5/1 | |
| 新风 | freshair | switch=1/1/1+2/1/1 |
| config | mode=1/2/1+2/2/1::fan/1+dry/2 | |
| config | fan=1/3/1+2/3/1::low/1+mid/2+ high/3 | |
| config | value=1/5/1 |
抽风机、除湿器、加湿器
| name | type | config |
|---|---|---|
| 抽风机 | exhauster | switch=1/1/1+2/1/1 |
| config | mode=1/2/1+2/1/1 | |
| config | fan=1/3/1+2/3/1 | |
| 除湿器 | dehumidifier | switch=1/1/1+2/1/1 |
| config | mode=1/2/1+2/1/1 | |
| config | fan=1/3/1+2/3/1 | |
| config | sethumidity=1/4/1+2/4/1 | |
| config | humidity=1/5/1+2/5/1 | |
| 加湿器 | humidifier | switch=1/1/1+2/1/1 |
| config | mode=1/2/1+2/2/1 | |
| config | fan=1/3/1+2/3/1 | |
| config | sethumidity=1/4/1+2/4/1 | |
| config | humidity=1/5/1+2/5/1 |
门、窗、晾衣架、插座、开关、按键、传感器
| name | type | config |
|---|---|---|
| 门 | door | switch=1/1/1+2/1/1 |
| 窗 | window | switch=1/1/1+2/1/1 |
| 晾衣架 | laundary_rack | up=1/1/1 |
| config | down=1/1/1 | |
| config | stop=1/1/2 | |
| 插座 | outlet | switch=1/1/1+1/1/2 |
| 开关 | switch | switch=1/1/1+1/1/2 |
| 按键 | button | button=1/1/1:1.001:1 |
| 传感器 | sensor | value=1/1/1:1.001:没人/0+有人/1 |
默认数据类型与默认值
| 通道 | 默认数据类型 | 默认值 |
|---|---|---|
| switch | 1.001 | 无,switch仅支持1.001 |
| brightness, color_temp | 5.001 | 无 |
| red, green, blue | 5.005 | 无 |
| open | 1.009 | 0 |
| close | 1.009 | 1 |
| stop | 1.001 | 0 |
| mode | 5.005 | cool/0+heat/1+fan/2+dry/3+auto/4+cycle/5+sleep/6 |
| fan | 5.005 | low/0+mid/1+high/2+auto/3+off/4+sleep/5 |
| settemp, temperature | 9.001 | 无 |
| sethumidity, humidity | 9.001 | 无 |
| up | 1.008 | 0 |
| down | 1.008 | 1 |
| play | 1.001 | 1 |
| pause | 1.001 | 0 |
| next | 1.001 | 1 |
| prev | 1.001 | 0 |
| button0 | 5.005 | 0 |
| button1 | 5.005 | 1 |
| button2 | 5.005 | 2 |
| button3 | 5.005 | 3 |