From 5a6cce3c1f9b2f193f1d0abf456ebdb86a780cbd Mon Sep 17 00:00:00 2001 From: Waldek Date: Fri, 26 Mar 2021 09:52:21 +0100 Subject: [PATCH] remove source ID alias from lastheard and monitor --- monitor.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/monitor.py b/monitor.py index de5d33c..407299e 100644 --- a/monitor.py +++ b/monitor.py @@ -625,7 +625,7 @@ def process_message(_bmessage): opbfilter = get_opbf() if p[0] == 'GROUP VOICE' and p[2] != 'TX' and p[5] not in opbfilter: if p[1] == 'END': - 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_ID: {: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],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) if LASTHEARD_INC: if int(float(p[9]))> 2: @@ -640,18 +640,18 @@ def process_message(_bmessage): f.write("
\n") f.write(" .: Lastheard :. \n") f.write("\n") - f.write("\n") + f.write("\n") with open(LOG_PATH+"lastheard.log", "r") as textfile: for row in islice(reversed(list(csv.reader(textfile))),100): duration=row[1] dur=str(int(float(duration.strip()))) if row[10] not in my_list: if len(row) < 13: - hline="" + hline="" my_list.append(row[10]) n += 1 else: - hline="" + hline="" my_list.append(row[10]) n += 1 f.write(hline+"\n") @@ -661,9 +661,9 @@ def process_message(_bmessage): f.close() # End of Lastheard elif p[1] == 'START': - log_message = '{} {} {} SYS: {:8.8s} SRC: {:9.9s}; {:9.9s} TS: {} TGID: {:7.7s} {:17.17s} SUB: {:9.9s}; {:18.18s}'.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)) + log_message = '{} {} {} SYS: {:8.8s} SRC_ID: {:9.9s} TS: {} TGID: {:7.7s} {:17.17s} SUB: {:9.9s}; {:18.18s}'.format(_now[10:19], p[0][6:], p[1], p[3], p[5], p[7],p[8], alias_tgid(int(p[8]),talkgroup_ids), p[6], alias_short(int(p[6]), subscriber_ids)) elif p[1] == 'END WITHOUT MATCHING START': - log_message = '{} {} {} on SYSTEM {:8.8s}: SRC: {:9.9s}; {:9.9s} TS: {} TGID: {:7.7s} {:17.17s} SUB: {:9.9s}; {:18.18s}'.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)) + log_message = '{} {} {} on SYSTEM {:8.8s}: SRC_ID: {:9.9s} TS: {} TGID: {:7.7s} {:17.17s} SUB: {:9.9s}; {:18.18s}'.format(_now[10:19], p[0][6:], p[1], p[3], p[5], p[7], p[8],alias_tgid(int(p[8]),talkgroup_ids),p[6], alias_short(int(p[6]), subscriber_ids)) else: log_message = '{} UNKNOWN GROUP VOICE LOG MESSAGE'.format(_now)
DateTimeCallsign (DMR-Id)NameTG#TG NameTX (s)SlotSource IDSystem
DateTimeCallsign (DMR-Id)NameTG#TG NameTX (s)SlotSystem
"+row[0][:10]+""+row[0][11:16]+""+row[11]+" ("+row[10]+")"+row[8][2:]+""+row[9]+""+dur+""+row[7][2:]+""+row[6]+""+row[4]+"
"+row[0][:10]+""+row[0][11:16]+""+row[11]+" ("+row[10]+")"+row[8][2:]+""+row[9]+""+dur+""+row[7][2:]+""+row[4]+"
"+row[0][:10]+""+row[0][11:16]+""+row[11]+" ("+row[10]+")"+row[12]+""+row[8][2:]+""+row[9]+""+dur+""+row[7][2:]+""+row[6]+""+row[4]+"
"+row[0][:10]+""+row[0][11:16]+""+row[11]+" ("+row[10]+")"+row[12]+""+row[8][2:]+""+row[9]+""+dur+""+row[7][2:]+""+row[4]+"