Add config option for UA timer to hblink.cfg
This commit is contained in:
parent
248453ddf3
commit
6fb3a86361
@ -122,11 +122,11 @@ def make_bridges(_rules):
|
|||||||
ts1 = True
|
ts1 = True
|
||||||
if e['SYSTEM'] == _confsystem and e['TS'] == 2:
|
if e['SYSTEM'] == _confsystem and e['TS'] == 2:
|
||||||
ts2 = True
|
ts2 = True
|
||||||
|
_tmout = CONFIG['SYSTEMS'][_confsystem]['DEFAULT_UA_TIMER']
|
||||||
if ts1 == False:
|
if ts1 == False:
|
||||||
_rules[_bridge].append({'SYSTEM': _confsystem, 'TS': 1, 'TGID': bytes_3(int(_bridge)),'ACTIVE': False,'TIMEOUT': 240,'TO_TYPE': 'ON','OFF': [],'ON': [bytes_3(int(_bridge)),],'RESET': [], 'TIMER': time()})
|
_rules[_bridge].append({'SYSTEM': _confsystem, 'TS': 1, 'TGID': bytes_3(int(_bridge)),'ACTIVE': False,'TIMEOUT': _tmout * 60,'TO_TYPE': 'ON','OFF': [],'ON': [bytes_3(int(_bridge)),],'RESET': [], 'TIMER': time()})
|
||||||
if ts2 == False:
|
if ts2 == False:
|
||||||
_rules[_bridge].append({'SYSTEM': _confsystem, 'TS': 2, 'TGID': bytes_3(int(_bridge)),'ACTIVE': False,'TIMEOUT': 240,'TO_TYPE': 'ON','OFF': [],'ON': [bytes_3(int(_bridge)),],'RESET': [], 'TIMER': time()})
|
_rules[_bridge].append({'SYSTEM': _confsystem, 'TS': 2, 'TGID': bytes_3(int(_bridge)),'ACTIVE': False,'TIMEOUT': _tmout * 60,'TO_TYPE': 'ON','OFF': [],'ON': [bytes_3(int(_bridge)),],'RESET': [], 'TIMER': time()})
|
||||||
|
|
||||||
return _rules
|
return _rules
|
||||||
|
|
||||||
|
@ -259,7 +259,9 @@ def build_config(_config_file):
|
|||||||
'REG_ACL': config.get(section, 'REG_ACL'),
|
'REG_ACL': config.get(section, 'REG_ACL'),
|
||||||
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
'SUB_ACL': config.get(section, 'SUB_ACL'),
|
||||||
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
|
'TG1_ACL': config.get(section, 'TGID_TS1_ACL'),
|
||||||
'TG2_ACL': config.get(section, 'TGID_TS2_ACL')
|
'TG2_ACL': config.get(section, 'TGID_TS2_ACL'),
|
||||||
|
'DEFAULT_UA_TIMER': config.getint(section, 'DEFAULT_UA_TIMER'),
|
||||||
|
'SINGLE_MODE': config.getboolean(section, 'SINGLE_MODE')
|
||||||
}})
|
}})
|
||||||
CONFIG['SYSTEMS'][section].update({'PEERS': {}})
|
CONFIG['SYSTEMS'][section].update({'PEERS': {}})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user