Plot will mit Firmata nicht hinhauen.

Begonnen von Cihan, 23 Februar 2015, 23:33:16

Vorheriges Thema - Nächstes Thema

Cihan

Guten Abend liebe Leute,

auch heute habe ich wieder ein Anliegen. Diesmal geht es darum um einen Plot zu erstellen.
Ich möchte ein Diagramm erstellen, welches mir meine Zirkulationspumpe darstellt. Leider bleibt das Plott permanent bei off stehen.

Hier der Code für das Filelog
define FileLog_pumpe FileLog ./log/flpumpe-%Y.log DI03
attr FileLog_pumpe nrarchive text
define SVG_FileLog_pumpe_1 SVG FileLog_pumpe:SVG_FileLog_pumpe_1:CURRENT
attr SVG_FileLog_pumpe_1 room Heizung


Und das steht momentan drin.

2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:04 DI03 reading: off
2015-02-23_22:19:04 DI03 reading: on
2015-02-23_22:19:34 DI03 reading: on
2015-02-23_22:20:42 DI03 Initialized
2015-02-23_22:20:48 DI03 reading: on
2015-02-23_22:43:37 DI03 reading: off
2015-02-23_22:43:37 DI03 reading: on
2015-02-23_22:43:37 DI03 reading: off
2015-02-23_22:43:37 DI03 reading: on
2015-02-23_22:43:37 DI03 reading: off
2015-02-23_23:17:30 DI03 reading: on
2015-02-23_23:17:30 DI03 reading: off
2015-02-23_23:17:30 DI03 reading: on
2015-02-23_23:17:30 DI03 reading: off
2015-02-23_23:17:30 DI03 reading: on


Und das die SVG

# Created by FHEM/98_SVG.pm, 2015-02-23 23:21:59
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 'Pumpenlaufzeit'
set ytics ("Aus" 0, "An" 1)
set y2tics
set grid ytics
set ylabel "On/Off"
set y2label ""
set yrange [-0.1:1-1]

#FileLog_pumpe 4:DI03.reading\x3a:0:$fld[2]=~"on"?1:0

plot "<IN>" using 1:2 axes x1y2 title 'Line 1' ls l0 lw 1 with steps


Das steht bei preprocessed

get FileLog_pumpe CURRENT INT 2015-02-23_00:00:00 2015-02-24_00:00:01 4:DI03.reading\x3a:0:$fld[2]=~"on"?1:0

2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:04 0
2015-02-23_22:19:34 0
2015-02-23_22:20:48 0
2015-02-23_22:43:37 0
2015-02-23_22:43:37 0
2015-02-23_22:43:37 0
2015-02-23_22:43:37 0
2015-02-23_22:43:37 0
2015-02-23_23:17:30 0
2015-02-23_23:17:30 0
2015-02-23_23:17:30 0
2015-02-23_23:17:30 0
2015-02-23_23:17:30 0
#4:DI03.reading\x3a:0:$fld[2]=~"on"?1:0

OK


So sieht das Bild aus

(http://fs1.directupload.net/images/150223/tgtkiarp.png)

Wo mache ich denn was falsch?
RPi4 Shelly Zigbee

nesges

@fld enthält die Logzeile an Spaces gesplittet, beginnend bei Index 0. Du brauchst $fld[3], wenn ich nicht irre. Ansonsten http://www.fhemwiki.de/wiki/Creating_Plots

Cihan

RPi4 Shelly Zigbee