mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-21 06:13:39 +00:00
little changes
This commit is contained in:
parent
e2b4ef82c9
commit
7731031a15
5 changed files with 14 additions and 16 deletions
|
|
@ -8,7 +8,7 @@ import httplib #for the HTTP request
|
|||
import urllib #for the HTTP request with parameters
|
||||
import base64 #for the HTTP request with User/Password
|
||||
|
||||
def run(typ,frequenz,daten):
|
||||
def run(typ,freq,data):
|
||||
logging.debug("BosMon Plugin called")
|
||||
logging.debug(" - typ: " +typ)
|
||||
try:
|
||||
|
|
@ -33,12 +33,12 @@ def run(typ,frequenz,daten):
|
|||
logging.debug("Start POC to BosMon")
|
||||
try:
|
||||
#Defined data structure:
|
||||
# daten["ric"]
|
||||
# daten["function"]
|
||||
# daten["msg"]
|
||||
# data["ric"]
|
||||
# data["function"]
|
||||
# data["msg"]
|
||||
#BosMon-Telegramin expected "a-d" as RIC-sub/function
|
||||
daten["function"] = daten["function"].replace("1", "a").replace("2", "b").replace("3", "c").replace("4", "d")
|
||||
params = urllib.urlencode({'type':'pocsag', 'address':daten["ric"], 'flags':'0', 'function':daten["function"], 'message':daten["msg"]})
|
||||
data["function"] = data["function"].replace("1", "a").replace("2", "b").replace("3", "c").replace("4", "d")
|
||||
params = urllib.urlencode({'type':'pocsag', 'address':data["ric"], 'flags':'0', 'function':data["function"], 'message':data["msg"]})
|
||||
logging.debug(" - Params:" +params)
|
||||
headers = {}
|
||||
headers['Content-type'] = "application/x-www-form-urlencoded"
|
||||
|
|
|
|||
|
|
@ -5,10 +5,8 @@ import logging # Global logger
|
|||
import globals # Global variables
|
||||
|
||||
def run(typ,freq,data):
|
||||
logging.debug("Strat Plugin: template")
|
||||
logging.debug("template Plugin called")
|
||||
try:
|
||||
logging.info("ZVEI: %s wurde auf %s empfangen!", data["zvei"],freq)
|
||||
logging.debug("try 5/0")
|
||||
test = 5/0
|
||||
except:
|
||||
logging.exception("Error in Template Plugin")
|
||||
Loading…
Add table
Add a link
Reference in a new issue