Ignore:
Timestamp:
Jan 8, 2018, 12:35:57 PM (6 years ago)
Author:
Norbert Wigbels <frickel@…>
Branches:
master
Children:
a605f5ba
Parents:
aff95c1
Message:

Mehr Temperaturdetails f. Kaminanalyse

File:
1 edited

Legend:

Unmodified
Added
Removed
  • de.wigbels.ruby/hothotread/hothotpiper_water.rb

    raff95c1 rf38145a  
    2626end
    2727
    28 watch :pin => 9, :trigger => :rising, :pull => :up do
     28watch :pin => 9, :trigger => :rising do
    2929  puts('triggered watch to 1')
    3030  trigger_watch = 1
     
    3333
    3434rrdpath = mypath + "/water.rrd"
    35 counter = last_rrd_count(rrdpath)
     35#counter = last_rrd_count(rrdpath)
    3636puts('Counter restored to: ' + counter.to_s)
    3737
     
    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
Note: See TracChangeset for help on using the changeset viewer.