From e5391a2b75ea65df3c5fc0d473200f1ce176dbe4 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 19 Sep 2017 18:05:26 +0200 Subject: [PATCH 01/32] edit vers nr --- CHANGELOG.md | 1 + includes/globalVars.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d14a03..5e7ee29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +#### __[Unreleased]__ #### __[v2.2.1]__ - 19.09.2017 ##### Added diff --git a/includes/globalVars.py b/includes/globalVars.py index 0d6f2b3..513d231 100644 --- a/includes/globalVars.py +++ b/includes/globalVars.py @@ -9,7 +9,7 @@ Global variables """ # version info -versionNr = "2.2.1-beta" +versionNr = "2.2.1-dev" buildDate = "2017/09/19" From afa224a9aa1c8791b2f432d406fc65d0bf0c4a56 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 19 Sep 2017 18:11:37 +0200 Subject: [PATCH 02/32] edit changelog --- CHANGELOG.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e7ee29..15a0976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog #### __[Unreleased]__ +##### Added +##### Changed +##### Deprecated +##### Removed +##### Fixed +##### Security + #### __[v2.2.1]__ - 19.09.2017 ##### Added @@ -12,16 +19,20 @@ - Description Liste kann nun zusätzlich Einträge für jede Subric enthalten - RegEX verbietet nun grundsätzlich alles - Es muss explizit zugelassen werden -##### Deprecated -##### Removed ##### Fixed - Bug im SMS77 Plugin -##### Security - ---------------------------- Zum schreiben des Changelog's siehe: http://keepachangelog.com/de/1.0.0/ + +#### __[Unreleased]__ +##### Added +##### Changed +##### Deprecated +##### Removed +##### Fixed +##### Security From c698a9eb15346fe5305cf1855a293a7a8fd02c1b Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 19 Sep 2017 18:16:41 +0200 Subject: [PATCH 03/32] edit CL --- CHANGELOG.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15a0976..e997ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -#### __[Unreleased]__ +### __[Unreleased]__ ##### Added ##### Changed ##### Deprecated @@ -9,18 +9,18 @@ ##### Security -#### __[v2.2.1]__ - 19.09.2017 +### __[v2.2.1]__ - 19.09.2017 ##### Added - Neues Service Script -- Eigene Message fpr jeden Typ im Telegram Plugin +- Eigene Message für jeden Typ im Telegram Plugin in der config definierbar ##### Changed -- Name der csv Dateien um überschreiben bei Update zu vermeiden -- Description Liste kann nun zusätzlich Einträge für jede Subric enthalten -- RegEX verbietet nun grundsätzlich alles - Es muss explizit zugelassen werden +- Name der csv Dateien geändert um überschreiben bei Update zu vermeiden +- Description Liste kann nun zusätzlich Einträge für jede Subric enthalten (POCSAG) +- RegEX verbietet nun grundsätzlich alles - Es muss explizit zugelassen werden (wenn RegEX aktiv) ##### Fixed -- Bug im SMS77 Plugin +- Bug im SMS77 Plugin behoben ---------------------------- @@ -29,7 +29,7 @@ Zum schreiben des Changelog's siehe: http://keepachangelog.com/de/1.0.0/ -#### __[Unreleased]__ +### __[Unreleased]__ ##### Added ##### Changed ##### Deprecated From 8beb46f55a01311ced032b35ec60b48e40bfa6a6 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 20 Sep 2017 21:27:08 +0200 Subject: [PATCH 04/32] edit readme wiki doubles deleted --- README.md | 72 ++++++++++--------------------------------------------- 1 file changed, 12 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index ac3d336..eb8e805 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ In der Zukunft wollen wir die Möglichkeit schaffen, codierte Nachrichten zu ent :satellite: Python Script to receive and decode German BOS Information with rtl_fm and multimon-NG :satellite: +#### WICHTIG +**Es wird darauf hingewiesen, dass für die Teilnahme am BOS-Funk nur nach den Technischen Richtlinien der BOS zugelassene Funkanlagen verwendet werden dürfen.** +**Der BOS-Funk ist ein nichtöffentlicher mobiler Landfunk. Privatpersonen gehören nicht zum Kreis der berechtigten Funkteilnehmer.** _(Quelle: TR-BOS)_ + #### Notice: The intercept of the German BOS radio is **strictly prohibited** and will be prosecuted. the use is **only authorized** personnel permitted. The software was developed using the Multimon-NG code, a function in the real operation can not be guaranteed. @@ -23,10 +27,13 @@ The software was developed using the Multimon-NG code, a function in the real op **Please** only use Code from **master**-Branch - thats **the only stable!** +beta-branch is for beta-test of new features + unless you are developer you can use the develop-Branch - may be unstable! ### Features ##### Implemented features: +**list is not complete!** - FMS, ZVEI and POCSAG512/1200/2400 decoding and displaying - Plugin support for easy functional extension - Filtering double alarms with adjustable time and check width @@ -41,30 +48,12 @@ unless you are developer you can use the develop-Branch - may be unstable! - possibility to start plugins asynchron - NMA Error Handler -##### Features for the future: -- more plugins -- other Ideas per Issues please - ### Plugins If you want to code your own Plugin, see `plugins/README.md`. ##### Implemented plugins: - -|Plugin|Function|FMS|ZVEI|POC| -|-----|---------|:-:|:--:|:-:| -|MySQL|insert data into MySQL database|:white_check_mark:|:white_check_mark:|:white_check_mark:| -|httpRequest|send a request with parameter to an URL|:white_check_mark:|:white_check_mark:|:white_check_mark:| -|eMail|send Mails with own text|:white_check_mark:|:white_check_mark:|:white_check_mark:| -|BosMon|send data to BosMon server|:white_check_mark:|:white_check_mark:|:white_check_mark:| -|firEmergency|send data to firEmergency server|:x:|:white_check_mark:|:white_check_mark:| -|jsonSocket|send data as jsonString to a socket server|:white_check_mark:|:white_check_mark:|:white_check_mark:| -|NMA|send data to Notify my Android|:white_check_mark:|:white_check_mark:|:white_check_mark:| - -- for more Information to the plugins see `config.ini` - -##### Plugins for the Future: -- Ideas per Issues please +please look at the wiki page ### Configuration @@ -105,52 +94,15 @@ Take a look into the parser.php for the parsing functions~~ ### Usage -`sudo python boswatch.py -f 85.235M -a FMS ZVEI` -Starts boswatch at frequency 85.235 MHz with the demodulation functions FMS and ZVEI. -Parameter -f/--freq and -a/--demod are required! - -Help to all usable parameters with `sudo python boswatch.py -h` - -``` -usage: boswatch.py [-h] -f FREQ [-d DEVICE] [-e ERROR] -a - {FMS,ZVEI,POC512,POC1200,POC2400} - [{FMS,ZVEI,POC512,POC1200,POC2400} ...] [-s SQUELCH] [-v] - -optional arguments: - -h, --help show this help message and exit - -f FREQ, --freq FREQ Frequency you want to listen - -d DEVICE, --device DEVICE Device you want to use (Check with rtl_test) - -e ERROR, --error ERROR Frequency-Error of your device in PPM - -a {FMS,ZVEI,POC512,POC1200,POC2400} [{FMS,ZVEI,POC512,POC1200,POC2400} ...], - --demod {FMS,ZVEI,POC512,POC1200,POC2400} [{FMS,ZVEI,POC512,POC1200,POC2400} ...] - Demodulation functions - -s SQUELCH, --squelch SQUELCH level of squelch - -u, --usevarlog Use '/var/log/boswatch' for logfiles instead of subdir 'log' in BOSWatch directory - -v, --verbose Shows more information - -q, --quiet Shows no information. Only logfiles -``` - +please look at the wiki page ### Installation -Please follow the instructions written down in the wiki: - -https://github.com/Schrolli91/BOSWatch/wiki - -You just need to download a single file since the installer manages the whole process except the installation of a webserver and a database. +please look at the wiki page If you want to use BOSWatch as a daemon, you have to set your configuration in `service/boswatch.sh` and copy it to `/etc/init.d`. Then you can start BOSWatch with `sudo /etc/init.d/boswatch.sh start`. For configuration-details see `service/README.md`. -### Requirements -- RTL_SDR (rtl_fm) -- Multimon-NG -- Python Support -- MySQL Connector for Python (for MySQL-plugin) - -Thanks to smith_fms and McBo from Funkmeldesystem.de - Forum for Inspiration and Groundwork! - - -### Code your own Plugin -See `plugins/README.md` +##### Big thanks +to smith_fms and McBo from Funkmeldesystem.de - Forum for Inspiration and Groundwork! From 2f3817c64fc738f4aa3d6d3a8f5a91e7779e6001 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Thu, 21 Sep 2017 13:16:42 +0200 Subject: [PATCH 05/32] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e997ab7..e6c0eae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -### __[Unreleased]__ +### __[v2.2.3]__ - unreleased ##### Added ##### Changed ##### Deprecated @@ -29,7 +29,7 @@ Zum schreiben des Changelog's siehe: http://keepachangelog.com/de/1.0.0/ -### __[Unreleased]__ +### __[version]__ - date ##### Added ##### Changed ##### Deprecated From 167c0b90f308ad468bfdfe91f965c23ccbce0e74 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Fri, 22 Sep 2017 06:33:29 +0200 Subject: [PATCH 06/32] wildcard params harmonized in config --- config/config.template.ini | 157 +++++++++++++------------------------ 1 file changed, 53 insertions(+), 104 deletions(-) diff --git a/config/config.template.ini b/config/config.template.ini index d943faf..d1a21e1 100644 --- a/config/config.template.ini +++ b/config/config.template.ini @@ -171,36 +171,18 @@ tableSIG = bos_signal # multiple URLs can be separated by comma -# you can use the following wildcards in your URL as GET params: +# you can use the wildcards in your URL as GET params: # http://en.wikipedia.org/wiki/Query_string -# %FMS% = FMS Code -# %STATUS% = FMS Status -# %DIR% = Direction of the telegram (0/1) -# %DIRT% = Direction of the telegram (Text-String) -# %TSI% = Tactical Short Information (I-IV) -# %DESCR% = Description from csv-file -# %TIME% = Time (by script) -# %DATE% = Date (by script) +#Wildcards can be used, see end of the file! #fms_url = http://www.google.de?code=%FMS%&stat=%STATUS% fms_url = -# %ZVEI% = ZVEI 5-tone Code -# %DESCR% = Description from csv-file -# %TIME% = Time (by script) -# %DATE% = Date (by script) +#Wildcards can be used, see end of the file! #zvei_url = http://www.google.de?zvei=%ZVEI% zvei_url = -# %RIC% = POCSAG RIC -# %FUNC% = POCSAG function/Subric (1-4) -# %FUNCCHAR% = POCSAG function/Subric as character (a-d) -# %FUNCTEXT% = POCSAG function/Subric static massage definded in POCSAG section -# %MSG% = Message of the POCSAG telegram -# %BITRATE% = Bitrate of the POCSAG telegram -# %DESCR% = Description from csv-file -# %TIME% = Time (by script) -# %DATE% = Date (by script) +#Wildcards can be used, see end of the file! #poc_url = http://www.google.de?ric=%RIC%&subric=%FUNC%&msg=%MSG% poc_url = @@ -225,42 +207,15 @@ to = user@irgendwo, user2@woanders # normal|urgent|non-urgent priority = urgent -# %FMS% = FMS Code -# %STATUS% = FMS Status -# %DIR% = Direction of the telegram (0/1) -# %DIRT% = Direction of the telegram (Text-String) -# %TSI% = Tactical Short Information (I-IV) -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %BR% = Insert line wrap (only in message) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! fms_subject = FMS: %FMS% fms_message = %DATE% %TIME%: %FMS%%BR%Status: %STATUS% - Direction: %DIRT% - TSI: %TSI% -# %ZVEI% = ZVEI 5-tone Code -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %BR% = Insert line wrap (only in message) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! zvei_subject = Alarm: %ZVEI% zvei_message = %DATE% %TIME%: %ZVEI% -# %RIC% = POCSAG RIC -# %FUNC% = POCSAG function/Subric (1-4) -# %FUNCCHAR% = POCSAG function/Subric als character (a-d) -# %FUNCTEXT% = POCSAG function/Subric static massage definded in POCSAG section -# %MSG% = Message of the POCSAG telegram -# %BITRATE% = Bitrate of the POCSAG telegram -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %BR% = Insert line wrap (only in message) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! poc_subject = Alarm: %RIC%%LPAR%%FUNCCHAR%%RPAR% poc_message = %DATE% %TIME% - %DESCR%: %MSG% @@ -415,36 +370,13 @@ RICforLocationAPIKey = # Required if you want to create a map based on location information received with the above RIC. GoogleAPIKey = -# %FMS% = FMS Code -# %STATUS% = FMS Status -# %DIR% = Direction of the telegram (0/1) -# %DIRT% = Direction of the telegram (Text-String) -# %TSI% = Tactical Short Information (I-IV) -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! FMS_message = %DATE% %TIME%: %FMS% -# %ZVEI% = ZVEI 5-tone Code -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! ZVEI_message = %DATE% %TIME%: %ZVEI% -# %RIC% = POCSAG RIC -# %FUNC% = POCSAG function/Subric (1-4) -# %FUNCCHAR% = POCSAG function/Subric als character (a-d) -# %MSG% = Message of the POCSAG telegram -# %BITRATE% = Bitrate of the POCSAG telegram -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! POC_message = %MSG% @@ -456,36 +388,13 @@ sender = # password from this number password= -# %FMS% = FMS Code -# %STATUS% = FMS Status -# %DIR% = Direction of the telegram (0/1) -# %DIRT% = Direction of the telegram (Text-String) -# %TSI% = Tactical Short Information (I-IV) -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! fms_message = %DATE% %TIME%: %FMS% -# %ZVEI% = ZVEI 5-tone Code -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! zvei_message = %DATE% %TIME%: %ZVEI% -# %RIC% = POCSAG RIC -# %FUNC% = POCSAG function/Subric (1-4) -# %FUNCCHAR% = POCSAG function/Subric als character (a-d) -# %MSG% = Message of the POCSAG telegram -# %BITRATE% = Bitrate of the POCSAG telegram -# %DESCR% = Description, if description-module is used -# %DATE% = Date (by script) -# %TIME% = Time (by script) -# %LPAR% = ( -# %RPAR% = ) +#Wildcards can be used, see end of the file! poc_message = %MSG% @@ -496,3 +405,43 @@ poc_message = %MSG% [template] test1 = testString test2 = 123456 + + +##################### +##### WILDCARDS ##### +##################### + +##### FMS +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) + +##### ZVEI +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) + +##### POCSAG +# %RIC% = POCSAG RIC +# %FUNC% = POCSAG function/Subric (1-4) +# %FUNCCHAR% = POCSAG function/Subric als character (a-d) +# %MSG% = Message of the POCSAG telegram +# %BITRATE% = Bitrate of the POCSAG telegram +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) From 2d8d5e42d9ff2e756726a5d8b6389f250622db93 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Fri, 22 Sep 2017 16:09:29 +0200 Subject: [PATCH 07/32] edit config file little changes an a new header --- config/config.template.ini | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/config/config.template.ini b/config/config.template.ini index d1a21e1..7a959f2 100644 --- a/config/config.template.ini +++ b/config/config.template.ini @@ -1,6 +1,17 @@ -######################## -# BOSWatch Config File # -######################## + +# ____ ____ ______ __ __ __ +# / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ +# / __ / / / /\__ \| | /| / / __ / __/ ___/ __ \ +# / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / +# /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ +# German BOS Information Script +# configuration file +# +# The intercept of the German BOS radio is strictly +# prohibited and will be prosecuted. +# The use is only authorized personnel permitted! +# + [BOSWatch] # set loglevel for logfile @@ -31,6 +42,7 @@ processAlarmAsync = 0 # Using RegEx-filter (0 - off | 1 - on) # filter-configuration in section [Filters] +# if you are using the RegEx filter you must add filter rules to forward alarms useRegExFilter = 0 # for double check save the last n IDs @@ -51,6 +63,7 @@ doubleFilter_check_msg = 0 # writes the multimon-ng raw data stream into a text file named mm_raw.txt writeMultimonRaw = 0 + [NMAHandler] # you can use a logging handler for sending logging records to NotifyMyAndroid # enableHandler (0|1) will enable the NMA handler @@ -79,12 +92,14 @@ idDescribed = 0 # Better use RegEX to verify the correct data checkCRC = 0 + [ZVEI] # look-up-table for adding a description # using description (0 - off | 1 - on) # descriptions are loaded from csv/zvei.csv idDescribed = 0 + [POC] # some very simple filters: # Allow only this RICs (empty: allow all, separator ",") @@ -114,16 +129,17 @@ ricd = Unwetter # Usually sent periodically, separated by comma netIdent_ric = 0174760, 1398098 + [Filters] # RegEX Filter Configuration # http://www.regexr.com/ - RegEX Test Tool an Documentation -# No Filter for a Typ/Plugin Combination = all Data pass -# INDIVIDUAL_NAME = TYP;DATAFIELD;PLUGIN;FREQUENZ;REGEX +# If RegEX is enabled - only alloewd data will pass! +# INDIVIDUAL_NAME = TYP;DATAFIELD;PLUGIN;FREQUENZ;REGEX # TYP = the Data Typ (FMS|ZVEI|POC) -# DATAFIELD = the field of the Data Array (see readme.md in plugin folder) +# DATAFIELD = the field of the Data Array (see readme.md in plugin folder) # PLUGIN = the name of the Plugin to call with this Filter (* for all) -# FREQUENZ = the Frequenz to use the Filter (for more SDR Sticks (* for all)) -# REGEX = the RegEX +# FREQUENZ = the Frequenz to use the Filter (for more SDR Sticks (* for all)) +# REGEX = the RegEX # only ZVEI to all plugins with 25### at 85.5MHz #testfilter = ZVEI;zvei;*;85500000;25[0-9]{3} @@ -148,7 +164,7 @@ Pushover = 0 Telegram = 0 yowsup = 0 -# for developing template-module +# for developing - template-module template = 0 From 45f4887163c65d2cc187dc78dea093f1983a8e54 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Fri, 29 Sep 2017 13:26:06 +0200 Subject: [PATCH 08/32] edit changelog with links --- CHANGELOG.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c0eae..4439a17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,16 +11,18 @@ ### __[v2.2.1]__ - 19.09.2017 ##### Added -- Neues Service Script -- Eigene Message für jeden Typ im Telegram Plugin in der config definierbar +- Neues Service Script [#263](https://github.com/Schrolli91/BOSWatch/pull/263) +- Eigene Message für jeden Typ im Telegram Plugin in der config definierbar [#267](https://github.com/Schrolli91/BOSWatch/pull/267) +- httpRequest Plugin unterstützt nun mehrere URLs [254](https://github.com/Schrolli91/BOSWatch/pull/254) ##### Changed -- Name der csv Dateien geändert um überschreiben bei Update zu vermeiden -- Description Liste kann nun zusätzlich Einträge für jede Subric enthalten (POCSAG) -- RegEX verbietet nun grundsätzlich alles - Es muss explizit zugelassen werden (wenn RegEX aktiv) +- Name der csv Dateien geändert um überschreiben bei Update zu vermeiden [#262](https://github.com/Schrolli91/BOSWatch/pull/262) +- Description Liste kann nun zusätzlich Einträge für jede Subric enthalten (POCSAG) [#271](https://github.com/Schrolli91/BOSWatch/pull/271) +- RegEX verbietet nun grundsätzlich alles - Es muss explizit zugelassen werden (wenn RegEX aktiv) [#284](https://github.com/Schrolli91/BOSWatch/pull/284) ##### Fixed -- Bug im SMS77 Plugin behoben +- Bug im SMS77 Plugin behoben [#257](https://github.com/Schrolli91/BOSWatch/issues/257) +- einige Code-Style Verbesserungen ---------------------------- From 0774a581939a1786bc92bd4744fa08565f2fab96 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sat, 30 Sep 2017 15:56:10 +0200 Subject: [PATCH 09/32] rename systemcl to systemctl http://boswatch.de/index.php?thread/4-version-2-2-1/&postID=31#post31 --- service/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/README.md b/service/README.md index 41337a9..58ad6f9 100644 --- a/service/README.md +++ b/service/README.md @@ -10,8 +10,8 @@ Enter the frequency and the decoder(s) you want to use in line 7; you can add mo ### Install the service 1. Copy the file to /lib/systemd/system: sudo cp /opt/boswatch/service/boswatch.service /lib/systemd/system/ 2. Change the rights: sudo chmod 644 /lib/systemd/system/boswatch.service -3. Enable the service: sudo systemcl enable boswatch.service -4. Start the service: sudo systemcl start boswatch.service +3. Enable the service: sudo systemctl enable boswatch.service +4. Start the service: sudo systemctl start boswatch.service --- From 760f6c1abaa80a7398658d2ea7a2f21a79bbab2e Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sat, 30 Sep 2017 16:05:23 +0200 Subject: [PATCH 10/32] Update globalVars.py --- includes/globalVars.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/globalVars.py b/includes/globalVars.py index 513d231..c081608 100644 --- a/includes/globalVars.py +++ b/includes/globalVars.py @@ -9,8 +9,8 @@ Global variables """ # version info -versionNr = "2.2.1-dev" -buildDate = "2017/09/19" +versionNr = "2.2.2-dev" +buildDate = "in dev" # Global variables From b2df53430d93cd56d261b7d73557680a0d32e492 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sat, 30 Sep 2017 16:07:32 +0200 Subject: [PATCH 11/32] edit CL --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4439a17..609abc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ # Changelog -### __[v2.2.3]__ - unreleased +### __[v2.2.2]__ - unreleased ##### Added ##### Changed ##### Deprecated ##### Removed ##### Fixed +- Schreibfehler in Service Readme [#313](https://github.com/Schrolli91/BOSWatch/issues/313) ##### Security From d4946bf714e4053f33209c0fd68287f4b01f6400 Mon Sep 17 00:00:00 2001 From: PeterLaemmle Date: Sat, 30 Sep 2017 18:11:20 +0200 Subject: [PATCH 12/32] Update Telegram.py Import libraries urllib and googlemaps only if RICforLocationAPIKey is defined. --- plugins/Telegram/Telegram.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/Telegram/Telegram.py b/plugins/Telegram/Telegram.py index fc4acc7..dc4cc6e 100644 --- a/plugins/Telegram/Telegram.py +++ b/plugins/Telegram/Telegram.py @@ -11,9 +11,11 @@ Plugin to send FMS-, ZVEI- and POCSAG-messages via Telegram # Imports # import logging # Global logger -import urllib, telegram, googlemaps +import telegram from telegram.error import (TelegramError, Unauthorized, BadRequest, NetworkError) from includes import globalVars # Global variables +if globalVars.config.get("Telegram","RICforLocationAPIKey"): + import urllib, googlemaps # Helper function, uncomment to use from includes.helper import wildcardHandler From 47bdff4b28292a6c0ff3009cc3fbab195037d59f Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sat, 30 Sep 2017 18:27:11 +0200 Subject: [PATCH 13/32] edit CL --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 609abc4..15ca61e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### __[v2.2.2]__ - unreleased ##### Added ##### Changed +- Telegram Plugin importiert Google Maps Funktionen nur noch wenn API Key eingetragen ist [#315](https://github.com/Schrolli91/BOSWatch/pull/315) ##### Deprecated ##### Removed ##### Fixed From 9d552e5d244c0a19b0987a6a08be5214f1fd3a09 Mon Sep 17 00:00:00 2001 From: Florian Date: Sat, 30 Sep 2017 22:51:42 +0200 Subject: [PATCH 14/32] Add explanation Add description on how to use subric-specific description (according to #271 and #312) --- csv/poc.template.csv | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csv/poc.template.csv b/csv/poc.template.csv index 87a5073..9dfe7d4 100644 --- a/csv/poc.template.csv +++ b/csv/poc.template.csv @@ -5,6 +5,12 @@ ric,description # For each RIC-Address you could set a description-text # Use the structure: ric,"Description-Text" # +# You can even define specific subrics, therefore you +# 1. need to specify a main RIC: 1234567, "Unit One" +# 2. specify a certain subric: 1234567B, "Subunit Bravo" +# The result for 1234567B will be "Unit One Subunit Bravo" +# - Be sure having defined the main RIC (step one)! - +# # !!! DO NOT delete the first line !!! # 1234567,"POCSAG testdata äöüß" From acbef6591c6032617792d5b71f8a1824f1d3342b Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Mon, 2 Oct 2017 07:25:22 +0200 Subject: [PATCH 15/32] edits for codacy (#310) --- CHANGELOG.md | 1 + includes/helper/stringConverter.py | 1 - includes/pynma/pynma.py | 14 ++++----- install.sh | 4 +-- plugins/MySQL/MySQL.py | 32 ++++++++++---------- plugins/Sms77/Sms77.py | 2 +- plugins/httpRequest/httpRequest.py | 4 +-- plugins/notifyMyAndroid/notifyMyAndroid.py | 34 +++++++++++----------- 8 files changed, 46 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15ca61e..5777b2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ##### Removed ##### Fixed - Schreibfehler in Service Readme [#313](https://github.com/Schrolli91/BOSWatch/issues/313) +- Einige Code-Style Verbesserungen [#310](https://github.com/Schrolli91/BOSWatch/pull/310) ##### Security diff --git a/includes/helper/stringConverter.py b/includes/helper/stringConverter.py index 01ada06..acd9a26 100644 --- a/includes/helper/stringConverter.py +++ b/includes/helper/stringConverter.py @@ -159,7 +159,6 @@ def convertToUTF8(inputString = ""): raise # End of exception UnicodeDecodeError: check given string is already UTF-8 - pass except: logging.warning("error checking given string") diff --git a/includes/pynma/pynma.py b/includes/pynma/pynma.py index 08a71cb..5649f05 100644 --- a/includes/pynma/pynma.py +++ b/includes/pynma/pynma.py @@ -3,14 +3,14 @@ from xml.dom.minidom import parseString try: - from http.client import HTTPSConnection + from http.client import HTTPSConnection except ImportError: - from httplib import HTTPSConnection + from httplib import HTTPSConnection try: - from urllib.parse import urlencode + from urllib.parse import urlencode except ImportError: - from urllib import urlencode + from urllib import urlencode __version__ = "1.0" @@ -55,10 +55,10 @@ takes 2 optional arguments: def delkey(self, key): "Removes a key (unregister ?)" - if type(key) == str: + if isinstance(key, str): if key in self._apikey: self._apikey.remove(key) - elif type(key) == list: + elif isinstance(key, list): for k in key: if key in self._apikey: self._apikey.remove(k) @@ -71,7 +71,7 @@ takes 2 optional arguments: def pushWithAPIKey(self, apikey=[], application="", event="", description="", url="", contenttype=None, priority=0, batch_mode=False, html=False): """Special Funktion""" if apikey: - if type(apikey) == str: + if isinstance(apikey, str): apikey = [apikey] self._apikey = uniq(apikey) return self.push(application, event, description, url, contenttype, priority, batch_mode, html) diff --git a/install.sh b/install.sh index 5c251ea..4b549a8 100644 --- a/install.sh +++ b/install.sh @@ -51,7 +51,7 @@ didBackup=false if [ -f $boswatchpath/BOSWatch/boswatch.py ]; then echo "Old installation found!" echo "A backup will be copied to $boswatchpath/old" - + mkdir /tmp/boswatch mv $boswatchpath/BOSWatch/* /tmp/boswatch/ didBackup=true @@ -61,7 +61,7 @@ fi if [ -f $boswatchpath/boswatch.py ]; then echo "Old installation found!" echo "A backup will be copied to $boswatchpath/old" - + mkdir /tmp/boswatch mv $boswatchpath/* /tmp/boswatch/ didBackup=true diff --git a/plugins/MySQL/MySQL.py b/plugins/MySQL/MySQL.py index 5941571..e9d3d7e 100644 --- a/plugins/MySQL/MySQL.py +++ b/plugins/MySQL/MySQL.py @@ -21,23 +21,23 @@ from includes import globalVars # Global variables from includes.helper import configHandler def isSignal(poc_id): - """ - @type poc_id: string - @param poc_id: POCSAG Ric + """ + @type poc_id: string + @param poc_id: POCSAG Ric - @requires: Configuration has to be set in the config.ini + @requires: Configuration has to be set in the config.ini - @return: True if the Ric is Signal, other False - @exception: none - """ - # If RIC is Signal return True, else False - if globalVars.config.get("POC", "netIdent_ric"): - if poc_id in globalVars.config.get("POC", "netIdent_ric"): - logging.info("RIC %s is net ident", poc_id) - return True - else: - logging.info("RIC %s is no net ident", poc_id) - return False + @return: True if the Ric is Signal, other False + @exception: none + """ + # If RIC is Signal return True, else False + if globalVars.config.get("POC", "netIdent_ric"): + if poc_id in globalVars.config.get("POC", "netIdent_ric"): + logging.info("RIC %s is net ident", poc_id) + return True + else: + logging.info("RIC %s is no net ident", poc_id) + return False ## @@ -87,7 +87,7 @@ def run(typ,freq,data): if configHandler.checkConfig("MySQL"): #read and debug the config try: - # + # # Connect to MySQL # logging.debug("connect to MySQL") diff --git a/plugins/Sms77/Sms77.py b/plugins/Sms77/Sms77.py index e4353d1..6d30a1a 100644 --- a/plugins/Sms77/Sms77.py +++ b/plugins/Sms77/Sms77.py @@ -58,7 +58,7 @@ def run(typ,freq,data): """ try: if configHandler.checkConfig("Sms77"): #read and debug the config - + # create an empty message an fill it with the required information message = "Alarm" if typ == "FMS": diff --git a/plugins/httpRequest/httpRequest.py b/plugins/httpRequest/httpRequest.py index 744f621..56e35a6 100644 --- a/plugins/httpRequest/httpRequest.py +++ b/plugins/httpRequest/httpRequest.py @@ -71,8 +71,8 @@ def run(typ,freq,data): # Replace special characters in data Strings for URL # for key in data: - if isinstance(data[key], basestring): - data[key] = urllib.quote(data[key]) + if isinstance(data[key], basestring): + data[key] = urllib.quote(data[key]) # # Get URLs # diff --git a/plugins/notifyMyAndroid/notifyMyAndroid.py b/plugins/notifyMyAndroid/notifyMyAndroid.py index 7fa535f..a8ab127 100644 --- a/plugins/notifyMyAndroid/notifyMyAndroid.py +++ b/plugins/notifyMyAndroid/notifyMyAndroid.py @@ -268,23 +268,23 @@ def run(typ,freq,data): # nothing found pass # 3. lets look for ric prefixes in pocAPIKeyList - for prefixLength in reversed(range(6)): - ricPrefix = data['ric'][:prefixLength] - #fill the ric with stars - ricPrefix = ricPrefix.ljust(8,'*') - try: - xID = ricPrefix - # data structure: pocAPIKeyList[xID][i] = (xAPIKey, xPriority, xEventPrefix) - for i in range(len(pocAPIKeyList[xID])): - xEvent = event - (xAPIKey, xPriority, xEventPrefix) = pocAPIKeyList[xID][i] - if len(xEventPrefix) > 0: - xEvent = xEventPrefix + ": " + xEvent - response = nma.pushWithAPIKey(xAPIKey, application, xEvent, msg, priority=xPriority) - checkResponse(response, xAPIKey) - except KeyError: - # nothing found - pass + for prefixLength in reversed(range(6)): + ricPrefix = data['ric'][:prefixLength] + #fill the ric with stars + ricPrefix = ricPrefix.ljust(8,'*') + try: + xID = ricPrefix + # data structure: pocAPIKeyList[xID][i] = (xAPIKey, xPriority, xEventPrefix) + for i in range(len(pocAPIKeyList[xID])): + xEvent = event + (xAPIKey, xPriority, xEventPrefix) = pocAPIKeyList[xID][i] + if len(xEventPrefix) > 0: + xEvent = xEventPrefix + ": " + xEvent + response = nma.pushWithAPIKey(xAPIKey, application, xEvent, msg, priority=xPriority) + checkResponse(response, xAPIKey) + except KeyError: + # nothing found + pass # end if "POC" in typ # end if usecsv == True From 625d6b643e7292aab8c547bffaf90234c3d5ec7c Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 2 Oct 2017 23:27:12 +0200 Subject: [PATCH 16/32] Update README.md Fixing description on how to install the service --- service/README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/service/README.md b/service/README.md index 58ad6f9..805ef88 100644 --- a/service/README.md +++ b/service/README.md @@ -8,10 +8,14 @@ We assume that BOSWatch is installed to /opt/boswatch! Otherwise you need to ada Enter the frequency and the decoder(s) you want to use in line 7; you can add more specific switches if you need to ### Install the service -1. Copy the file to /lib/systemd/system: sudo cp /opt/boswatch/service/boswatch.service /lib/systemd/system/ -2. Change the rights: sudo chmod 644 /lib/systemd/system/boswatch.service -3. Enable the service: sudo systemctl enable boswatch.service -4. Start the service: sudo systemctl start boswatch.service +1. Use the install-script install_service.sh as sudo: `sudo bash install_service.sh` (self explaining) + +OR + +1. Copy the file to /etc/systemd/system: sudo cp /opt/boswatch/service/boswatch.service /etc/systemd/system/ +2. Enable the service: sudo systemctl enable boswatch.service +3. Start the service: sudo systemctl start boswatch.service +4. Check the status: sudo systemctl status boswatch.service --- From d248a7d45dce3c4042a29b0fcaa04eed3ebe85e1 Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 2 Oct 2017 23:41:57 +0200 Subject: [PATCH 17/32] Installscript for service A tiny to script to install and register the service automatically There is also a possibility to remove the service --- service/install_service.sh | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 service/install_service.sh diff --git a/service/install_service.sh b/service/install_service.sh new file mode 100644 index 0000000..d973b5a --- /dev/null +++ b/service/install_service.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# Tiny script to install BOSWatch-service to use it via systemctl +# Just a few simple steps are required to (un)register your service + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root!" 1>&2 + exit 1 +fi + +read -p"Do you want to install (i) or remove (r) the service? " action + +if [ "$action" == "i" ]; then + + # 1 Check whether the right data are in the service-file + + read -p"Did you adapt the file boswatch.service (y/n)? " response + + if [ "$response" == "y" ]; then + # 2 Copy the file + cp boswatch.service /etc/systemd/system + + # 3 Enable the service and check status + systemctl enable boswatch.service + systemctl is-enabled boswatch.service + + # 4 fire it up + systemctl start boswatch.service + + # 5 post the status + systemctl status boswatch.service + else + echo "Please adapt your personal boswatch.service-file" + exit 1 + fi +else # we want to remove the service + # stop it... + systemctl stop boswatch.service + + # disable it + systemctl disable boswatch.service + + # and remove it + rm /etc/systemd/system/boswatch.service +fi From eacb72adeadfa24a6836c83c9f552e9516145e9f Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 3 Oct 2017 08:50:11 +0200 Subject: [PATCH 18/32] edit CL --- CHANGELOG.md | 1 + service/install_service.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5777b2f..621b231 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### __[v2.2.2]__ - unreleased ##### Added +- Installations Script für Services [#316](https://github.com/Schrolli91/BOSWatch/pull/316) ##### Changed - Telegram Plugin importiert Google Maps Funktionen nur noch wenn API Key eingetragen ist [#315](https://github.com/Schrolli91/BOSWatch/pull/315) ##### Deprecated diff --git a/service/install_service.sh b/service/install_service.sh index d973b5a..1ec6c7e 100644 --- a/service/install_service.sh +++ b/service/install_service.sh @@ -13,9 +13,9 @@ read -p"Do you want to install (i) or remove (r) the service? " action if [ "$action" == "i" ]; then # 1 Check whether the right data are in the service-file - + read -p"Did you adapt the file boswatch.service (y/n)? " response - + if [ "$response" == "y" ]; then # 2 Copy the file cp boswatch.service /etc/systemd/system @@ -36,7 +36,7 @@ if [ "$action" == "i" ]; then else # we want to remove the service # stop it... systemctl stop boswatch.service - + # disable it systemctl disable boswatch.service From 3fed1ac12af8690213766e0e81d71c237530ed2c Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 3 Oct 2017 16:00:31 +0200 Subject: [PATCH 19/32] decouple vers nr and branch name --- boswatch.py | 1 + includes/globalVars.py | 5 +++-- includes/shellHeader.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/boswatch.py b/boswatch.py index e8b7b3a..f21937b 100755 --- a/boswatch.py +++ b/boswatch.py @@ -162,6 +162,7 @@ try: # try: logging.debug("SW Version: %s",globalVars.versionNr) + logging.debug("Branch: %s",globalVars.branch) logging.debug("Build Date: %s",globalVars.buildDate) logging.debug("BOSWatch given arguments") if args.test: diff --git a/includes/globalVars.py b/includes/globalVars.py index c081608..be4305d 100644 --- a/includes/globalVars.py +++ b/includes/globalVars.py @@ -9,8 +9,9 @@ Global variables """ # version info -versionNr = "2.2.2-dev" -buildDate = "in dev" +versionNr = "2.2.2" +branch = "dev" +buildDate = "unreleased" # Global variables diff --git a/includes/shellHeader.py b/includes/shellHeader.py index 561603a..ab82eae 100644 --- a/includes/shellHeader.py +++ b/includes/shellHeader.py @@ -31,6 +31,7 @@ def printHeader(args): print " by Bastian Schroll, Jens Herrmann " print "" print "SW Version: "+globalVars.versionNr + print "Branch: "+globalVars.branch print "Build Date: "+globalVars.buildDate print "" From e503130a03e4a9b30abea05eb1ed825b24d101a8 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 3 Oct 2017 16:03:27 +0200 Subject: [PATCH 20/32] edit CL --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5777b2f..4648a8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ##### Added ##### Changed - Telegram Plugin importiert Google Maps Funktionen nur noch wenn API Key eingetragen ist [#315](https://github.com/Schrolli91/BOSWatch/pull/315) +- Versions Nummer und Branch Name getrennt [3fed1ac](https://github.com/Schrolli91/BOSWatch/commit/3fed1ac12af8690213766e0e81d71c237530ed2c) ##### Deprecated ##### Removed ##### Fixed From e86059a2f3d98847379febd2daafe7c7c4023843 Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 3 Oct 2017 17:08:22 +0200 Subject: [PATCH 21/32] Update install_service.sh Adding errorhandling due to wrong input characters --- service/install_service.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/service/install_service.sh b/service/install_service.sh index 1ec6c7e..2789a35 100644 --- a/service/install_service.sh +++ b/service/install_service.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Tiny script to install BOSWatch-service to use it via systemctl +# Tiny script to install BOSWatch-service via systemctl # Just a few simple steps are required to (un)register your service if [[ $EUID -ne 0 ]]; then @@ -13,9 +13,9 @@ read -p"Do you want to install (i) or remove (r) the service? " action if [ "$action" == "i" ]; then # 1 Check whether the right data are in the service-file - + read -p"Did you adapt the file boswatch.service (y/n)? " response - + if [ "$response" == "y" ]; then # 2 Copy the file cp boswatch.service /etc/systemd/system @@ -29,17 +29,23 @@ if [ "$action" == "i" ]; then # 5 post the status systemctl status boswatch.service - else + elif [ "$response" == "n" ]; then echo "Please adapt your personal boswatch.service-file" exit 1 + else + echo "Invalid input - please try again" + exit 1 fi -else # we want to remove the service +elif [ "$action" == "r" ]; then # we want to remove the service # stop it... systemctl stop boswatch.service - + # disable it systemctl disable boswatch.service # and remove it rm /etc/systemd/system/boswatch.service +else # error handling + echo "Invalid input - please try again" + exit 1 fi From 7fa4a97ba42663fc6c329d7f092f9b64275fd612 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 3 Oct 2017 20:23:48 +0200 Subject: [PATCH 22/32] edit CL --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3f07e2..d317f04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -### __[v2.2.2]__ - unreleased +### __[v2.3]__ - unreleased ##### Added - Installations Script für Services [#316](https://github.com/Schrolli91/BOSWatch/pull/316) ##### Changed From 594ddb44529f87e2c04aef8775397db1addd96c0 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 3 Oct 2017 22:26:05 +0200 Subject: [PATCH 23/32] add config debug prints --- boswatch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boswatch.py b/boswatch.py index f21937b..08f8403 100755 --- a/boswatch.py +++ b/boswatch.py @@ -221,6 +221,10 @@ try: configHandler.checkConfig("FMS") configHandler.checkConfig("ZVEI") configHandler.checkConfig("POC") + configHandler.checkConfig("Plugins") + configHandler.checkConfig("Filters") + if globalVar.config.getint("NMAHandler","enableHandler"): + configHandler.checkConfig("NMAHandler") except: # we couldn't work without config -> exit logging.critical("cannot read config file") From cc66f4547ac1737200b11ba8283586818f291095 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 4 Oct 2017 06:16:37 +0200 Subject: [PATCH 24/32] print python vers nr in log --- boswatch.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/boswatch.py b/boswatch.py index 08f8403..46f864f 100755 --- a/boswatch.py +++ b/boswatch.py @@ -18,11 +18,12 @@ GitHUB: https://github.com/Schrolli91/BOSWatch import logging import logging.handlers -import argparse # for parse the args -import ConfigParser # for parse the config file -import os # for log mkdir -import time # for time.sleep() -import subprocess # for starting rtl_fm and multimon-ng +import argparse # for parse the args +import ConfigParser # for parse the config file +import os # for log mkdir +import sys # for py version +import time # for time.sleep() +import subprocess # for starting rtl_fm and multimon-ng from includes import globalVars # Global variables from includes import MyTimedRotatingFileHandler # extension of TimedRotatingFileHandler @@ -164,6 +165,7 @@ try: logging.debug("SW Version: %s",globalVars.versionNr) logging.debug("Branch: %s",globalVars.branch) logging.debug("Build Date: %s",globalVars.buildDate) + logging.debug("Python Vers: %s",sys.version) logging.debug("BOSWatch given arguments") if args.test: logging.debug(" - Test-Mode!") From 33706e5f2d0f644ee3d5db2e610c95cdb4bfd1a2 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 4 Oct 2017 06:30:53 +0200 Subject: [PATCH 25/32] little fix --- boswatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boswatch.py b/boswatch.py index 46f864f..ff2cb74 100755 --- a/boswatch.py +++ b/boswatch.py @@ -225,7 +225,7 @@ try: configHandler.checkConfig("POC") configHandler.checkConfig("Plugins") configHandler.checkConfig("Filters") - if globalVar.config.getint("NMAHandler","enableHandler"): + if globalVars.config.getint("NMAHandler","enableHandler"): configHandler.checkConfig("NMAHandler") except: # we couldn't work without config -> exit From 37829740949168f501910d3d3518c0701bbd13c2 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 4 Oct 2017 06:43:44 +0200 Subject: [PATCH 26/32] edit log output --- boswatch.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/boswatch.py b/boswatch.py index ff2cb74..df1e5e6 100755 --- a/boswatch.py +++ b/boswatch.py @@ -225,8 +225,7 @@ try: configHandler.checkConfig("POC") configHandler.checkConfig("Plugins") configHandler.checkConfig("Filters") - if globalVars.config.getint("NMAHandler","enableHandler"): - configHandler.checkConfig("NMAHandler") + #NMAHandler is outputed below except: # we couldn't work without config -> exit logging.critical("cannot read config file") From 18425e2be22db01f388343fa84b913e7bb21ecbf Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 4 Oct 2017 08:54:23 +0200 Subject: [PATCH 27/32] Update install.sh Clean up old statements Fix a few typos (#318) --- install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 4b549a8..38a4530 100644 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ function exitcodefunction { echo "Action: $action on $module failed." echo "Exitcode: $errorcode" echo "" - echo " -> If you want to open an Issue at https://github.com/Schrolli91/BOSWatch/issues" + echo " -> If you want to open an issue at https://github.com/Schrolli91/BOSWatch/issues" echo " please post the logfile, located at $boswatchpath/install/setup_log.txt" exit 1 else @@ -82,7 +82,7 @@ for (( i=1; i<=$#; i=$i+2 )); do *) branch=master ;; esac ;; - -p|--path) echo " !!! WARNING: you install BOSWATCH to alternative path !!! "; boswatchpath=$arg2 ;; + -p|--path) echo " !!! WARNING: you'll install BOSWATCH to alternative path !!! "; boswatchpath=$arg2 ;; *) echo "Internal error!" ; exit 1 ;; esac @@ -205,15 +205,14 @@ tput cup 15 5 echo "-> configure..........................." cd $boswatchpath/ chmod +x * -echo $'# BOSWatch - blacklist the DVB drivers to avoid conflict with the SDR driver\n blacklist dvb_usb_rtl28xxu \n blacklist rtl2830\n blacklist dvb_usb_v2\n blacklist dvb_core' >> /etc/modprobe.d/boswatch_blacklist_sdr.conf +echo $'# BOSWatch - blacklist the DVB drivers to avoid conflicts with the SDR driver\n blacklist dvb_usb_rtl28xxu \n blacklist rtl2830\n blacklist dvb_usb_v2\n blacklist dvb_core' >> /etc/modprobe.d/boswatch_blacklist_sdr.conf tput cup 17 1 echo "BOSWatch is now installed in $boswatchpath/" echo "Installation ready!" tput cup 19 3 -echo "Watch out: to run BOSWatch you have to generate and modify the config.ini!" -echo "Do the following steps to have a running version of BOSWatch:" -echo "sudo cp $boswatchpath/BOSWatch/config/config.template.ini $boswatchpath/BOSWatch/config/config.ini" +echo "Watch out: to run BOSWatch you have to modify the config.ini!" +echo "Do the following step to do so:" echo "sudo nano $boswatchpath/BOSWatch/config/config.ini" echo "and modify the config as you need. This step is optional if you are upgrading an old version of BOSWatch. " From 8961148ecf16a7a79d475c9c36ab0933dc79591c Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sun, 8 Oct 2017 10:19:53 +0200 Subject: [PATCH 28/32] Update Konzept.md --- Konzept.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Konzept.md b/Konzept.md index 6e3a5b1..7903dcc 100644 --- a/Konzept.md +++ b/Konzept.md @@ -2,6 +2,7 @@ ============ +Python 3 Verpacken der Funktionalitäten in Klassen um OOP-Grundsätze zu erreichen. @@ -12,11 +13,13 @@ Verpacken der Funktionalitäten in Klassen um OOP-Grundsätze zu erreichen. - reine Dekodierung mittels rtl-fm und multimon - Keine Filter usw. nur die Dekoder, Daten verpacken, verschicken - per TCP Socket an den Server + - versch Eingabequellen (DVB-T Stick, Audio Eingang) ### Server: - Empfängt die TCP Socket Pakete der einzelnen Clients - Durch doubleFiltering fallen doppelt eingehende Alarme der Clienten sowieso raus - - Danach Filterung usw. dann call an die plugins + - Danach Filterung nach neuen Filterkonzept + - dann call an die plugins From b5d860f5cbdf010bc5f0f99485e3ac2bb9a7b4c5 Mon Sep 17 00:00:00 2001 From: Philip Giuliani Date: Mon, 9 Oct 2017 14:11:26 +0200 Subject: [PATCH 29/32] Fix output paths of the install script --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 5c251ea..1d214d9 100644 --- a/install.sh +++ b/install.sh @@ -213,8 +213,8 @@ echo "Installation ready!" tput cup 19 3 echo "Watch out: to run BOSWatch you have to generate and modify the config.ini!" echo "Do the following steps to have a running version of BOSWatch:" -echo "sudo cp $boswatchpath/BOSWatch/config/config.template.ini $boswatchpath/BOSWatch/config/config.ini" -echo "sudo nano $boswatchpath/BOSWatch/config/config.ini" +echo "sudo cp $boswatchpath/config/config.template.ini $boswatchpath/config/config.ini" +echo "sudo nano $boswatchpath/config/config.ini" echo "and modify the config as you need. This step is optional if you are upgrading an old version of BOSWatch. " tput cnorm From 886dcf63d08770fe6203efc89c27555790c9d8e9 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sat, 21 Oct 2017 22:14:06 +0200 Subject: [PATCH 30/32] edit CL --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d317f04..399d5c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ##### Deprecated ##### Removed ##### Fixed +- Schreibfehler der Pfadangabe im Installer [#317](https://github.com/Schrolli91/BOSWatch/pull/317) - Schreibfehler in Service Readme [#313](https://github.com/Schrolli91/BOSWatch/issues/313) - Einige Code-Style Verbesserungen [#310](https://github.com/Schrolli91/BOSWatch/pull/310) ##### Security From 5ec51d56cf721dca79816f00ac291c380a72ea35 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sat, 21 Oct 2017 22:33:08 +0200 Subject: [PATCH 31/32] edit CL for release --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 399d5c0..6346714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,18 @@ # Changelog -### __[v2.3]__ - unreleased + +### __[v2.2.2]__ - 21.10.2017 ##### Added - Installations Script für Services [#316](https://github.com/Schrolli91/BOSWatch/pull/316) ##### Changed - Telegram Plugin importiert Google Maps Funktionen nur noch wenn API Key eingetragen ist [#315](https://github.com/Schrolli91/BOSWatch/pull/315) - Versions Nummer und Branch Name getrennt [3fed1ac](https://github.com/Schrolli91/BOSWatch/commit/3fed1ac12af8690213766e0e81d71c237530ed2c) ##### Deprecated -##### Removed +- Beta Branch wird mit nächstem Update entfernt [Forum](http://boswatch.de/index.php?thread/16-beta-branch-abschaffen/&postID=113#post113) ##### Fixed - Schreibfehler der Pfadangabe im Installer [#317](https://github.com/Schrolli91/BOSWatch/pull/317) - Schreibfehler in Service Readme [#313](https://github.com/Schrolli91/BOSWatch/issues/313) - Einige Code-Style Verbesserungen [#310](https://github.com/Schrolli91/BOSWatch/pull/310) -##### Security ### __[v2.2.1]__ - 19.09.2017 From c15de920ac2456c9f9ebe09923043e302c8d99de Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sat, 21 Oct 2017 22:34:37 +0200 Subject: [PATCH 32/32] edit CL --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6346714..cf8fdf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### __[2.3]__ - unreleased +##### Added +##### Changed +##### Deprecated +##### Removed +##### Fixed +##### Security + ### __[v2.2.2]__ - 21.10.2017 ##### Added