From 5f441075587e0b2e34cbbeaad08cf5d7dadd4855 Mon Sep 17 00:00:00 2001 From: tilman Date: Thu, 16 Apr 2020 20:48:25 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9Edl5000sql.sh=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upload in Snapshot-Tabelle hinzugefügt - schnelleres Auslesen durch Webseite möglich. --- dl5000sql.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dl5000sql.sh b/dl5000sql.sh index 181dd8b..5104ce7 100644 --- a/dl5000sql.sh +++ b/dl5000sql.sh @@ -2,15 +2,13 @@ # dl5000sql.sh reads data from the DL5000 weather station and writes it up to a MySQL/MariaDB. # https://code.hw12.org/tilman/dl5000 # -# Version 0.0.1 - 15.04.2020 "Proof of concept" -# # License GPL3.0 or later # https://code.hw12.org/tilman/dl5000/src/branch/master/LICENSE #Log file and temporary txt. PFAD=$(dirname "$(readlink -e "$0")"); FILE=$PFAD"/"$DATE."txt"; -LOG=$PFAD"/dl5000sql.log"; +LOG=$PFAD"/edl.log"; TMP0="dl5000.tmp"; TMP1="dl5001.tmp"; @@ -20,8 +18,9 @@ TMP2="dl5002.tmp"; DB_USER="dbuser"; DB_PASS="dbpasswd"; DB_HOST="dbhost"; -DB_NAME="dbname"; +DB_NAME="dbname" DB_TAB="TempData"; +DB_TAB_SNAP="TempSnapshot"; #Get date and round to nearest 5min (for harmonized use with data from other scripts in pChart) DATE_RAW=$(/bin/date +%s); @@ -76,6 +75,7 @@ done #Send data to database mysql -u $DB_USER -p$DB_PASS -h $DB_HOST -D $DB_NAME <