From 860f3d5e7dcb50da0d709fdb1cf3d9f296b310e4 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sun, 22 Sep 2019 09:43:37 +0200 Subject: [PATCH 01/12] prepare dev for next release --- CHANGELOG.md | 8 ++++++++ includes/globalVars.py | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab81cb5..27766f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### __[v2.4.4]__ - unreleased +##### Added +##### Changed +##### Deprecated +##### Removed +##### Fixed +##### Security + ### __[v2.4.3]__ - 22.09.1991 ##### Added diff --git a/includes/globalVars.py b/includes/globalVars.py index 3f197cb..d0edd2a 100644 --- a/includes/globalVars.py +++ b/includes/globalVars.py @@ -9,9 +9,9 @@ Global variables """ # version info -versionNr = "2.4.3" -branch = "master" -buildDate = "22.09.2019" +versionNr = "2.4.4" +branch = "dev" +buildDate = "unreleased" # Global variables config = 0 From 51709d0a613cdf7b5dc9053b7f9eb6a3ceba24a7 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 24 Sep 2019 10:08:40 +0200 Subject: [PATCH 02/12] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27766f3..f19cb6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ##### Security -### __[v2.4.3]__ - 22.09.1991 +### __[v2.4.3]__ - 22.09.2019 ##### Added - Telegram-Plugin: In der generierten Übersichtkarte wird eine Anfahrtsroute integriert. Der Abfahrtsort ist konfiguierbar. [#382](https://github.com/Schrolli91/BOSWatch/pull/382) - Hue-Plugin: Geräte die mit einer Hue bridge verbunden sind können aus BOSWatch ein- und ausgeschaltet werden. [#394](https://github.com/Schrolli91/BOSWatch/issues/394) From 82448a737a2874e18d2dab24d760b4c5ad1b831e Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 26 Sep 2019 21:25:11 +0200 Subject: [PATCH 03/12] Update poc.py --- includes/decoders/poc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/decoders/poc.py b/includes/decoders/poc.py index 6ab9aa0..6fd33e1 100644 --- a/includes/decoders/poc.py +++ b/includes/decoders/poc.py @@ -34,6 +34,7 @@ def isAllowed(poc_id): """ allowed = 0 + has_geo = False # 1.) If allowed RICs is set, only they will path, # If RIC is the right one return True, else False From 9e0e4485201ed3da6c4864ebf87530bc37b7557e Mon Sep 17 00:00:00 2001 From: kruegerj Date: Fri, 4 Oct 2019 14:05:48 +0200 Subject: [PATCH 04/12] Update MySQL.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit INSERT in die Pocsag Tabelle schlägt fehl, da function bei MySQL 8.0 als reserviertes Wort nicht einfach als Spaltenname genutzt werden kann. Siehe auch https://dev.mysql.com/doc/refman/8.0/en/keywords.html Daher habe ich nun die Spaltennamen escaped, damit funktioniert wieder ein INSERT in MySQL 8.0 Datenbanken --- plugins/MySQL/MySQL.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/MySQL/MySQL.py b/plugins/MySQL/MySQL.py index c38410f..489dbe6 100644 --- a/plugins/MySQL/MySQL.py +++ b/plugins/MySQL/MySQL.py @@ -104,21 +104,21 @@ def run(typ,freq,data): logging.debug("Insert %s", typ) if typ == "FMS": - cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableFMS")+" (time, fms, status, direction, directionText, tsi, description) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["fms"], data["status"], data["direction"], data["directionText"], data["tsi"], data["description"])) + cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableFMS")+" (`time`, `fms`, `status`, `direction`, `directionText`, `tsi`, `description`) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["fms"], data["status"], data["direction"], data["directionText"], data["tsi"], data["description"])) elif typ == "ZVEI": - cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableZVEI")+" (time, zvei, description) VALUES (FROM_UNIXTIME(%s),%s,%s)", (data["timestamp"], data["zvei"], data["description"])) + cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableZVEI")+" (`time`, `zvei`, `description`) VALUES (FROM_UNIXTIME(%s),%s,%s)", (data["timestamp"], data["zvei"], data["description"])) elif typ == "POC": if isSignal(data["ric"]): if globalVars.config.getint("POC","netIdent_history"): - cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (time,ric) VALUES (NOW(), '"+data["ric"]+"');") + cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (`time`,`ric`) VALUES (NOW(), '"+data["ric"]+"');") else: cursor.execute("UPDATE "+globalVars.config.get("MySQL","tableSIG")+" SET time = NOW() WHERE ric = '"+data["ric"]+"';") if cursor.rowcount == 0: - cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (time,ric) VALUES (NOW(), '"+data["ric"]+"');") + cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (`time`,`ric`) VALUES (NOW(), '"+data["ric"]+"');") else: - cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tablePOC")+" (time, ric, function, functionChar, msg, bitrate, description) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["ric"], data["function"], data["functionChar"], data["msg"], data["bitrate"], data["description"])) + cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tablePOC")+" (`time`, `ric`, `function`, `functionChar`, `msg`, `bitrate`, `description`) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["ric"], data["function"], data["functionChar"], data["msg"], data["bitrate"], data["description"])) else: logging.warning("Invalid Typ: %s", typ) From 2da87a46dd6ae612f66d2a3f340cae72ce6db62e Mon Sep 17 00:00:00 2001 From: kruegerj Date: Fri, 4 Oct 2019 14:09:05 +0200 Subject: [PATCH 05/12] Update boswatch.sql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Key auf die RIC Spalte hinzugefügt --- plugins/MySQL/boswatch.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/MySQL/boswatch.sql b/plugins/MySQL/boswatch.sql index 6f93861..77f35c8 100644 --- a/plugins/MySQL/boswatch.sql +++ b/plugins/MySQL/boswatch.sql @@ -70,7 +70,8 @@ CREATE TABLE IF NOT EXISTS `bos_pocsag` ( `msg` TEXT NOT NULL, `bitrate` INT(4) NOT NULL, `description` TEXT NOT NULL, - PRIMARY KEY (`ID`) + PRIMARY KEY (`ID`), + KEY `POCSAG_RIC_IDX` (`ric`) ) ENGINE=MYISAM DEFAULT CHARSET=UTF8 AUTO_INCREMENT=1; -- rename old columns including little error-prevention From fa5acd4d79b3795ad07c8cce884127d784af84b0 Mon Sep 17 00:00:00 2001 From: kruegerj Date: Fri, 4 Oct 2019 20:39:39 +0200 Subject: [PATCH 06/12] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f19cb6f..d8b33af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ### __[v2.4.4]__ - unreleased ##### Added ##### Changed +Index für die RIC Adresse hinzugefügt #411(https://github.com/Schrolli91/BOSWatch/issues/394) +INSERT Befehl für MySQL 8.x angepasst, Spaltennamen escaped #410(https://github.com/Schrolli91/BOSWatch/issues/410) ##### Deprecated ##### Removed ##### Fixed From edb2329ab7cf4af6b0f62a31d502caa6a5045913 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Fri, 4 Oct 2019 21:58:47 +0200 Subject: [PATCH 07/12] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8b33af..c3b436a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,8 @@ ### __[v2.4.4]__ - unreleased ##### Added ##### Changed -Index für die RIC Adresse hinzugefügt #411(https://github.com/Schrolli91/BOSWatch/issues/394) -INSERT Befehl für MySQL 8.x angepasst, Spaltennamen escaped #410(https://github.com/Schrolli91/BOSWatch/issues/410) +- MySQL-Plugin: Index für die RIC Adresse hinzugefügt [#411](https://github.com/Schrolli91/BOSWatch/issues/394) +- MySQL-Plugin: INSERT Befehl für MySQL 8.x angepasst, Spaltennamen escaped [#410](https://github.com/Schrolli91/BOSWatch/issues/410) ##### Deprecated ##### Removed ##### Fixed From 58c3a9134bb0d9f093f5918328d7e50d14f1c0b2 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Fri, 4 Oct 2019 21:59:25 +0200 Subject: [PATCH 08/12] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3b436a..69e7a18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### __[v2.4.4]__ - unreleased ##### Added ##### Changed -- MySQL-Plugin: Index für die RIC Adresse hinzugefügt [#411](https://github.com/Schrolli91/BOSWatch/issues/394) +- MySQL-Plugin: Index für die RIC Adresse hinzugefügt [#411](https://github.com/Schrolli91/BOSWatch/issues/311) - MySQL-Plugin: INSERT Befehl für MySQL 8.x angepasst, Spaltennamen escaped [#410](https://github.com/Schrolli91/BOSWatch/issues/410) ##### Deprecated ##### Removed From 9a8a00ef83edbaae15c032e1e05c8a1605490d27 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Fri, 4 Oct 2019 21:59:47 +0200 Subject: [PATCH 09/12] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69e7a18..5fbf24f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### __[v2.4.4]__ - unreleased ##### Added ##### Changed -- MySQL-Plugin: Index für die RIC Adresse hinzugefügt [#411](https://github.com/Schrolli91/BOSWatch/issues/311) +- MySQL-Plugin: Index für die RIC Adresse hinzugefügt [#411](https://github.com/Schrolli91/BOSWatch/issues/411) - MySQL-Plugin: INSERT Befehl für MySQL 8.x angepasst, Spaltennamen escaped [#410](https://github.com/Schrolli91/BOSWatch/issues/410) ##### Deprecated ##### Removed From 85fcba43a50026930efc10826a11335cb4646b3d Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Mon, 7 Oct 2019 12:16:32 +0200 Subject: [PATCH 10/12] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fbf24f..6ee1b7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,8 @@ - Telegram-Plugin: In der generierten Übersichtkarte wird eine Anfahrtsroute integriert. Der Abfahrtsort ist konfiguierbar. [#382](https://github.com/Schrolli91/BOSWatch/pull/382) - Hue-Plugin: Geräte die mit einer Hue bridge verbunden sind können aus BOSWatch ein- und ausgeschaltet werden. [#394](https://github.com/Schrolli91/BOSWatch/issues/394) ##### Changed -- FFAgent Plugin: zusätzliches OrderedDict "alarmHeadersOrdered" implementiert um das HTTP Header Ordering sicherzustellen. Zusätzlich den HTTP Request mittels Session implementiert um das Header Ordering zu bewahren. Zusätzliches Debug Logging für die Header implementiert. [#356] (https://github.com/Schrolli91/BOSWatch/issues/356) -- POC-Decoder: Im POC-Text wird nach einem RegEx, welcher Koordinaten enthält, gesucht. Werden diese gefunden, so stehen zwei neu befüllte Data-Felder Lon bzw Lat zur Verfügung. +- FFAgent Plugin: zusätzliches OrderedDict "alarmHeadersOrdered" implementiert um das HTTP Header Ordering sicherzustellen. Zusätzlich den HTTP Request mittels Session implementiert um das Header Ordering zu bewahren. Zusätzliches Debug Logging für die Header implementiert. [#356](https://github.com/Schrolli91/BOSWatch/issues/356) +- POC-Decoder: Im POC-Text wird nach einem RegEx, welcher Koordinaten enthält, gesucht. Werden diese gefunden, so stehen zwei neu befüllte Data-Felder Lon bzw Lat zur Verfügung. [#405](https://github.com/Schrolli91/BOSWatch/pull/405) ##### Fixed - Asynchrone Alarme: Bei asynchroner Verarbeitung von schnell aufeinander folgenden Alarmen, wurde der Inhalt der Objekte typ, freq und data bereits vor dem Abschluss der Verarbeitung eines Alarms wieder überschrieben. Ergebnis hiervon war die Vermischung von RICs und Texten unterschiedlicher Alarme. Lösung über copy.deepcopy() [#394](https://github.com/Schrolli91/BOSWatch/issues/394) From 057945be47cb481056ecbc5084653f2c27e22b39 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Mon, 14 Oct 2019 09:10:27 +0200 Subject: [PATCH 11/12] cherrypick hotfix from master (#414) --- includes/decoders/poc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/decoders/poc.py b/includes/decoders/poc.py index 6fd33e1..e5b9b6d 100644 --- a/includes/decoders/poc.py +++ b/includes/decoders/poc.py @@ -99,6 +99,8 @@ def decode(freq, decoded): @return: nothing @exception: Exception if POCSAG decode failed """ + has_geo = False + try: bitrate = 0 From 13073ec75a0302cc1ec9d483860b87ffdbdcf813 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Mon, 14 Oct 2019 09:17:26 +0200 Subject: [PATCH 12/12] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ee1b7b..659e00b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - POC-Decoder: Im POC-Text wird nach einem RegEx, welcher Koordinaten enthält, gesucht. Werden diese gefunden, so stehen zwei neu befüllte Data-Felder Lon bzw Lat zur Verfügung. [#405](https://github.com/Schrolli91/BOSWatch/pull/405) ##### Fixed - Asynchrone Alarme: Bei asynchroner Verarbeitung von schnell aufeinander folgenden Alarmen, wurde der Inhalt der Objekte typ, freq und data bereits vor dem Abschluss der Verarbeitung eines Alarms wieder überschrieben. Ergebnis hiervon war die Vermischung von RICs und Texten unterschiedlicher Alarme. Lösung über copy.deepcopy() [#394](https://github.com/Schrolli91/BOSWatch/issues/394) +- POC-Decoder: Bug wegen nicht zugeweisener Variable 'has_geo' [#410](https://github.com/Schrolli91/BOSWatch/issues/413) [HOTFIX] ### __[v2.4.2]__ - 11.03.2019