From time to time, the HR80 radiator controller send the temperature they measure with an internal sensor. I wanted to display this data in a chart, and used RRDTool, which I already knew from previous (software) projects of mine.
Let’s quote wikipedia:
RRDtool (acronym for round-robin database tool) aims to handle time-series data like networkbandwidth, temperatures,CPU load, etc. The data are stored in a round-robindatabase (circular buffer), thus the system storage footprint remains constant over time.
It also includes tools to extract RRD data in a graphical format, for which it was originally intended.
Okay, as I have six of this HR80 radiator controllers in my house, I created a round robin database for these using RRDTool:
rrdtool create temperature.rrd --step 300 \
This creates the six RRD data sources, step width are 5 minutes (300 seconds). The python script receiving and decoding the HR80’s messages just writes the temperature value received to this RRD:
# Update RRD
if deviceId1 in controller:
'N:' + str(temperature))
Creating a chart of this round robin database is a piece of cake. I use the following RRDTool command:
ret = rrdtool.graph( “./temperature.png”, “–start”, “-1d”, “–vertical-label=Temperatur”,
“LINE2:m3#00FFFF:EG Wohnen 1\\r”,
“LINE2:m4#FF0000:EG Wohnen 2\\r”,
“LINE2:m5#FF00FF:EG Wohnen 3\\r”,
“GPRINT:m1:AVERAGE:Avg m1\: %6.0lf “,
“GPRINT:m2:AVERAGE:Avg m2\: %6.0lf “,
“GPRINT:m3:AVERAGE:Avg m3\: %6.0lf “,
“GPRINT:m4:AVERAGE:Avg m4\: %6.0lf “,
“GPRINT:m5:AVERAGE:Avg m5\: %6.0lf “,
“GPRINT:m6:AVERAGE:Avg m6\: %6.0lf “,
An example chart created by this command:
This shows a time series of temperature measurements of all my six HR80 radiator controllers. You can see the temperature going down at 22:00 from 21° celsius to 17° celsius at 8:00 in the morning, where it again goes up in direction of 21° celsius.