@ -169,7 +169,7 @@ def make_single_bridge(_tgid,_sourcesystem,_slot,_tmout):
BRIDGES [ _tgid_s ] . append ( { ' SYSTEM ' : _system , ' TS ' : 1 , ' TGID ' : _tgid , ' ACTIVE ' : True , ' TIMEOUT ' : _tmout * 60 , ' TO_TYPE ' : ' ON ' , ' OFF ' : [ ] , ' ON ' : [ _tgid , ] , ' RESET ' : [ ] , ' TIMER ' : time ( ) + ( _tmout * 60 ) } )
BRIDGES [ _tgid_s ] . append ( { ' SYSTEM ' : _system , ' TS ' : 2 , ' TGID ' : _tgid , ' ACTIVE ' : False , ' TIMEOUT ' : _tmout * 60 , ' TO_TYPE ' : ' ON ' , ' OFF ' : [ ] , ' ON ' : [ _tgid , ] , ' RESET ' : [ ] , ' TIMER ' : time ( ) } )
else :
BRIDGES [ _tgid_s ] . append ( { ' SYSTEM ' : _system , ' TS ' : 2 , ' TGID ' : _tgid , ' ACTIVE ' : True , ' TIMEOUT ' : _tmout * 60 , ' TO_TYPE ' : ' ON ' , ' OFF ' : [ ] , ' ON ' : [ _tgid , ] , ' RESET ' : [ ] , ' TIMER ' : time ( ) + _tmout * 60 } )
BRIDGES [ _tgid_s ] . append ( { ' SYSTEM ' : _system , ' TS ' : 2 , ' TGID ' : _tgid , ' ACTIVE ' : True , ' TIMEOUT ' : _tmout * 60 , ' TO_TYPE ' : ' ON ' , ' OFF ' : [ ] , ' ON ' : [ _tgid , ] , ' RESET ' : [ ] , ' TIMER ' : time ( ) + ( _tmout * 60 ) } )
BRIDGES [ _tgid_s ] . append ( { ' SYSTEM ' : _system , ' TS ' : 1 , ' TGID ' : _tgid , ' ACTIVE ' : False , ' TIMEOUT ' : _tmout * 60 , ' TO_TYPE ' : ' ON ' , ' OFF ' : [ ] , ' ON ' : [ _tgid , ] , ' RESET ' : [ ] , ' TIMER ' : time ( ) } )
else :
BRIDGES [ _tgid_s ] . append ( { ' SYSTEM ' : _system , ' TS ' : 1 , ' TGID ' : _tgid , ' ACTIVE ' : False , ' TIMEOUT ' : _tmout * 60 , ' TO_TYPE ' : ' ON ' , ' OFF ' : [ ] , ' ON ' : [ _tgid , ] , ' RESET ' : [ ] , ' TIMER ' : time ( ) } )
@ -1183,8 +1183,8 @@ class routerHBP(HBSYSTEM):
#Create default bridge for unknown TG
if int_id ( _dst_id ) > 10 and ( str ( int_id ( _dst_id ) ) not in BRIDGES ) :
logger . info ( ' ( %s ) Bridge for TG %s does not exist. Creating as User Activated ' , self . _system , int_id ( _dst_id ) )
make_single_bridge ( _dst_id , self . _system , _slot , CONFIG [ ' SYSTEMS ' ] [ system] [ ' DEFAULT_UA_TIMER ' ] )
logger . info ( ' ( %s ) Bridge for TG %s does not exist. Creating as User Activated . Timeout %s ' , self . _system , int_id ( _dst_id ) , CONFIG [ ' SYSTEMS ' ] [ self . _system ] [ ' DEFAULT_UA_TIMER ' ] )
make_single_bridge ( _dst_id , self . _system , _slot , CONFIG [ ' SYSTEMS ' ] [ self . _ system] [ ' DEFAULT_UA_TIMER ' ] )
for _bridge in BRIDGES :
for _system in BRIDGES [ _bridge ] :
@ -1560,6 +1560,7 @@ if __name__ == '__main__':
if CONFIG [ ' SYSTEMS ' ] [ system ] [ ' MODE ' ] != ' MASTER ' :
continue
_tmout = CONFIG [ ' SYSTEMS ' ] [ system ] [ ' DEFAULT_UA_TIMER ' ]
logger . debug ( ' System %s tmout %s ' , system , _tmout )
ts1 = [ ]
ts2 = [ ]
if CONFIG [ ' SYSTEMS ' ] [ system ] [ ' TS1_STATIC ' ] :