Index: de.wigbels.ruby/hotcoldrain/draw_graphs.sh
===================================================================
--- de.wigbels.ruby/hotcoldrain/draw_graphs.sh	(revision 7e221fedfc87eda518beedd781f23a1a301b7a9b)
+++ de.wigbels.ruby/hotcoldrain/draw_graphs.sh	(revision e397ced33c356d4e5b150de5fa25df445bc9cb9a)
@@ -9,4 +9,6 @@
 rrdtool graph web/temperatur_1jahr.png --title "Temperaturen im Jahresverlauf" --font TITLE:12 --vertical-label="Â° Celsius" -s 'now - 1 year' -e 'now' DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" DEF:tempmins9=weather.rrd:temps9:MIN DEF:tempmaxs9=weather.rrd:temps9:MAX DEF:temps9=weather.rrd:temps9:AVERAGE CDEF:tempranges9=tempmaxs9,tempmins9,- LINE1:tempmins9#4e9a06 AREA:tempranges9#8ae234::STACK LINE1:tempmaxs9#4e9a06 LINE2:temps9#4e9a06:"Temperatur aussen\n"
 
+rrdtool graph web/temperatur_5jahr.png --title "Temperaturen im Jahresverlauf" --font TITLE:12 --vertical-label="Â° Celsius" -s 'now - 5 year' -e 'now' DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" DEF:tempmins9=weather.rrd:temps9:MIN DEF:tempmaxs9=weather.rrd:temps9:MAX DEF:temps9=weather.rrd:temps9:AVERAGE CDEF:tempranges9=tempmaxs9,tempmins9,- LINE1:tempmins9#4e9a06 AREA:tempranges9#8ae234::STACK LINE1:tempmaxs9#4e9a06 LINE2:temps9#4e9a06:"Temperatur aussen\n"
+
 
 rrdtool graph web/luftfeuchtigkeit_1tag.png --title "Luftfeuchtigkeit im Tagesverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 day' -e 'now' DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten"  DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf"
@@ -17,4 +19,6 @@
 
 rrdtool graph web/luftfeuchtigkeit_1jahr.png --title "Luftfeuchtigkeit im Jahresverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 year' -e 'now' DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten"  DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n"
+
+rrdtool graph web/luftfeuchtigkeit_5jahr.png --title "Luftfeuchtigkeit im Jahresverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 5 year' -e 'now' DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten"  DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n"
 
 
@@ -67,4 +71,17 @@
 LINE2:rainpd#729fcf
 
+rrdtool graph web/regen_5jahr.png \
+--title "Regen im Jahresverlauf" \
+--font TITLE:12 \
+-s 'now - 5 year' -e 'now' \
+-v mm/Tag \
+DEF:rains9=weather.rrd:rains9:AVERAGE \
+CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
+CDEF:rainpm=rainpd,30,* \
+VDEF:totalrain=rainpm,AVERAGE \
+GPRINT:totalrain:"Total %6.0lf mm/Jahr" \
+LINE2:rainpd#729fcf
+
+
 rrdtool graph web/wind_1tag.png --title "Wind im Tagesverlauf" --font TITLE:12 -s 'now - 1 day' -e 'now' -v km/h DEF:winds9=weather.rrd:winds9:AVERAGE LINE2:winds9#2e3436:"Wind km/h"
 
@@ -74,2 +91,4 @@
 
 rrdtool graph web/wind_1jahr.png --title "Wind im Jahresverlauf" --font TITLE:12 -s 'now - 1 year' -e 'now' -v km/h DEF:winds9=weather.rrd:winds9:AVERAGE LINE2:winds9#2e3436:"Wind km/h"
+
+rrdtool graph web/wind_5jahr.png --title "Wind im Jahresverlauf" --font TITLE:12 -s 'now - 5 year' -e 'now' -v km/h DEF:winds9=weather.rrd:winds9:AVERAGE LINE2:winds9#2e3436:"Wind km/h"
Index: de.wigbels.ruby/hotcoldrain/web/index.html
===================================================================
--- de.wigbels.ruby/hotcoldrain/web/index.html	(revision 7e221fedfc87eda518beedd781f23a1a301b7a9b)
+++ de.wigbels.ruby/hotcoldrain/web/index.html	(revision e397ced33c356d4e5b150de5fa25df445bc9cb9a)
@@ -8,4 +8,5 @@
 <img src="temperatur_1monat.png"> <img src="luftfeuchtigkeit_1monat.png"> <br />
 <img src="temperatur_1jahr.png"> <img src="luftfeuchtigkeit_1jahr.png"> <br />
