Gnuplot-Cron per Webinterface
This commit is contained in:
parent
e6a9deba00
commit
73605e58bc
3 changed files with 53 additions and 45 deletions
|
@ -1,44 +0,0 @@
|
|||
# x-Achse enthält Zeitinformation
|
||||
set xdata time
|
||||
# Zeitformat zur Eingabe
|
||||
set timefmt x "%Y/%m/%d\ %H:%M:%S"
|
||||
# Zeitformat zur Beschriftung der x-Achse
|
||||
set format x "%d.%m %H:%M"
|
||||
set grid #Gitter anzeigen
|
||||
set terminal svg size 1200,800
|
||||
|
||||
|
||||
set title "Innentemperaturen"
|
||||
set ylabel 'Temperatur (°C)'
|
||||
set output "innen.svg"
|
||||
plot "gnuplot.txt" using 1:3 title 'Innentemperatur' with lines , \
|
||||
"gnuplot.txt" using 1:4 title 'Gerätetemperatur 1' with lines , \
|
||||
"gnuplot.txt" using 1:6 title 'Gerätetemperatur 2' with lines
|
||||
|
||||
set title "Aussentemperaturen"
|
||||
set ylabel 'Temperatur (°C)'
|
||||
set output "aussen.svg"
|
||||
plot "gnuplot.txt" using 1:5 title 'Bodentemperatur' with lines , \
|
||||
"gnuplot.txt" using 1:7 title 'Luftfeuchtesensor' with lines , \
|
||||
"gnuplot.txt" using 1:10 title 'Aussentemperatur' with lines
|
||||
|
||||
set title "Luftdruck"
|
||||
set ylabel 'hPa'
|
||||
set nokey #keine Legende
|
||||
set output "luftdruck.svg"
|
||||
plot "gnuplot.txt" using 1:9 title 'Luftdruck' with lines
|
||||
|
||||
set title "Luftfeuchtigkeit"
|
||||
set ylabel '% rel. Luftfeuchte'
|
||||
set output "luftfeuchte.svg"
|
||||
plot "gnuplot.txt" using 1:8 title 'Luftfeuchte' with lines
|
||||
|
||||
set title "Luftqualität"
|
||||
set ylabel 'relativer Wert'
|
||||
set output "luftqualität.svg"
|
||||
plot "gnuplot.txt" using 1:12 title 'Luftqualität' with lines
|
||||
|
||||
set title "Prozessortemperatur"
|
||||
set ylabel 'Temperatur (°C)'
|
||||
set output "prozessor.svg"
|
||||
plot "gnuplot.txt" using 1:11 title 'Prozessortemperatur' with lines
|
|
@ -17,9 +17,17 @@ if(isset($_GET["aktion"])) {
|
|||
echo "<script type='text/javascript'>alert('Achtung!\\nDie Aufzeichnung ist gestoppt');</script>";
|
||||
}
|
||||
break;
|
||||
case gnuplot:
|
||||
$datei = fopen("/var/www/gnuplot_erstellen","w");
|
||||
echo fwrite($datei, "Hallo Welt",100);
|
||||
fclose($datei);
|
||||
}
|
||||
} else {
|
||||
echo "Parameter wird benötigt";
|
||||
$datei = fopen("/var/www/gnuplot_erstellen","w");
|
||||
echo fwrite($datei, "Hallo Welt",100);
|
||||
fclose($datei);
|
||||
|
||||
}
|
||||
//exec("sudo service aufzeichnung stop",$ausgabe,$fehler);
|
||||
//exec("gnuplot /home/pi/Temperaturmessung/Einstellungen.plt");
|
||||
|
|
44
diverses/Einstellungen.plt
Normal file
44
diverses/Einstellungen.plt
Normal file
|
@ -0,0 +1,44 @@
|
|||
# x-Achse enthält Zeitinformation
|
||||
set xdata time
|
||||
# Zeitformat zur Eingabe
|
||||
set timefmt x "%Y/%m/%d\ %H:%M:%S"
|
||||
# Zeitformat zur Beschriftung der x-Achse
|
||||
set format x "%d.%m %H:%M"
|
||||
set grid #Gitter anzeigen
|
||||
set terminal svg size 1200,800
|
||||
|
||||
|
||||
set title "Innentemperaturen"
|
||||
set ylabel 'Temperatur (°C)'
|
||||
set output "/var/www/gnuplot/innen.svg"
|
||||
plot "/home/pi/Temperaturmessung/gnuplot.txt" using 1:3 title 'Innentemperatur' with lines , \
|
||||
"/home/pi/Temperaturmessung/gnuplot.txt" using 1:4 title 'Gerätetemperatur 1' with lines , \
|
||||
"/home/pi/Temperaturmessung/gnuplot.txt" using 1:6 title 'Gerätetemperatur 2' with lines
|
||||
|
||||
set title "Aussentemperaturen"
|
||||
set ylabel 'Temperatur (°C)'
|
||||
set output "/var/www/gnuplot/aussen.svg"
|
||||
plot "/home/pi/Temperaturmessung/gnuplot.txt" using 1:5 title 'Bodentemperatur' with lines , \
|
||||
"/home/pi/Temperaturmessung/gnuplot.txt" using 1:7 title 'Luftfeuchtesensor' with lines , \
|
||||
"/home/pi/Temperaturmessung/gnuplot.txt" using 1:10 title 'Aussentemperatur' with lines
|
||||
|
||||
set title "Luftdruck"
|
||||
set ylabel 'hPa'
|
||||
set nokey #keine Legende
|
||||
set output "/var/www/gnuplot/luftdruck.svg"
|
||||
plot "/home/pi/Temperaturmessung/gnuplot.txt" using 1:9 title 'Luftdruck' with lines
|
||||
|
||||
set title "Luftfeuchtigkeit"
|
||||
set ylabel '% rel. Luftfeuchte'
|
||||
set output "/var/www/gnuplot/luftfeuchte.svg"
|
||||
plot "/home/pi/Temperaturmessung/gnuplot.txt" using 1:8 title 'Luftfeuchte' with lines
|
||||
|
||||
set title "Luftqualität"
|
||||
set ylabel 'relativer Wert'
|
||||
set output "/var/www/gnuplot/luftqualität.svg"
|
||||
plot "/home/pi/Temperaturmessung/gnuplot.txt" using 1:12 title 'Luftqualität' with lines
|
||||
|
||||
set title "Prozessortemperatur"
|
||||
set ylabel 'Temperatur (°C)'
|
||||
set output "/var/www/gnuplot/prozessor.svg"
|
||||
plot "/home/pi/Temperaturmessung/gnuplot.txt" using 1:11 title 'Prozessortemperatur' with lines
|
Reference in a new issue