mirror of
				https://github.com/ShaYmez/HBmonitor.git
				synced 2025-11-04 05:20:22 -05:00 
			
		
		
		
	Update monitor.py
This commit is contained in:
		
							parent
							
								
									71ae16b921
								
							
						
					
					
						commit
						8dd2e30627
					
				@ -597,12 +597,12 @@ def process_message(_bmessage):
 | 
				
			|||||||
        p = _message[1:].split(",")
 | 
					        p = _message[1:].split(",")
 | 
				
			||||||
        rts_update(p)
 | 
					        rts_update(p)
 | 
				
			||||||
        if p[0] == 'GROUP VOICE' and p[2] != 'TX':
 | 
					        if p[0] == 'GROUP VOICE' and p[2] != 'TX':
 | 
				
			||||||
            opbfilter = get_opbf()
 | 
					            if p[1] == 'END':
 | 
				
			||||||
            if p[1] == 'END' and p[5] not in opbfilter:
 | 
					 | 
				
			||||||
                log_message = '{} {} {}   SYS: {:8.8s} SRC: {:9.9s}; {:9.9s} TS: {} TGID: {:7.7s} {:17.17s} SUB: {:9.9s}; {:18.18s} Time: {}s '.format(_now[10:19], p[0][6:], p[1], p[3], p[5], alias_call(int(p[5]), subscriber_ids), p[7],p[8],alias_tgid(int(p[8]),talkgroup_ids), p[6], alias_short(int(p[6]), subscriber_ids), int(float(p[9])))
 | 
					                log_message = '{} {} {}   SYS: {:8.8s} SRC: {:9.9s}; {:9.9s} TS: {} TGID: {:7.7s} {:17.17s} SUB: {:9.9s}; {:18.18s} Time: {}s '.format(_now[10:19], p[0][6:], p[1], p[3], p[5], alias_call(int(p[5]), subscriber_ids), p[7],p[8],alias_tgid(int(p[8]),talkgroup_ids), p[6], alias_short(int(p[6]), subscriber_ids), int(float(p[9])))
 | 
				
			||||||
                # log only to file if system is NOT OpenBridge event (not logging open bridge system, name depends on your OB definitions) AND transmit time is LONGER as 2sec (make sense for very short transmits)
 | 
					                # log only to file if system is NOT OpenBridge event (not logging open bridge system, name depends on your OB definitions) AND transmit time is LONGER as 2sec (make sense for very short transmits)
 | 
				
			||||||
                if LASTHEARD_INC:
 | 
					                if LASTHEARD_INC:
 | 
				
			||||||
                   if int(float(p[9]))> 2: 
 | 
					                   opbfilter = get_opbf()
 | 
				
			||||||
 | 
					                   if int(float(p[9]))> 2 and p[5] not in opbfilter: 
 | 
				
			||||||
                      log_lh_message = '{},{},{},{},{},{},{},TS{},TG{},{},{},{}'.format(_now, p[9], p[0], p[1], p[3], p[5], alias_call(int(p[5]), subscriber_ids), p[7], p[8],alias_tgid(int(p[8]),talkgroup_ids),p[6], alias_short(int(p[6]), subscriber_ids))
 | 
					                      log_lh_message = '{},{},{},{},{},{},{},TS{},TG{},{},{},{}'.format(_now, p[9], p[0], p[1], p[3], p[5], alias_call(int(p[5]), subscriber_ids), p[7], p[8],alias_tgid(int(p[8]),talkgroup_ids),p[6], alias_short(int(p[6]), subscriber_ids))
 | 
				
			||||||
                      lh_logfile = open(LOG_PATH+"lastheard.log", "a")
 | 
					                      lh_logfile = open(LOG_PATH+"lastheard.log", "a")
 | 
				
			||||||
                      lh_logfile.write(log_lh_message + '\n')
 | 
					                      lh_logfile.write(log_lh_message + '\n')
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user