From 4cffe7aeb8728e73bf3da5114d1200eac1db8151 Mon Sep 17 00:00:00 2001 From: MrMurdog Date: Wed, 17 Jan 2024 09:40:21 +0100 Subject: [PATCH] Versuch FMS fix --- plugin/bosmon.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/plugin/bosmon.py b/plugin/bosmon.py index 0d63e86..ec01cb2 100644 --- a/plugin/bosmon.py +++ b/plugin/bosmon.py @@ -96,7 +96,7 @@ class BoswatchPlugin(PluginBase): 'Authorization': encode(BM_user, BM_passwd) } - response = requests.request("POST", url, headers=headers, data=payload) + requests.request("POST", url, headers=headers, data=payload) def _BosmonRequest_FMS(self, BM_hostname, BM_port, BM_user, BM_passwd, BM_channel, get_FMS, get_status, get_direction, get_tacticalInfo): @@ -109,9 +109,23 @@ class BoswatchPlugin(PluginBase): 'Authorization': encode(BM_user, BM_passwd) } - response = requests.request("POST", url, headers=headers, data=payload) + requests.request("POST", url, headers=headers, data=payload) - def _getInfo(get_tacticalInfo, get_direction): + + + def _BosmonRequest_Zvei(self, BM_hostname, BM_port, BM_user, BM_passwd, BM_channel, get_zvei_adress): + + url = 'http://'+BM_hostname+':'+BM_port+'/telegramin/'+BM_channel+'/input.xml' + + payload = 'type=pocsag&address='+get_zvei_adress+'&flags=0' + headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + 'Authorization': encode(BM_user, BM_passwd) + } + + requests.request("POST", url, headers=headers, data=payload) + + def _getInfo(get_tacticalInfo, get_direction): # BosMon-Telegramin expected assembly group, direction and tsi in one field # structure (binary as hex in base10): @@ -131,16 +145,4 @@ class BoswatchPlugin(PluginBase): info = info + 4 # + b0100 # "I" is nothing to do + b0000 - return info - - def _BosmonRequest_Zvei(self, BM_hostname, BM_port, BM_user, BM_passwd, BM_channel, get_zvei_adress): - - url = 'http://'+BM_hostname+':'+BM_port+'/telegramin/'+BM_channel+'/input.xml' - - payload = 'type=pocsag&address='+get_zvei_adress+'&flags=0' - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Authorization': encode(BM_user, BM_passwd) - } - - response = requests.request("POST", url, headers=headers, data=payload) \ No newline at end of file + return info \ No newline at end of file