#!/bin/bash 
#DEF:temps9=../hotcoldrain/weather.rrd:temps9:AVERAGE \
#LINE1:temps9#4e9a06:"Temperatur aussen\n" \

rrdtool graph web/gas_1tag.png \
-w 800 -h 500 \
-s 'now - 1 day' -e 'now' \
--title "Gasverbrauch im Tagesverlauf" \
--font TITLE:12 --vertical-label="Liter/Stunde" \
DEF:gas=gas.rrd:gas:AVERAGE \
CDEF:gash=gas,120,* \
VDEF:gastotal=gas,TOTAL \
GPRINT:gastotal:"Total %6.0lf Liter Gas" \
LINE2:gash#c17d11:"Gasverbrauch"

rrdtool graph web/gas_1woche.png \
-w 800 -h 500 \
-s 'now - 1 week' -e 'now' \
--title "Gasverbrauch im Wochenverlauf" \
--font TITLE:12 --vertical-label="Liter/Tag" \
DEF:gas=gas.rrd:gas:AVERAGE \
CDEF:gasd=gas,2880,* \
VDEF:gastotal=gas,TOTAL \
GPRINT:gastotal:"Total %6.0lf Liter Gas" \
LINE2:gasd#c17d11:"Gasverbrauch/Tag"

rrdtool graph web/gas_1monat.png \
-w 800 -h 500 \
-s 'now - 1 month' -e 'now' \
--title "Gasverbrauch im Monatsverlauf" \
--font TITLE:12 --vertical-label="Liter/Tag" \
DEF:gas=gas.rrd:gas:AVERAGE \
CDEF:gasd=gas,2880,* \
VDEF:gastotal=gas,TOTAL \
GPRINT:gastotal:"Total %6.0lf Liter Gas" \
LINE2:gasd#c17d11:"Gasverbrauch/Tag"

rrdtool graph web/gas_1jahr.png \
-w 800 -h 500 \
-s 'now - 1 year' -e 'now' \
--title "Gasverbrauch im Jahresverlauf" \
--font TITLE:12 --vertical-label="Liter/Tag" \
DEF:gas=gas.rrd:gas:AVERAGE \
CDEF:gasd=gas,2880,* \
VDEF:gastotal=gas,TOTAL \
GPRINT:gastotal:"Total %6.0lf Liter Gas" \
LINE2:gasd#c17d11:"Gasverbrauch/Tag"



rrdtool graph web/consum_1day.png   -s 'now -1 day' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"
rrdtool graph web/consum_1week.png   -s 'now -1 week' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"
rrdtool graph web/consum_1month.png   -s 'now -1 month' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"
rrdtool graph web/consum_1year.png   -s 'now -1 year' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"

rrdtool graph web/counter_1week.png   -s 'now -1 week' -e 'now'   -X 0 -Y -A   DEF:counter=power.rrd:counter:LAST   LINE2:counter#000000:"Zählerstand [kWh]"
rrdtool graph web/counter_1month.png   -s 'now -1 month' -e 'now'   -X 0 -Y -A   DEF:counter=power.rrd:counter:LAST   LINE2:counter#000000:"Zählerstand [kWh]"
