Schrolli91 / BOSWatch

Python Script to process input data from rtl_fm and multimon-NG - multiple Plugin support
https://bwcc.boswatch.de
GNU General Public License v2.0
132 stars 60 forks source link

NMA Plugin Konfiguration #358

Closed MrCoopa closed 6 years ago

MrCoopa commented 6 years ago

Aktuellste BosWatch Version (2.3) master

NotifyMyAndroid sendet keine Daten an den API key, respektive ans Handy.

10.03.2018 13:02:30 - notifyMyAndroid [ERROR ] cannot read pynma response 10.03.2018 13:02:30 - notifyMyAndroid [DEBUG ] cannot read pynma response Traceback (most recent call last): File "/opt/boswatch/plugins/notifyMyAndroid/notifyMyAndroid.py", line 52, in checkResponse if str(response[APIKey]['code']) == "200": #Check HTTP Response an print a Log or Error KeyError: ''

10.03.2018 12:55:29 - boswatch [DEBUG ] reading config file 10.03.2018 12:55:29 - configHandler [DEBUG ] read [BOSWatch] from config fil e 10.03.2018 12:55:29 - configHandler [DEBUG ] - loglevel = 10 10.03.2018 12:55:29 - configHandler [DEBUG ] - backupcount = 7 10.03.2018 12:55:29 - configHandler [DEBUG ] - processalarmasync = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - useregexfilter = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - doublefilter_ignore_entries = 10 10.03.2018 12:55:29 - configHandler [DEBUG ] - doublefilter_ignore_time = 5 10.03.2018 12:55:29 - configHandler [DEBUG ] - doublefilter_check_msg = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - writemultimonraw = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] read [multicastAlarm] from conf ig file 10.03.2018 12:55:29 - configHandler [DEBUG ] - multicastalarm = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - multicastalarm_ignore_time = 15 10.03.2018 12:55:29 - configHandler [DEBUG ] - multicastalarm_delimiter_ric = 10.03.2018 12:55:29 - configHandler [DEBUG ] - multicastalarm_ric = 10.03.2018 12:55:29 - configHandler [DEBUG ] read [Filters] from config file 10.03.2018 12:55:29 - configHandler [DEBUG ] - alarm = ZVEI;zvei;notifyMyAndroid;8X035000;5X[0-9]{3} 10.03.2018 12:55:29 - configHandler [DEBUG ] read [FMS] from config file 10.03.2018 12:55:29 - configHandler [DEBUG ] - iddescribed = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - checkcrc = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] read [ZVEI] from config file 10.03.2018 12:55:29 - configHandler [DEBUG ] - iddescribed = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] read [POC] from config file 10.03.2018 12:55:29 - configHandler [DEBUG ] - allow_ric = 10.03.2018 12:55:29 - configHandler [DEBUG ] - deny_ric = 10.03.2018 12:55:29 - configHandler [DEBUG ] - filter_range_start = 0000000 10.03.2018 12:55:29 - configHandler [DEBUG ] - filter_range_end = 9999999 10.03.2018 12:55:29 - configHandler [DEBUG ] - iddescribed = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - rica = Feuer 10.03.2018 12:55:29 - configHandler [DEBUG ] - ricb = TH 10.03.2018 12:55:29 - configHandler [DEBUG ] - ricc = AGT 10.03.2018 12:55:29 - configHandler [DEBUG ] - ricd = Unwetter 10.03.2018 12:55:29 - configHandler [DEBUG ] - netident_ric = 0174760, 1398 098 10.03.2018 12:55:29 - configHandler [DEBUG ] - netident_history = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] read [Plugins] from config file 10.03.2018 12:55:29 - configHandler [DEBUG ] - mysql = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - httprequest = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - email = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - bosmon = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - firemergency = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - jsonsocket = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - notifymyandroid = 1 10.03.2018 12:55:29 - configHandler [DEBUG ] - sms = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - sms77 = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - ffagent = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - pushover = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - telegram = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - yowsup = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] - template = 0 10.03.2018 12:55:29 - configHandler [DEBUG ] read [Filters] from config file 10.03.2018 12:55:29 - configHandler [DEBUG ] - alarm = ZVEI;zvei;notifyMyAn droid;8X035000;5X[0-9]{3} 10.03.2018 12:55:29 - boswatch [DEBUG ] set loglevel of fileHandler to: 10 10.03.2018 12:55:29 - boswatch [DEBUG ] set backupCount of fileHandler to: 7 10.03.2018 12:55:29 - configHandler [DEBUG ] read [NMAHandler] from config f ile 10.03.2018 12:55:29 - configHandler [DEBUG ] - enablehandler = 1 10.03.2018 12:55:29 - configHandler [DEBUG ] - loglevel = 50 10.03.2018 12:55:29 - configHandler [DEBUG ] - apikey = 10.03.2018 12:55:29 - configHandler [DEBUG ] - appname = BOSWatch 10.03.2018 12:55:29 - boswatch [DEBUG ] add NMA logging handler 10.03.2018 12:55:30 - pluginLoader [DEBUG ] loading plugins 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Search in plugin folder 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] SMS 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] httpRequest 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] FFAgent 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] eMail 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] Telegram 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] firEmergency 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] template 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] MySQL 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] Pushover 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] yowsup 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [ENABLED ] notifyMyAndro id 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] jsonSocket 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] Sms77 10.03.2018 12:55:30 - pluginLoader [DEBUG ] Plugin [DISABLED] BosMon 10.03.2018 12:55:30 - pluginLoader [DEBUG ] load plugin: notifyMyAndroid 10.03.2018 12:55:30 - pluginLoader [DEBUG ] call notifyMyAndroid.onLoad() 10.03.2018 12:55:30 - configHandler [DEBUG ] read [notifyMyAndroid] from con fig file 10.03.2018 12:55:30 - configHandler [DEBUG ] - apikey = 10.03.2018 12:55:30 - configHandler [DEBUG ] - priority = 0 10.03.2018 12:55:30 - configHandler [DEBUG ] - appname = BOSWatch 10.03.2018 12:55:30 - configHandler [DEBUG ] - usecsv = 0 10.03.2018 12:55:30 - stringConverter [DEBUG ] call convertToUnicode('BOSWatch ') 10.03.2018 12:55:30 - stringConverter [DEBUG ] call decodeString('BOSWatch') 10.03.2018 12:55:30 - stringConverter [DEBUG ] -- string was encoded in: utf-8 10.03.2018 12:55:30 - boswatch [DEBUG ] starting rtl_fm 10.03.2018 12:55:33 - boswatch [DEBUG ] starting multimon-ng 10.03.2018 12:55:38 - boswatch [DEBUG ] start decoding 10.03.2018 13:02:30 - decoder [DEBUG ] received ZVEI 10.03.2018 13:02:30 - doubleFilter [DEBUG ] checkID: 5XXXX () 10.03.2018 13:02:30 - zvei [INFO ] 5-Ton: 5XXXX 10.03.2018 13:02:30 - alarmHandler [DEBUG ] [ ALARM ] 10.03.2018 13:02:30 - alarmHandler [DEBUG ] call Plugin: notifyMyAndroid 10.03.2018 13:02:30 - notifyMyAndroid [DEBUG ] Start ZVEI to NMA 10.03.2018 13:02:30 - stringConverter [DEBUG ] call convertToUnicode('5XXXX') 10.03.2018 13:02:30 - stringConverter [DEBUG ] -- integer 10.03.2018 13:02:30 - stringConverter [DEBUG ] call convertToUnicode('10.03.2018 13:02:30') 10.03.2018 13:02:30 - stringConverter [DEBUG ] call decodeString('10.03.2018 13:02:30') 10.03.2018 13:02:30 - stringConverter [DEBUG ] -- string was encoded in: utf-8 10.03.2018 13:02:30 - notifyMyAndroid [ERROR ] cannot read pynma response 10.03.2018 13:02:30 - notifyMyAndroid [DEBUG ] cannot read pynma response Traceback (most recent call last): File "/opt/boswatch/plugins/notifyMyAndroid/notifyMyAndroid.py", line 52, in checkResponse if str(response[APIKey]['code']) == "200": #Check HTTP Response an print a Log or Error KeyError: '' 10.03.2018 13:02:30 - alarmHandler [DEBUG ] return from: notifyMyAndroid 10.03.2018 13:02:30 - alarmHandler [DEBUG ] [END ALARM] 10.03.2018 13:02:30 - doubleFilter [DEBUG ] Added 5XXXX to doubleList 10.03.2018 13:02:31 - decoder [DEBUG ] received ZVEI 10.03.2018 13:02:31 - doubleFilter [DEBUG ] checkID: 5XXXX () 10.03.2018 13:02:31 - doubleFilter [DEBUG ] -- previous id 5XXXX is within doubleFilter_ignore_time (5s) 10.03.2018 13:02:31 - doubleFilter [INFO ] ZVEI double alarm (id): 5XXXX within 1 second(s) 10.03.2018 13:02:31 - doubleFilter [DEBUG ] Added 5XXXX to doubleList 10.03.2018 13:02:32 - decoder [DEBUG ] received ZVEI 10.03.2018 13:02:32 - doubleFilter [DEBUG ] checkID: 5XXXX () 10.03.2018 13:02:32 - zvei [INFO ] 5-Ton: 5XXXX 10.03.2018 13:02:32 - alarmHandler [DEBUG ] [ ALARM ] 10.03.2018 13:02:32 - alarmHandler [DEBUG ] call Plugin: notifyMyAndroid 10.03.2018 13:02:32 - notifyMyAndroid [DEBUG ] Start ZVEI to NMA 10.03.2018 13:02:32 - stringConverter [DEBUG ] call convertToUnicode('5XXXX') 10.03.2018 13:02:32 - stringConverter [DEBUG ] -- integer 10.03.2018 13:02:32 - stringConverter [DEBUG ] call convertToUnicode('10.03.2018 13:02:32') 10.03.2018 13:02:32 - stringConverter [DEBUG ] call decodeString('10.03.2018 13:02:32') 10.03.2018 13:02:32 - stringConverter [DEBUG ] -- string was encoded in: utf-8 10.03.2018 13:02:32 - notifyMyAndroid [ERROR ] cannot read pynma response 10.03.2018 13:02:32 - notifyMyAndroid [DEBUG ] cannot read pynma response Traceback (most recent call last): File "/opt/boswatch/plugins/notifyMyAndroid/notifyMyAndroid.py", line 52, in checkResponse if str(response[APIKey]['code']) == "200": #Check HTTP Response an print a Log or Error KeyError: '' 10.03.2018 13:02:32 - alarmHandler [DEBUG ] return from: notifyMyAndroid 10.03.2018 13:02:32 - alarmHandler [DEBUG ] [END ALARM] 10.03.2018 13:02:32 - doubleFilter [DEBUG ] Added 5XXXX to doubleList 10.03.2018 13:02:33 - decoder [DEBUG ] received ZVEI 10.03.2018 13:02:33 - doubleFilter [DEBUG ] checkID: 5XXXX () 10.03.2018 13:02:33 - doubleFilter [DEBUG ] -- previous id 5XXXXis within doubleFilter_ignore_time (5s) 10.03.2018 13:02:33 - doubleFilter [INFO ] ZVEI double alarm (id): 5XXXX within 1 second(s) 10.03.2018 13:02:33 - doubleFilter [DEBUG ] Added 5XXXX to doubleList

Was kann der Fehler sein? Vielen Dank schonmal.

Schrolli91 commented 6 years ago

Wieso wieder geschlossen? ist erledigt?

MrCoopa commented 6 years ago

Ja, hatte den API Key an falscher stelle eingetragen. Übertragung funktioniert jetzt. Jetzt sind noch 2 Probleme, einmal zu viele API Calls und das die das die ZVEI zu Namen Zuordnung nicht stimmt. Es wird oben BOSWatch und dann mein EventPrefix (Alarm): und dann die ZVEI angezeigt, nicht der in comment zugeordneter Name der FW oder RD.

Schrolli91 commented 6 years ago

Dein zweites Problem verstehe ich anhand deiner Erklärung leider nicht.

MrCoopa commented 6 years ago

Ich möchte anstatt der ZVEI Nummer (5****) die zugeordneten Namen angezeigt bekommen? Also anstatt der ID (ZVEI) den Rufnamen, oder Name der FW. Welches Feld müsste ich dort verwenden.

MrCoopa commented 6 years ago

Bis auf das API Problem, konnte ich alles lösen, danke trotzdem