Ignore:
Timestamp:
11/30/2014 09:21:35 PM (10 years ago)
Author:
Norbert Wigbels <njw@…>
Branches:
master
Children:
cf9f2dc
Parents:
5ce93a3
Message:

Gaszaehler mit RRDTool-Auswertung

Location:
de.wigbels.ruby/hothotread
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • de.wigbels.ruby/hothotread/draw_graphs.sh

    r5ce93a3 r53aed1c  
    1 #!/bin/bash
     1#!/bin/bash
     2#DEF:temps9=../hotcoldrain/weather.rrd:temps9:AVERAGE \
     3#LINE1:temps9#4e9a06:"Temperatur aussen\n" \
    24
    3 rrdtool graph gastest.png -w 800 -h 500 -s 'now - 1 day' -e 'now' DEF:gas=energy.rrd:gas:AVERAGE LINE2:gas#204a87:"Gas Liter"
     5rrdtool graph web/gas_1tag.png \
     6-w 800 -h 500 \
     7-s 'now - 1 day' -e 'now' \
     8--title "Gasverbrauch im Tagesverlauf" \
     9--font TITLE:12 --vertical-label="Liter/Stunde" \
     10DEF:gas=gas.rrd:gas:AVERAGE \
     11CDEF:gash=gas,120,* \
     12VDEF:gastotal=gas,TOTAL \
     13GPRINT:gastotal:"Total %6.0lf m3 Gas" \
     14LINE2:gash#c17d11:"Gasverbrauch"
     15
     16rrdtool graph web/gas_1woche.png \
     17-w 800 -h 500 \
     18-s 'now - 1 week' -e 'now' \
     19--title "Gasverbrauch im Wochenverlauf" \
     20--font TITLE:12 --vertical-label="Liter/Tag" \
     21DEF:gas=gas.rrd:gas:AVERAGE \
     22CDEF:gasd=gas,2880,* \
     23VDEF:gastotal=gas,TOTAL \
     24GPRINT:gastotal:"Total %6.0lf m3 Gas" \
     25LINE2:gasd#c17d11:"Gasverbrauch/Tag"
     26
     27rrdtool graph web/gas_1monat.png \
     28-w 800 -h 500 \
     29-s 'now - 1 month' -e 'now' \
     30--title "Gasverbrauch im Monatsverlauf" \
     31--font TITLE:12 --vertical-label="Liter/Tag" \
     32DEF:gas=gas.rrd:gas:AVERAGE \
     33CDEF:gasd=gas,2880,* \
     34VDEF:gastotal=gas,TOTAL \
     35GPRINT:gastotal:"Total %6.0lf m3 Gas" \
     36LINE2:gasd#c17d11:"Gasverbrauch/Tag"
     37
  • de.wigbels.ruby/hothotread/hothotpiper.rb

    r5ce93a3 r53aed1c  
    2424include PiPiper
    2525
    26 @mypath = File.expand_path(File.dirname(__FILE__))
     26$mypath = File.expand_path(File.dirname(__FILE__))
    2727
    2828
     
    3030  puts('added 10 liter of gas to sensor-database')
    3131  Net::HTTP.get(URI.parse('http://www.wigbels.net/cgi-bin/hhw.rb?sensorid=1&data=10'))
    32   system("rrdtool update #{@mypath}/energy.rrd N:10:U:U")
     32  system("rrdtool update #{$mypath}/gas.rrd N:10")
    3333end
    3434
Note: See TracChangeset for help on using the changeset viewer.