+<img src="temperatur_5jahr.png"> <img src="luftfeuchtigkeit_5jahr.png"> <br />
 
 <h2>Regen / Wind</h2>
@@ -14,4 +15,5 @@
 <img src="regen_1monat.png"> <img src="wind_1monat.png"> <br />
 <img src="regen_1jahr.png"> <img src="wind_1jahr.png"> <br />
+<img src="regen_5jahr.png"> <img src="wind_5jahr.png"> <br />
 
 <p>Stationskoordinaten: 53&deg;34'17.1"N 9&deg;29'21.8"E, Stade-Ottenbeck</p>
Index: de.wigbels.ruby/hothotread/draw_graphs.sh
===================================================================
--- de.wigbels.ruby/hothotread/draw_graphs.sh	(revision 7e221fedfc87eda518beedd781f23a1a301b7a9b)
+++ de.wigbels.ruby/hothotread/draw_graphs.sh	(revision e397ced33c356d4e5b150de5fa25df445bc9cb9a)
@@ -1,4 +1,7 @@
 #!/bin/bash 
 
+rrdtool graph web/gas_3hour.png -s 'now - 3 hour' -e 'now' DEF:consum=gasneu.rrd:consum:AVERAGE CDEF:conph=consum,3600,* CDEF:conpd=conph,24,* VDEF:gastotal=conpd,AVERAGE GPRINT:gastotal:"Total %4.2lf mÂ³/d" LINE2:conph#c17d11:mÂ³/h 
+rrdtool graph web/gas_6hour.png -s 'now - 6 hour' -e 'now' DEF:consum=gasneu.rrd:consum:AVERAGE CDEF:conph=consum,3600,* CDEF:conpd=conph,24,* VDEF:gastotal=conpd,AVERAGE GPRINT:gastotal:"Total %4.2lf mÂ³/d" LINE2:conph#c17d11:mÂ³/h 
+rrdtool graph web/gas_12hour.png -s 'now - 12 hour' -e 'now' DEF:consum=gasneu.rrd:consum:AVERAGE CDEF:conph=consum,3600,* CDEF:conpd=conph,24,* VDEF:gastotal=conpd,AVERAGE GPRINT:gastotal:"Total %4.2lf mÂ³/d" LINE2:conph#c17d11:mÂ³/h 
 rrdtool graph web/gas_1tag.png -s 'now - 1 day' -e 'now' DEF:consum=gasneu.rrd:consum:AVERAGE CDEF:conph=consum,3600,* CDEF:conpd=conph,24,* VDEF:gastotal=conpd,AVERAGE GPRINT:gastotal:"Total %4.2lf mÂ³/d" LINE2:conph#c17d11:mÂ³/h 
 rrdtool graph web/gas_1week.png -s 'now - 1 week' -e 'now' DEF:consum=gasneu.rrd:consum:AVERAGE CDEF:conpd=consum,3600,*,24,* LINE2:conpd#c17d11:mÂ³/h 
@@ -10,4 +13,10 @@
 
 
+rrdtool graph web/consum_10minutes.png   -s 'now -10 minutes' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"
+rrdtool graph web/consum_30minutes.png   -s 'now -30 minutes' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"
+rrdtool graph web/consum_1hour.png   -s 'now -1 hour' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch[W]"
+rrdtool graph web/consum_3hour.png   -s 'now -3 hour' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"
+rrdtool graph web/consum_6hour.png   -s 'now -6 hour' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"
+rrdtool graph web/consum_12hour.png   -s 'now -12 hour' -e 'now'   -Y -A   DEF:consum=power.rrd:consum:AVERAGE   LINE2:consum#00FF00:"Verbrauch [W]"
 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]"
Index: de.wigbels.ruby/hothotread/hothotpiper_gas.rb
===================================================================
--- de.wigbels.ruby/hothotread/hothotpiper_gas.rb	(revision 7e221fedfc87eda518beedd781f23a1a301b7a9b)
+++ de.wigbels.ruby/hothotread/hothotpiper_gas.rb	(revision e397ced33c356d4e5b150de5fa25df445bc9cb9a)
@@ -1,6 +1,8 @@
 #!/usr/bin/env ruby
+require 'pi_piper'
+require 'eventmachine'
 
