-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.py
134 lines (106 loc) · 3.58 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Adjust this file to your setup
# file encodings
IN_ENCODING = r"utf8"
OUT_ENCODING = r"utf8"
# knx1 openhab items file(s)
ITEMS_FILES = "../items/knx1/myhome.items , \
../items/knx1/heating.items, \
../items/knx1/window.items, \
../items/knx1/xbmc.items"
# converted item files will be created in this directory
ITEM_RESULT_DIR = r"./result/items/"
# out file names
THINGS_FILE = r"./result/things/knx.things"
THINGS_UNUSED_FILE = "unused.things"
ITEMS_UNUSED_FILE = "unused.items"
ITEMS_UNUSED_CONTROLS_FILE = "unused-control.items"
# files containing all information read
DEBUG_KNX = "knx.txt"
DEBUG_OH = "oh.txt"
# knxproj files (optional), unzip your knxproj file
# comment out this lines if you do not have/want to read ETS config
# multiple files can be read, separated by spaces
PROJECTFILES = "./knxproj/P-02A7/0.xml"
# ## specify device types by vendor name (must be part of the *ProductRefId*)
# If unsure: run the script and look into the DEBUG_KNX file
# These are the primary addresses which will be used for read/write
ACTORS = "AKS, AKD, JAL, M-0051_H-hp, QUAD,"
# These will be added as -control items
CONTROLS = "TSM, -BE, ZN1IO, ZN1VI, LED,"
# These will ignored, uncomment to use
# IGNORE_DEVICES = "LED,"
# As of now all unknown GAs are switches
# FIXME: this could be improved!
UNUSED_TYPE = 'Switch'
# Suffix for generic control items
CONTROL_SUFFIX = '_Control'
# If defined, only these controls will be added to the items and things file.
# If undefined all possible controls will be created, this may be a good start
# but may flood your system. You may use regex to match.
# WANTED_CONTROLS = "Switch_Szene, \
# Licht_EG_Gaderobe, \
# Switch_Beschattung, \
# Rolladen_.*_Switch, \
# Licht_ALL"
# If defined, ``autoupdate="true"`` will be added to all matching items.
# You may use regex to match.
# AUTOUPDATE_TRUE = "Alarm_"
# If defined, ``autoupdate="false"`` will be added to all matching items.
# You may use regex to match.
# AUTOUPDATE_FALSE = "Licht_ALL"
# values in <...> will be replaced. So do not change <...> values.
CHANNEL = ' channel="knx:device:bridge:<generic>:<name>" '
# IMPORTANT: adjust your IP (KNX and local) below
THING_HEADER = '''Bridge knx:ip:bridge [
ipAddress="192.168.x.xxx",
portNumber=3671,
localIp="192.168.x.xxx",
type="TUNNEL",
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=1,
localSourceAddr="0.0.0"
] {'''
# Generic device name
DEVICE_GENERIC = "generic"
DEVICE = '''
Thing device <generic> [
// device ID: <device_id>
// <building>
address="<address>",
fetch=false,
pingInterval=600,
readInterval=0
] {'''
DEVICE_EMPTY = '''
Thing device <generic> [
] {'''
CHANNELS = (
"Switch",
"Rollershutter",
"Contact",
"Number",
"Dimmer",
"String",
"DateTime",
"Color", # supported since Dec 2018, so check your OH version if needed
)
# only one line supported, if you have more than one you need to implement it.
ETS_LINE_PREFIX = "1.1."
# ETS 4.x xml tags, may depend on ETS version
FIND_BUILDINGS = 'Buildings' # Gebaeude
FIND_BUILDINGPART = 'BuildingPart'
# maybe use those for ETS 5.x
# FIND_BUILDINGS = 'Locations' # Gebaeude
# FIND_BUILDINGPART = 'Space'
# ETS xml tags, usually no need to change those
FIND_TRADES = 'Trades' # Gewerke
FIND_TRADEPART = 'Trade'
FIND_DEVICEREF = 'DeviceInstanceRef'
FIND_DEVICE = 'DeviceInstance'
FIND_COMREF = 'ComObjectInstanceRef'
FIND_CONNECTOR = 'Connectors'
FIND_SEND = 'Send'
FIND_RECEIVE = 'Receive'
FIND_GA = 'GroupAddress'