diff --git a/README.md b/README.md
index ec20d688..b203ee4b 100644
--- a/README.md
+++ b/README.md
@@ -12,16 +12,16 @@ JavaScript)*
# Docker image 🐳
[](https://github.com/jokob-sk/Pi.Alert/actions/workflows/docker.yml)
+
+
+
[](https://hub.docker.com/r/jokobsk/pi.alert)
-
-
-
-
+
-
+
🥇 Pi.Alert credit goes to [pucherot/Pi.Alert](https://github.com/pucherot/Pi.Alert).
🐳 Docker Image: [jokobsk/Pi.Alert](https://registry.hub.docker.com/r/jokobsk/pi.alert).
diff --git a/back/pialert.py b/back/pialert.py
index 09845f6c..618059f2 100644
--- a/back/pialert.py
+++ b/back/pialert.py
@@ -45,7 +45,6 @@ else:
execfile (PIALERT_PATH + "/config/version.conf")
execfile (PIALERT_PATH + "/config/pialert.conf")
-
#===============================================================================
# MAIN
#===============================================================================
@@ -56,6 +55,10 @@ def main ():
global sql_connection
global sql
+ # Empty stdout and stderr .log files for debugging if needed
+ write_file (LOG_PATH + '/stderr.log', '')
+ write_file (LOG_PATH + '/stdout.log', '')
+
# Header
print ('\nPi.Alert ' + VERSION +' ('+ VERSION_DATE +')')
print ('---------------------------------------------------------')
@@ -1374,9 +1377,11 @@ def email_reporting ():
'TABLE_EVENTS', mail_text_events, mail_html_events)
# DEBUG - Write output emails for testing
- if True :
- write_file (LOG_PATH + '/report_output.txt', mail_text)
- write_file (LOG_PATH + '/report_output.html', mail_html)
+ #if True :
+ # write_file (LOG_PATH + '/report_output.txt', mail_text)
+ # write_file (LOG_PATH + '/report_output.html', mail_html)
+
+
# Send Mail
if mail_section_Internet == True or mail_section_new_devices == True \
@@ -1492,6 +1497,12 @@ def write_file (pPath, pText):
file.write (pText)
file.close()
+#-------------------------------------------------------------------------------
+def append_file_binary (pPath, input):
+ file = open (pPath, 'ab')
+ file.write (input)
+ file.close()
+
#-------------------------------------------------------------------------------
def append_line_to_file (pPath, pText):
# append the line depending using the correct python version
@@ -1553,7 +1564,16 @@ def send_webhook (_Text):
else:
_WEBHOOK_URL = WEBHOOK_URL
- requests.post(_WEBHOOK_URL, json.dumps(_json_payload))
+ p = subprocess.Popen(["curl","-i","-X", "GET" ,"-H", "Content-Type:application/json" ,"-d", json.dumps(_json_payload), _WEBHOOK_URL], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+
+ stdout, stderr = p.communicate()
+
+ # write stdout and stderr into .log files for debugging if needed
+ if stderr != None:
+ append_file_binary (LOG_PATH + '/stderr.log', stderr)
+ if stdout != None:
+ append_file_binary (LOG_PATH + '/stdout.log', stdout)
+
#===============================================================================
# DB
diff --git a/config/pialert.conf b/config/pialert.conf
index d037bf16..14b32b54 100644
--- a/config/pialert.conf
+++ b/config/pialert.conf
@@ -40,7 +40,6 @@ WEBHOOK_URL = 'http://n8n.local:5555/webhook-test/aaaaaaaa-aaaa-aaaa
# ----------------------
REPORT_NTFY = False
NTFY_TOPIC = 'replace_my_secure_topicname_91h889f28'
-REPORT_DASHBOARD_URL = 'http://pi.alert/'
# PUSHSAFER (https://www.pushsafer.com/) settings
# ----------------------
diff --git a/dockerfiles/README.md b/dockerfiles/README.md
index 51c2ad75..d241e65b 100644
--- a/dockerfiles/README.md
+++ b/dockerfiles/README.md
@@ -1,14 +1,14 @@
[](https://github.com/jokob-sk/Pi.Alert/actions/workflows/docker.yml)
+
+
+
[](https://hub.docker.com/r/jokobsk/pi.alert)
-
-
-
-
+
-
+
# 🐳 A docker image for Pi.Alert
@@ -46,7 +46,10 @@ Default Port
* ... or by mapping the files individually `pialert.conf:/home/pi/pialert/config/pialert.conf` and `version.conf:/home/pi/pialert/config/version.conf`
4. Set the `TZ` environment variable to your current time zone (e.g.`Europe/Paris`). Find your time zone [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
5. Database backup
- * The DB is stored under `/home/pi/pialert/db/pialert.db`. Map this file to a persistent location (see [Examples](https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#page_facing_up-examples) for details). If facing issues (AJAX errors, can't write to DB, etc, make sure permissions are set correctly, alternatively check the logs under `/home/pi/pialert/log`)
+ * Download the [original DB from GitHub](https://github.com/jokob-sk/Pi.Alert/blob/main/db/pialert.db).
+ * Map the `pialert.db` file (⚠ not folder) from above to `/home/pi/pialert/db/pialert.db` (see [Examples](https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#-examples) for details).
+ * If facing issues (AJAX errors, can't write to DB, etc,) make sure permissions are set correctly, alternatively check the logs under `/home/pi/pialert/log`.
+ * To solve permission issues you can also try to create a DB backup and then run a DB Restore via the **Maintenance > Backup/Restore** section.
6. The container supports mapping to local User nad Group IDs. Specify the enviroment variables `HOST_USER_ID` and `HOST_USER_GID` if needed.
7. You can override the port by specifying the `PORT` env variable.
diff --git a/front/help_faq.php b/front/help_faq.php
index 0827bb7a..543e1218 100644
--- a/front/help_faq.php
+++ b/front/help_faq.php
@@ -65,6 +65,19 @@ if ($_SESSION["login"] != 1)
+
pialert.db file (/home/pi/pialert/db/pialert.db (see Examples for details)./home/pi/pialert/log.