Hallo Basti,
ich habe mal quick and dirty einen "useBosMon"-Zweig gebaut:
Aktuell verzweifel ich gerade am Thema User/Passwort für den Aufruf...Code:if useBosMon: #only if BosMon is active log("POC512 to BosMon") try: #BosMon-Schnittstelle erwartet als RIC-Sub/Funktion a-d bosmon_poc_sub = poc_sub.replace("1", "a").replace("2", "b").replace("3", "c").replace("4", "d") params = urllib.urlencode({'type':'pocsag', 'address':poc_id, 'flags':'0', 'function':bosmon_poc_sub, 'message':poc_text}) headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"} httprequest = httplib.HTTPConnection(bosmon_server, bosmon_port) # ToDo: "pocsag" durch bosmon_kanal ersetzen httprequest.request("POST", "/telegramin/pocsag/input.xml", params, headers) httpresponse = httprequest.getresponse() if str(httpresponse.status) == "200": #Check HTTP Response an print a Log or Error log("BosMon response: "+str(httpresponse.status)+" - "+str(httpresponse.reason)) else: log("BosMon response: "+str(httpresponse.status)+" - "+str(httpresponse.reason),"error") except: log("POCSAG512 to BosMon failed","error")
Grüße
Jens




Zitieren