title: Log Temperature and Humidity into RRDtool
body: <p>My Pi Logs Temperature and Humidity every Minute into a csv File and in a RRDtool Database:</p>
  
  <p>I created this RRDtool Database like this:</p>
  
  <pre><code>rrdtool create /home/pi/Desktop/GarageData.rrd --step 60 
  DS:Temperatur:GAUGE:300:U:U 
  DS:Humidity:GAUGE:300:U:U 
  RRA:AVERAGE:0.5:12:24 
  RRA:AVERAGE:0.5:288:31
  </code></pre>
  
  <p>So the database should accept one value every 60 seconds</p>
  
  <p>I am logging with a python 3 script. Here is the important part.</p>
  
  <pre><code>import Adafruit_DHT
  from rrdtool import update as rrd_update
  humidity, temperatur = Adafruit_DHT.read_retry(Adafruit_DHT.AM2302, '22')
  rrd_update('/home/pi/Desktop/GarageData.rrd', 'N:%s:%s' %(temperatur, humidity))
  </code></pre>
  
  <p>when using <code>rrdtool fetch GarageData.rrd AVERAGE r300</code> I am only seeing <code>nan</code></p>
  
  <pre><code>                     Temperatur            Humidity
  
  1469111040: nan nan
  1469128320: nan nan
  1469145600: nan nan
  1469162880: nan nan
  1469180160: nan nan
  1469197440: nan nan
  </code></pre>
  
  <p>and when plotting the Database.... nothing is shows up in the plot.</p>
  
  <p>Where is the problem in my script? I thought I did everything exactly like in <a href="https://supportex.net/blog/2011/09/rrd-python/" rel="nofollow">this Tutorial</a></p>