From 368e422f28debbf20030c3f5780c780d345ab4da Mon Sep 17 00:00:00 2001 From: Michael Clemens Date: Mon, 7 Dec 2020 19:07:57 +0100 Subject: [PATCH] added more info to output --- pyBMNotify.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyBMNotify.py b/pyBMNotify.py index 9e5f9ab..6cad406 100644 --- a/pyBMNotify.py +++ b/pyBMNotify.py @@ -2,7 +2,7 @@ from socketIO_client import SocketIO import json import datetime as dt -tg = 31650 +tg = [31650, 98002] id = "" def on_connect(): @@ -18,9 +18,9 @@ def on_mqtt(*args): out = "" global id call = json.loads(args[0]['payload']) - if call["DestinationID"] == tg and id != call["_id"]: + if call["DestinationID"] in tg and id != call["_id"]: time = dt.datetime.utcfromtimestamp(call["Start"]).strftime("%Y/%m/%d %H:%M") - out += call["SourceCall"] + ' (' + call["SourceName"] + ') was active on ' + str(tg) + ' at ' + time + out += call["SourceCall"] + ' (' + call["SourceName"] + ') was active on ' + str(call["DestinationID"]) + ' (' + call["DestinationName"] + ') at ' + time print(out) #print(json.dumps(call,separators=(',',':'),sort_keys=True,indent=4)) id = call["_id"]