Changeset aa10f5c


Ignore:
Timestamp:
03/12/2019 02:56:41 PM (6 years ago)
Author:
Norbert Wigbels <frickel@…>
Branches:
master
Children:
7c920d4
Parents:
b86cdd7
Message:

Wasser, finally

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

Legend:

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

    rb86cdd7 raa10f5c  
    2828rrdtool 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]"
    2929rrdtool 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]"
     30
     31
     32rrdtool graph web/wconsum_10minutes.png   -s 'now -10 minutes' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     33rrdtool graph web/wconsum_30minutes.png   -s 'now -30 minutes' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     34rrdtool graph web/wconsum_1hour.png   -s 'now -1 hour' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch[L]"
     35rrdtool graph web/wconsum_3hour.png   -s 'now -3 hour' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     36rrdtool graph web/wconsum_6hour.png   -s 'now -6 hour' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     37rrdtool graph web/wconsum_12hour.png   -s 'now -12 hour' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     38rrdtool graph web/wconsum_1day.png   -s 'now -1 day' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     39rrdtool graph web/wconsum_1week.png   -s 'now -1 week' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     40rrdtool graph web/wconsum_1month.png   -s 'now -1 month' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     41rrdtool graph web/wconsum_1year.png   -s 'now -1 year' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     42rrdtool graph web/wconsum_2year.png   -s 'now -2 year' -e 'now'   -Y -A   DEF:consum=water.rrd:consum:AVERAGE CDEF:wconsum=consum,3,/ LINE2:wconsum#0066ff:"Verbrauch [L]"
     43
     44rrdtool graph web/wcounter_1week.png   -s 'now -1 week' -e 'now'   -X 0 -Y -A   DEF:counter=water.rrd:counter:LAST CDEF:wcounter=counter,3,/ LINE2:wcounter#000000:"ZÀhlerstand [qm2]"
     45rrdtool graph web/wcounter_1month.png   -s 'now -1 month' -e 'now'   -X 0 -Y -A   DEF:counter=water.rrd:counter:LAST CDEF:wcounter=counter,3,/ LINE2:wcounter#000000:"ZÀhlerstand [qm2]"
  • de.wigbels.ruby/hothotread/hothotpiper_water.rb

    rb86cdd7 raa10f5c  
    77
    88mypath = File.expand_path(File.dirname(__FILE__))
    9 trigger_step = 0.001
     9trigger_step = 1
    1010trigger_watch = 0
    1111counter = 0.0
     
    2626end
    2727
    28 watch :pin => 9, :trigger => :rising do
     28watch :pin => 18, :trigger => :falling do
    2929  puts('triggered watch to 1')
    3030  trigger_watch = 1
     
    4040    if trigger_watch == 1 then
    4141      counter = counter + trigger_step
    42 #system("rrdtool update #{rrdpath} N:#{counter}:#{trigger_step}")
     42      system("rrdtool update #{rrdpath} N:#{counter}:#{trigger_step}")
    4343      puts('Counter updated to: ' + counter.to_s)
    4444      timestamp =  Time.now.to_i
    4545      trigger_watch = 0
    4646    elsif Time.now.to_i - timestamp > 3600
    47 #     system("rrdtool update #{rrdpath} N:#{counter}:0")
     47      system("rrdtool update #{rrdpath} N:#{counter}:0")
    4848      timestamp = Time.now.to_i
    4949    end
  • de.wigbels.ruby/hothotread/web/index.html

    rb86cdd7 raa10f5c  
    3333<img src="counter_1week.png">
    3434
     35<h2>Wasser</h2>
     36<img src="wconsum_10minutes.png">
     37<img src="wconsum_30minutes.png">
     38<img src="wconsum_1hour.png">
     39<img src="wconsum_3hour.png">
     40<img src="wconsum_6hour.png">
     41<img src="wconsum_12hour.png">
     42<img src="wconsum_1day.png">
     43<img src="wconsum_1week.png">
     44<img src="wconsum_1month.png">
     45<img src="wconsum_1year.png">
     46<img src="wconsum_2year.png">
     47<img src="wcounter_1month.png">
     48<img src="wcounter_1week.png">
     49
    3550</body>
    3651</html>
Note: See TracChangeset for help on using the changeset viewer.