The openhab.cfg file
在文件中找到 knx binding 节,配置knx 通讯 如下:
################################ KNX Binding ##########################################
# KNX gateway IP address (optional, if serialPort or connection type 'ROUTER' is specified)
knx:ip=192.168.131.223
# KNX IP connection type. Could be either TUNNEL or ROUTER (optional, defaults to TUNNEL)
knx:type=TUNNEL
# KNX gateway port (optional, defaults to 3671)
knx:port=3671
# KNX gateway IP address (optional, if serialPort or connection type 'ROUTER' is specified)
knx:ip=192.168.131.223
# KNX IP connection type. Could be either TUNNEL or ROUTER (optional, defaults to TUNNEL)
knx:type=TUNNEL
# KNX gateway port (optional, defaults to 3671)
knx:port=3671
- The easiest way of configuring a KNX binding is by connecting in ROUTER mode. To do so, enable this: knx:type=ROUTER . If you cannot use the ROUTER mode, set it to TUNNEL, but you must then configure the IP: knx:ip=<IP of the KNX-IP module>
The yourname.items file
配置工程中条目清单,格式如下:
itemtype itemname ["labeltext"] [<iconname>] [(group1, group2, ...)] {knx=""}
类型,名称,显示文字,图标,分组,组地址
目前支持的itemType有,
1.Color 可用于LED 灯光
2.Contact 用于门,窗等的传感器返回 open ,close
3.DateTime
4.Dimmer 用于调光开关switch (ON/OFF),接受一个百分比的值
5.Number 用于decimal 值类型的传感器象温度,亮度
6.Rollershutter
7.String
8.Switch ON,OFF 普通开关
The next thing we must do is to tell openHAB which items we have. To do so, go to the "configurations/items" directory and create a new file called thenameyouwish.items. You