diff --git a/back/pialert.conf b/back/pialert.conf index eeeb4131..a7ca413b 100644 --- a/back/pialert.conf +++ b/back/pialert.conf @@ -1,4 +1,4 @@ -VERSION = '2.51' +VERSION = '2.52' VERSION_YEAR = '2021' VERSION_DATE = '2021-01-11' diff --git a/back/pialert.py b/back/pialert.py index 29b971cc..b1fa855e 100644 --- a/back/pialert.py +++ b/back/pialert.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Pi.Alert v2.51 / 2021-01-11 +# Pi.Alert v2.52 / 2021-01-11 # Puche 2020 # GNU GPLv3 @@ -645,11 +645,12 @@ def create_new_devices (): # Pi-hole - Insert events for new devices # NOT STRICYLY NECESARY (Devices can be created through Current_Scan) + # Bugfix #2 - Pi-hole devices w/o IP print_log ('New devices - 3 Pi-hole Events') sql.execute ("""INSERT INTO Events (eve_MAC, eve_IP, eve_DateTime, eve_EventType, eve_AdditionalInfo, eve_PendingAlertEmail) - SELECT PH_MAC, PH_IP, ?, 'New Device', + SELECT PH_MAC, IFNULL (PH_IP,'-'), ?, 'New Device', '(Pi-Hole) ' || PH_Vendor, 1 FROM PiHole_Network WHERE NOT EXISTS (SELECT 1 FROM Devices @@ -657,13 +658,14 @@ def create_new_devices (): (startTime, ) ) # Pi-hole - Create New Devices + # Bugfix #2 - Pi-hole devices w/o IP print_log ('New devices - 4 Pi-hole Create devices') sql.execute ("""INSERT INTO Devices (dev_MAC, dev_name, dev_Vendor, dev_LastIP, dev_FirstConnection, dev_LastConnection, dev_ScanCycle, dev_AlertEvents, dev_AlertDeviceDown, dev_PresentLastScan) - SELECT PH_MAC, PH_Name, PH_Vendor, PH_IP, ?, ?, - 1, 1, 0, 1 + SELECT PH_MAC, PH_Name, PH_Vendor, IFNULL (PH_IP,'-'), + ?, ?, 1, 1, 0, 1 FROM PiHole_Network WHERE NOT EXISTS (SELECT 1 FROM Devices WHERE dev_MAC = PH_MAC) """, diff --git a/docs/report_sample_1.html b/docs/report_sample_1.html index afd1dc47..f9382d87 100644 --- a/docs/report_sample_1.html +++ b/docs/report_sample_1.html @@ -16,7 +16,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -59,7 +59,7 @@
Report Date: 2021-01-11 08:00 Report Date: 2021-01-01 08:00 Scan Cycle: Internet Server: pi4
Internet IP Changed 2021-01-02 08:20:00 2021-01-01 08:00:00 1.1.1.0 Previous Internet IP: 1.1.0.0
- +
Puche 2021 Pi.Alert 2.51   /   2021-01-11 Pi.Alert 2.50   /   2021-01-01 GNU GPLv3
diff --git a/docs/report_sample_2.html b/docs/report_sample_2.html index 52e1ceef..b4d3968b 100644 --- a/docs/report_sample_2.html +++ b/docs/report_sample_2.html @@ -16,7 +16,7 @@ - + @@ -43,13 +43,13 @@ - + - + @@ -72,7 +72,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -122,7 +122,7 @@
Report Date: 2021-01-11 08:00 Report Date: 2021-01-01 08:00 Scan Cycle: 1 Server: pi4
f8:d0:27:00:00:00 2021-01-02 08:20:00 2021-01-01 08:00:00 192.168.1.20 Seiko Epson Corporation
c8:6c:3d:00:00:00 2021-01-02 08:20:00 2021-01-01 08:00:00 192.168.1.181 Amazon Technologies Inc.
0c:ee:99:00:00:00 2021-01-02 08:20:00 2021-01-01 08:00:00 192.168.1.171 Alexa - Echo
94:0c:98:00:00:00 2021-01-02 08:20:00 2021-01-01 08:00:00 192.168.1.132 Connected Person 1 - iPhone 11
5c:41:5a:00:00:00 2021-01-02 08:20:00 2021-01-01 08:00:00 192.168.1.170 IP Changed Alexa Dot
- +
Puche 2021 Pi.Alert 2.51   /   2021-01-11 Pi.Alert 2.50   /   2021-01-01 GNU GPLv3
diff --git a/front/php/templates/footer.php b/front/php/templates/footer.php index ef963fb0..f5436d21 100644 --- a/front/php/templates/footer.php +++ b/front/php/templates/footer.php @@ -4,7 +4,7 @@ © 2021 Puche
- Pi.alert  2.51  (2021-01-11) + Pi.alert  2.52  (2021-01-11)
diff --git a/install/create_tar.sh b/install/create_tar.sh index a0f13be9..a0b0c02a 100644 --- a/install/create_tar.sh +++ b/install/create_tar.sh @@ -1,9 +1,16 @@ # -PIALERT_VERSION=2.50 +PIALERT_VERSION=2.52 PIALERT_DEV_PATH=/media/WD_4TB/dev cd $PIALERT_DEV_PATH + tar tvf pialert/install/pialert_$PIALERT_VERSION.tar | wc -l rm pialert/install/pialert_$PIALERT_VERSION.tar + tar cvf pialert/install/pialert_$PIALERT_VERSION.tar --exclude="pialert/install" --exclude="pialert/.git" pialert | wc -l +rm pialert/install/pialert_latest.tar +ln -s pialert_$PIALERT_VERSION.tar pialert/install/pialert_latest.tar + + + diff --git a/install/pialert_2.50.tar b/install/pialert_2.52.tar similarity index 99% rename from install/pialert_2.50.tar rename to install/pialert_2.52.tar index 8742a306..fc656590 100644 Binary files a/install/pialert_2.50.tar and b/install/pialert_2.52.tar differ diff --git a/install/pialert_latest.tar b/install/pialert_latest.tar index 8742a306..fc656590 100644 Binary files a/install/pialert_latest.tar and b/install/pialert_latest.tar differ diff --git a/log/report_output.html b/log/report_output.html index 509aba0e..6c3fcd82 100644 --- a/log/report_output.html +++ b/log/report_output.html @@ -16,7 +16,7 @@ - + @@ -35,7 +35,7 @@
Report Date: 2021-01-04 18:08 Report Date: 2021-01-01 08:00 Scan Cycle: 1 Server: pi4
- +
Puche 2021 Pi.Alert DEV 2.51   /   2021-01-11 Pi.Alert 2.50   /   2021-01-01 GNU GPLv3
diff --git a/log/report_output.txt b/log/report_output.txt index f0cbd7a9..f403733a 100644 --- a/log/report_output.txt +++ b/log/report_output.txt @@ -2,7 +2,7 @@ Pi.Alert Report ======================================== - Report Date: 2021-01-11 00:00 + Report Date: 2021-01-01 08:00 Scan Cycle: 1 Server: pi4 @@ -12,4 +12,4 @@ Events ---------------------------------------------------------------------- -Puche 2021 Pi.Alert 2.51 / 2021-01-11 GNU GPLv3 +Puche 2021 Pi.Alert 2.50 / 2021-01-01 GNU GPLv3