diff --git a/20220615_data_backup.csv b/20220615_data_backup.csv new file mode 100755 index 0000000..49ab551 --- /dev/null +++ b/20220615_data_backup.csv @@ -0,0 +1,5 @@ +uid,matrikelnummer,name,expire +0x40x1f0x440x120x950x540x80,11806418,mike,2033-08-28 +0x40x320x450xa0x350x4b0x80,11770981,smartie,2033-05-28 +0x40x670xd0x320x500x380x80,01525520,flix,2033-05-28 +0x40x4c0x800x320x500x380x80,01326142,pet,2033-05-28 \ No newline at end of file diff --git a/README.md b/README.md index 18fbd27..c811e2b 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ Erweitert von Peter (pet@fet.at) Läuft auf einem raspberry pi, mit einem PN532 über I2C verbunden. +Der Watchdog ist sehr simpel und prüft nur ob das Python-Skript noch antwortet. Wenn der Raspi abgesteckt wird, kein Internet mehr hat, oder etwas anderes schief läuft versagt das. + ###Setup @@ -18,10 +20,12 @@ Braucht folgende sachen im "sudo crontab -e": ``` 0 1 * * * sudo reboot #reboot the machine every day at 01:00 -* * * * * sudo python /home/zutritt/Documents/sarah/sarah_crontab_sytem_functions.py #open the system functions once a minute, to check if we need to reboot +* * * * * sudo python /home/zutritt/Documents/sarah/sarah_crontab_sytem_functions.py #open the system functions once a minute, to check if we need to reboot: +*/5 * * * * sudo python /home/zutritt/Documents/sarah/src/sarahs_watchdog.py > /home/zutritt/logs/cronlog_watchdog 2>&1 #run the watchdog once every 5 minutes to chekc if sarah is online @reboot sh /home/zutritt/launcher.sh > /home/zutritt/logs/cronlog 2>&1 + ``` diff --git a/reader_data/sarah/data.csv b/reader_data/sarah/data.csv index 49ab551..403ca22 100755 --- a/reader_data/sarah/data.csv +++ b/reader_data/sarah/data.csv @@ -2,4 +2,5 @@ uid,matrikelnummer,name,expire 0x40x1f0x440x120x950x540x80,11806418,mike,2033-08-28 0x40x320x450xa0x350x4b0x80,11770981,smartie,2033-05-28 0x40x670xd0x320x500x380x80,01525520,flix,2033-05-28 -0x40x4c0x800x320x500x380x80,01326142,pet,2033-05-28 \ No newline at end of file +0x40x4c0x800x320x500x380x80,01326142,pet,2033-05-28 +0x40x1e0x810x320x500x380x80,01125925,damadmai,2033-05-28 \ No newline at end of file diff --git a/reader_data/sarah/logs/20220621_debug_log.csv b/reader_data/sarah/logs/20220621_debug_log.csv index 526c994..37a2fd4 100644 --- a/reader_data/sarah/logs/20220621_debug_log.csv +++ b/reader_data/sarah/logs/20220621_debug_log.csv @@ -170,4 +170,155 @@ 21/06/2022 13:10:02, answered the watchdog. 21/06/2022 13:15:02, answered the watchdog. 21/06/2022 13:20:02, answered the watchdog. -21/06/2022 13:25:02, answered the watchdog. \ No newline at end of file +21/06/2022 13:25:02, answered the watchdog. +21/06/2022 13:30:02, answered the watchdog. +21/06/2022 13:35:03, answered the watchdog. +21/06/2022 13:40:02, answered the watchdog. +21/06/2022 13:45:01, answered the watchdog. +21/06/2022 13:50:02, answered the watchdog. +21/06/2022 13:55:02, answered the watchdog. +21/06/2022 14:00:02, answered the watchdog. +21/06/2022 14:05:02, answered the watchdog. +21/06/2022 14:10:02, answered the watchdog. +21/06/2022 14:15:02, answered the watchdog. +21/06/2022 14:20:02, answered the watchdog. +21/06/2022 14:25:01, answered the watchdog. +21/06/2022 14:29:04, UID:0x40x1e0x810x320x500x380x80, !No known UID! no entry! (data.csv reloaded) +21/06/2022 14:29:06, UID:0x40x1e0x810x320x500x380x80, !No known UID! no entry! (data.csv reloaded) +21/06/2022 14:29:11, UID:0x40x1f0x440x120x950x540x80, Name:mike, Matrikelnummer:11806418, !OKAY! access granted. +21/06/2022 14:30:02, answered the watchdog. +21/06/2022 14:30:27, UID:0x40x1e0x810x320x500x380x80, !No known UID! no entry! (data.csv reloaded) +21/06/2022 14:30:28, UID:0x40x1e0x810x320x500x380x80, !No known UID! no entry! (data.csv reloaded) +21/06/2022 14:32:03, UID:0x40x1e0x810x320x500x380x80, !No known UID! no entry! (data.csv reloaded) +21/06/2022 14:32:04, UID:0x40x1e0x810x320x500x380x80, Name:damadmai, Matrikelnummer:1125925, !OKAY! access granted. +21/06/2022 14:32:49, UID:0x740x20x920xf5, !No known UID! no entry! (data.csv reloaded) +21/06/2022 14:32:50, UID:0x740x20x920xf5, !No known UID! no entry! (data.csv reloaded) +21/06/2022 14:35:02, answered the watchdog. +21/06/2022 14:40:02, answered the watchdog. +21/06/2022 14:45:02, answered the watchdog. +21/06/2022 14:50:02, answered the watchdog. +21/06/2022 14:55:02, answered the watchdog. +21/06/2022 15:00:02, answered the watchdog. +21/06/2022 15:05:02, answered the watchdog. +21/06/2022 15:10:02, answered the watchdog. +21/06/2022 15:15:02, answered the watchdog. +21/06/2022 15:17:53, UID:0x40x4c0x800x320x500x380x80, Name:pet, Matrikelnummer:1326142, !OKAY! access granted. +21/06/2022 15:20:02, answered the watchdog. +21/06/2022 15:24:35, UID:0x40x1f0x440x120x950x540x80, Name:mike, Matrikelnummer:11806418, !OKAY! access granted. +21/06/2022 15:24:51, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:24:52, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:24:53, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:25:00, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:25:00, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:25:01, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:25:02, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:25:02, answered the watchdog. +21/06/2022 15:25:02, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:25:11, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:25:14, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:25:14, UID:0x6d0x590x4c0x48, !No known UID! no entry! (data.csv reloaded) +21/06/2022 15:30:01, answered the watchdog. +21/06/2022 15:35:02, answered the watchdog. +21/06/2022 15:40:02, answered the watchdog. +21/06/2022 15:45:02, answered the watchdog. +21/06/2022 15:50:02, answered the watchdog. +21/06/2022 15:55:02, answered the watchdog. +21/06/2022 16:00:02, answered the watchdog. +21/06/2022 16:05:01, answered the watchdog. +21/06/2022 16:10:03, answered the watchdog. +21/06/2022 16:15:02, answered the watchdog. +21/06/2022 16:20:01, answered the watchdog. +21/06/2022 16:25:02, answered the watchdog. +21/06/2022 16:30:02, answered the watchdog. +21/06/2022 16:35:02, answered the watchdog. +21/06/2022 16:40:02, answered the watchdog. +21/06/2022 16:45:02, answered the watchdog. +21/06/2022 16:50:02, answered the watchdog. +21/06/2022 16:55:02, answered the watchdog. +21/06/2022 17:00:02, answered the watchdog. +21/06/2022 17:05:02, answered the watchdog. +21/06/2022 17:10:02, answered the watchdog. +21/06/2022 17:15:02, answered the watchdog. +21/06/2022 17:20:02, answered the watchdog. +21/06/2022 17:25:02, answered the watchdog. +21/06/2022 17:30:02, answered the watchdog. +21/06/2022 17:30:37, UID:0x40x670xd0x320x500x380x80, Name:flix, Matrikelnummer:1525520, !OKAY! access granted. +21/06/2022 17:35:01, answered the watchdog. +21/06/2022 17:40:03, answered the watchdog. +21/06/2022 17:45:02, answered the watchdog. +21/06/2022 17:50:01, answered the watchdog. +21/06/2022 17:55:03, answered the watchdog. +21/06/2022 18:00:02, answered the watchdog. +21/06/2022 18:05:02, answered the watchdog. +21/06/2022 18:10:02, answered the watchdog. +21/06/2022 18:13:31, UID:0x40x320x450xa0x350x4b0x80, Name:smartie, Matrikelnummer:11770981, !OKAY! access granted. +21/06/2022 18:15:02, answered the watchdog. +21/06/2022 18:20:02, answered the watchdog. +21/06/2022 18:25:02, answered the watchdog. +21/06/2022 18:30:02, answered the watchdog. +21/06/2022 18:35:01, answered the watchdog. +21/06/2022 18:40:03, answered the watchdog. +21/06/2022 18:45:02, answered the watchdog. +21/06/2022 18:50:02, answered the watchdog. +21/06/2022 18:55:01, answered the watchdog. +21/06/2022 19:00:02, answered the watchdog. +21/06/2022 19:05:02, answered the watchdog. +21/06/2022 19:10:01, answered the watchdog. +21/06/2022 19:15:03, answered the watchdog. +21/06/2022 19:20:02, answered the watchdog. +21/06/2022 19:25:02, answered the watchdog. +21/06/2022 19:30:02, answered the watchdog. +21/06/2022 19:35:02, answered the watchdog. +21/06/2022 19:40:03, answered the watchdog. +21/06/2022 19:45:02, answered the watchdog. +21/06/2022 19:50:01, answered the watchdog. +21/06/2022 19:55:03, answered the watchdog. +21/06/2022 20:00:02, answered the watchdog. +21/06/2022 20:05:02, answered the watchdog. +21/06/2022 20:10:02, answered the watchdog. +21/06/2022 20:13:23, UID:0x40x670xd0x320x500x380x80, Name:flix, Matrikelnummer:1525520, !OKAY! access granted. +21/06/2022 20:15:02, answered the watchdog. +21/06/2022 20:20:01, answered the watchdog. +21/06/2022 20:25:03, answered the watchdog. +21/06/2022 20:30:02, answered the watchdog. +21/06/2022 20:35:01, answered the watchdog. +21/06/2022 20:40:03, answered the watchdog. +21/06/2022 20:45:02, answered the watchdog. +21/06/2022 20:50:02, answered the watchdog. +21/06/2022 20:55:02, answered the watchdog. +21/06/2022 21:00:03, answered the watchdog. +21/06/2022 21:05:02, answered the watchdog. +21/06/2022 21:10:01, answered the watchdog. +21/06/2022 21:15:02, answered the watchdog. +21/06/2022 21:20:02, answered the watchdog. +21/06/2022 21:25:01, answered the watchdog. +21/06/2022 21:30:02, answered the watchdog. +21/06/2022 21:35:01, answered the watchdog. +21/06/2022 21:40:02, answered the watchdog. +21/06/2022 21:45:02, answered the watchdog. +21/06/2022 21:50:02, answered the watchdog. +21/06/2022 21:55:02, answered the watchdog. +21/06/2022 22:00:02, answered the watchdog. +21/06/2022 22:05:02, answered the watchdog. +21/06/2022 22:10:01, answered the watchdog. +21/06/2022 22:15:03, answered the watchdog. +21/06/2022 22:20:02, answered the watchdog. +21/06/2022 22:25:01, answered the watchdog. +21/06/2022 22:30:02, answered the watchdog. +21/06/2022 22:35:02, answered the watchdog. +21/06/2022 22:40:02, answered the watchdog. +21/06/2022 22:45:02, answered the watchdog. +21/06/2022 22:50:01, answered the watchdog. +21/06/2022 22:55:02, answered the watchdog. +21/06/2022 23:00:02, answered the watchdog. +21/06/2022 23:05:02, answered the watchdog. +21/06/2022 23:10:01, answered the watchdog. +21/06/2022 23:15:03, answered the watchdog. +21/06/2022 23:20:02, answered the watchdog. +21/06/2022 23:25:01, answered the watchdog. +21/06/2022 23:30:03, answered the watchdog. +21/06/2022 23:35:02, answered the watchdog. +21/06/2022 23:40:02, answered the watchdog. +21/06/2022 23:45:02, answered the watchdog. +21/06/2022 23:50:02, answered the watchdog. +21/06/2022 23:55:02, answered the watchdog. \ No newline at end of file diff --git a/reader_data/sarah/logs/20220621_entrance_log.csv b/reader_data/sarah/logs/20220621_entrance_log.csv index 5eb4346..b7a0e8f 100644 --- a/reader_data/sarah/logs/20220621_entrance_log.csv +++ b/reader_data/sarah/logs/20220621_entrance_log.csv @@ -4,3 +4,10 @@ mike,21/06/2022 11:44:29 mike,21/06/2022 12:12:24 Manual entry via website, 21/06/2022 12:56:44 Manual entry via website, 21/06/2022 12:58:11 +mike,21/06/2022 14:29:15 +damadmai,21/06/2022 14:32:08 +pet,21/06/2022 15:17:57 +mike,21/06/2022 15:24:39 +flix,21/06/2022 17:30:41 +smartie,21/06/2022 18:13:35 +flix,21/06/2022 20:13:27