FHEM Forum

FHEM => fhem-users => Thema gestartet von: Guest am 17 Oktober 2012, 08:10:57

Titel: Tages und Monatsplot für 1-Wire Gaszähler (OWCOUNT)
Beitrag von: Guest am 17 Oktober 2012, 08:10:57
Originally posted by: <email address deleted>

Hallo Zusammen,

ich benötige etwas Hilfe bei der Verbesserung meiner Tages und Monatsplots.
Ich verwende das OWCOUNT Modul von PAH ein Hoyyb Board Dual Counter /
Reed-Kontakt am Gaszähler und eine FB7390.

Bisher ist es mir gelungen in einem Graph den Tagesverlauf des
Zählerstandes, und in einem anderen Graph den Tagesendwert des
Zählerstandes zu loggen und zu plotten.

Die Log-Files sehen dann wie folgt aus....


2012-10-13_00:00:33 Gaszaehler D_12: 2012-10-12_23:59:59 A: 263.0 cts, Gasverbrauch: 36732.4 m3
2012-10-14_00:02:56 Gaszaehler D_13: 2012-10-13_23:59:59 A: 263.0 cts, Gasverbrauch: 36737.0 m3
2012-10-15_00:11:54 Gaszaehler D_14: 2012-10-14_23:59:59 A: 263.0 cts, Gasverbrauch: 36740.8 m3
2012-10-16_00:06:14 Gaszaehler D_15: 2012-10-15_23:59:59 A: 263.0 cts, Gasverbrauch: 36745.4 m3


2012-10-17_07:01:19 Gaszaehler A: 263.0 cts  0.00 cts/h Gasverbrauch: 36750.200 m3  0.00 m3/h
2012-10-17_07:16:19 Gaszaehler A: 263.0 cts  0.00 cts/h Gasverbrauch: 36750.200 m3  0.00 m3/h
2012-10-17_07:31:19 Gaszaehler A: 263.0 cts  0.00 cts/h Gasverbrauch: 36750.200 m3  0.00 m3/h
2012-10-17_07:46:19 Gaszaehler A: 263.0 cts  0.00 cts/h Gasverbrauch: 36750.200 m3  0.00 m3/h


*Nun die geplanten Verbesserungen:
1)  Wie kann ich im Tagesverlauf des Zählers den kumulierten Tageswert
zeichnen?
2) Wie kann ich den statt dem Zählerstand bei Tageswechsel den
Tagesverbrauch loggen? (Also statt 36750, 2 m3 will ich 2,65 m3 als Balken
darstellen)*

define FileLog_Gasverbrauch_gesamt FileLog
../Generic-FlashDisk-21/Gasverbrauch_gesamt-%Y.log Gaszaehler:D_[0-9]+.*
attr FileLog_Gasverbrauch_gesamt logtype power6:Power,text


define weblink_Gasverbrauch_gesamt weblink fileplot
FileLog_Gasverbrauch_gesamt:power6:CURRENT
attr weblink_Gasverbrauch_gesamt fixedrange month
attr weblink_Gasverbrauch_gesamt label "Gas_gesamt Min $data{min1}, Max
$data{max1}, Last $data{currval1}"



define FileLog_Gasverbrauch FileLog
../Generic-FlashDisk-11/Gasverbrauch-%Y.log Gaszaehler
attr FileLog_Gasverbrauch logtype gas:Power,text


define weblink_Gasverbrauch weblink fileplot
FileLog_Gasverbrauch:gas3:CURRENT
attr weblink_Gasverbrauch label "Gasverbrauch Min $data{min1}, Max
$data{max1}, Last $data{currval1}"




Anbei meine gplot Files (Hier ein Zwischenstand die zweite Achse klappt ja
noch nicht)

*gas3*.gplot

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

set title ''
set y2label "Zaehlerstand(kWh)"
set ylabel "Day (kWh)"
set grid
set ytics
set y2tics
set format y "%.1f"
set format y2 "%.1f"

#FileLog 9:Gasverbrauch:0:
#FileLog 9:Gasverbrauch:0:

plot \
  "< awk '/Zaehlerstand:/{print $1, $9}' "\
     using 1:2 axes x1y2 smooth csplines title 'Month (kWh)' with
fsteps ls l1fill lw 2, \
  "< awk '/CGasverbrauch:{print $1, $9}' "\
     using 1:2 axes x1y1 smooth csplines title 'Day (kWh)' with fsteps
ls l1fill


*power6.gplot *(hier irgendwo gemopst und angepasst)
set terminal png transparent size crop
set output '.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "

set title ''
set ylabel "Power (KW)"
set y2label "Power (KW)"
set grid
set ytics
set y2tics
set format y "%.1f"
set format y2 "%.1f"

#FileLog 9::0:
#FileLog 8::0:

plot \
  "< awk '/Zaehlerstand:/{print $1, $9}' "\
     using 1:2 axes x1y2 smooth csplines title 'CUM_DAY (kWh)' with
fsteps ls l2fill lw 2, \
  "< awk '/CGasverbrauch:{print $1, $8}' "\
     using 1:2 axes x1y1 smooth csplines title 'Zählerstand (kWh)' with
fsteps
ls l1fill

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com