FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: kermi am 14 Februar 2013, 19:01:24

Titel: Plot Durchschnittstemperatur Tag/Monat
Beitrag von: kermi am 14 Februar 2013, 19:01:24
Schönen guten Abend,

nach tagelangem rumprobieren und etlichen grauen haaren suche ich doch mal hilfe hier:

ich habe ein logfile in das die täglichen und monatlichen durchschnittstemperaturen eingetragen werden.
sieht folgt aus:

2012-03-01_00:03:13 Wettersensor avg_day T: 9.9  H: 85  W: 4.3  R: 0.7
2012-03-01_00:03:13 Wettersensor avg_month T: 6.5  H: 51  W: 34.5  R: 7.3
2012-03-02_00:06:58 Wettersensor avg_day T: 9.5  H: 85  W: 4.9  R: 0.3
2012-03-03_00:00:34 Wettersensor avg_day T: 6.0  H: 85  W: 4.0  R: 0.0


jetzt habe ich mir versucht daraus einen plot zu erstellen mit folgendem code:

# Display the power reported by the KS300
# Corresponding FileLog definition:
# define <filelogname> FileLog /var/log/fhem/Wettersensor_month-%Y.log <emdevname>:(avg_month|avg_day).*

set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "

set title '<L1>'
set y2label "Month (Grad)"
set ylabel "Day (Grad)"
set grid
set ytics
set y2tics
set format y "%.1f"
set format y2 "%.1f"

#FileLog 5:avg_month:0:
#FileLog 5:avg_day:0:

plot \
  "< awk '/avg_month:/{print $1, $5}' <IN>"\
     using 1:2 axes x1y2 smooth csplines title 'Month (C)' with fsteps ls l4fill lw 2, \
  "< awk '/avg_day:{print $1, $5}' <IN>"\
     using 1:2 axes x1y1 smooth csplines title 'Day (C)' with fsteps ls l3fill


tja, was soll ich sagen ... irgendwo ist aber mächtig der wurm drinne. ich will eigentlich nur die temperatur angezeigt bekommen, es wird aber garnichts angezeigt.
vielleicht sieht einer der spezialisten ohne grossen aufwand den fehler.
werte ich die falsche spalte aus?

gruss
stephan
Titel: Aw: Plot Durchschnittstemperatur Tag/Monat
Beitrag von: Rohan am 15 Februar 2013, 11:13:06
Hmmm.... fehlender "/"?

Zitat von: kermi schrieb am Do, 14 Februar 2013 19:01...
plot \
  "< awk '/avg_month:/{print $1, $5}' <IN>"\
     using 1:2 axes x1y2 smooth csplines title 'Month (C)' with fsteps ls l4fill lw 2, \
  "< awk '/avg_day:/{print $1, $5}' <IN>"\
     using 1:2 axes x1y1 smooth csplines title 'Day (C)' with fsteps ls l3fill

Gruß
Thomas