-require 'pi_piper'
 include PiPiper
+
 
 mypath = File.expand_path(File.dirname(__FILE__))
@@ -9,4 +11,5 @@
 counter = 0.0
 timestamp =  Time.now.to_i
+
 
 def last_rrd_count(concretepath)
@@ -28,20 +31,23 @@
 end
 
+
 rrdpath = mypath + "/gasneu.rrd"
 counter = last_rrd_count(rrdpath)
-puts('Counter restored to: '+counter.to_s)
+puts('Counter restored to: ' + counter.to_s)
 
-loop do
-  if trigger_watch == 1 then
-    counter = counter + trigger_step
-    system("rrdtool update #{rrdpath} N:#{counter}:#{trigger_step}")
-    puts('Counter updated to: '+counter.to_s)
-    timestamp =  Time.now.to_i
-    trigger_watch = 0
-  elsif Time.now.to_i - timestamp > 3600
-    system("rrdtool update #{rrdpath} N:#{counter}:0")
-    timestamp = Time.now.to_i
+
+EventMachine.run do
+  EM.add_periodic_timer(1) do
+    if trigger_watch == 1 then
+      counter = counter + trigger_step
+      system("rrdtool update #{rrdpath} N:#{counter}:#{trigger_step}")
+      puts('Counter updated to: ' + counter.to_s)
+      timestamp =  Time.now.to_i
+      trigger_watch = 0
+    elsif Time.now.to_i - timestamp > 3600
+      system("rrdtool update #{rrdpath} N:#{counter}:0")
+      timestamp = Time.now.to_i
+    end
   end
-  sleep(1)
 end
 
Index: de.wigbels.ruby/hothotread/hothotpiper_power.rb
===================================================================
--- de.wigbels.ruby/hothotread/hothotpiper_power.rb	(revision 7e221fedfc87eda518beedd781f23a1a301b7a9b)
+++ de.wigbels.ruby/hothotread/hothotpiper_power.rb	(revision e397ced33c356d4e5b150de5fa25df445bc9cb9a)
@@ -1,8 +1,13 @@
 require 'pi_piper'
+require 'eventmachine'
+
 include PiPiper
+
 
 mypath = File.expand_path(File.dirname(__FILE__))
 trigger_step = 1.0 / 96
+trigger_watch = 0
 counter = 0
+
 
 def last_rrd_count(concretepath)
@@ -19,13 +24,24 @@
 end
 
-
 watch :pin => 11, :trigger => :falling  do
   puts('updated power consumption')
-  counter = counter + trigger_step
-  trigger_update = trigger_step * 3600000.0
-  system("rrdtool update #{rrdpath} N:#{counter}:#{trigger_update}")
+  trigger_watch = 1
 end
+
 
 rrdpath = mypath + "/power.rrd"
 counter = last_rrd_count(rrdpath)
-PiPiper.wait
+puts('Counter restored to: ' + counter.to_s)
+
+
+EventMachine.run do
+  EM.add_periodic_timer(1) do
+    if trigger_watch == 1 then
+      counter = counter + trigger_step
+      trigger_update = trigger_step * 3600000.0
+      system("rrdtool update #{rrdpath} N:#{counter}:#{trigger_update}")
+      puts('Counter updated to: ' + counter.to_s)
+      trigger_watch = 0
+    end
+  end
+end
Index: de.wigbels.ruby/hothotread/web/index.html
===================================================================
--- de.wigbels.ruby/hothotread/web/index.html	(revision 7e221fedfc87eda518beedd781f23a1a301b7a9b)
+++ de.wigbels.ruby/hothotread/web/index.html	(revision e397ced33c356d4e5b150de5fa25df445bc9cb9a)
@@ -3,5 +3,11 @@
 <body>
 
+<h2>Temperatur</h2>
+<img src="../temperatur_1tag.png">
+
 <h2>Gas</h2>
+<img src="gas_3hour.png">
+<img src="gas_6hour.png">
+<img src="gas_12hour.png">
 <img src="gas_1tag.png">
 <img src="gas_1week.png">
@@ -12,4 +18,10 @@
 
 <h2>Strom</h2>
+<img src="consum_10minutes.png">
+<img src="consum_30minutes.png">
+<img src="consum_1hour.png">
+<img src="consum_3hour.png">
+<img src="consum_6hour.png">
+<img src="consum_12hour.png">
 <img src="consum_1day.png">
 <img src="consum_1week.png">
