FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: Pf@nne am 17 Februar 2015, 19:20:38

Titel: Plot von on/off Werten
Beitrag von: Pf@nne am 17 Februar 2015, 19:20:38
Moin,

Mit diesem Plot lasse ich mir den Status meiner Wärmepumpe anzeigen:
# Created by FHEM/98_SVG.pm, 2015-02-16 20:21:55
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 ''
set ytics ("On" 1, "Off" 0)
set y2tics
set grid
set ylabel ""
set y2label ""
set yrange [-0,1:1,1]

#FileLog 4:EXT_DS18B20_00000689e447.T\x3a::
#FileLog 4:EXT_DS18B20_00000689d882.T\x3a::
#FileLog 3:WP_Status.*:1:$fld[2]=~"on"?1:0

plot "<IN>" using 1:2 axes x1y2 title 'Rücklauf' ls l2fill lw 1 with lines,\
     "<IN>" using 1:2 axes x1y2 title 'Vorlauf' ls l0fill lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'WP Status' ls l6fill lw 1 with steps


Das klappt auch soweit ganz prima.

Jedoch habe ich noch folgenden "Schönheitsfehler":
Wenn die WP Anläuft wird einmalig ein "on" geloggt, im Plot geht der "Strich" auch auf on.
Im Zeitverlauf wird der Graph jedoch erst ausgefüllt wenn auch das "off" erscheint.
Ist soweit auch logisch, aber optisch nicht so schön.

Gibt es hierfür einen Parameter, oder muss ich das "on" z.B. mit at jede Minute zusätzlich loggen?

Gruß
Pf@nne
Titel: Antw:Plot von on/off Werten
Beitrag von: Puschel74 am 17 Februar 2015, 19:27:03
addLog wäre ein heißer Kandidat dafür.