rrd_update("rrdtool/boiler_relay.rrd", array("N:".getGlobal('BoilerHeater.relayState')));
rrd_update("rrdtool/hall_temp.rrd", array("N:".getGlobal('Thermostat01.value')));
rrd_update("rrdtool/heat_temp.rrd", array("N:".getGlobal('BoilerHeater.currentTemp')));
rrd_update("rrdtool/target_temp.rrd", array("N:".getGlobal('Thermostat01.currentTargetValue')));
rrd_update("rrdtool/water_temp.rrd", array("N:".getGlobal('Sensor_temp01.value').":".getGlobal('BoilerHeater.setWaterTemp')));
rrd_graph("rrdtool/hall_temp_d.png", array(
"--start", "-1d",
"--end", "now",
"--title", "Air Temperature, day",
"DEF:sc00=rrdtool/hall_temp.rrd:hall_temp:AVERAGE:step=1",
"DEF:sc00_max=rrdtool/hall_temp.rrd:hall_temp:MAX:step=1",
"DEF:sc00_min=rrdtool/hall_temp.rrd:hall_temp:MIN:step=1",
"DEF:sc00_cur=rrdtool/hall_temp.rrd:hall_temp:LAST:step=1",
"DEF:sc01=rrdtool/heat_temp.rrd:heat_temp:AVERAGE:step=1",
"DEF:sc02=rrdtool/target_temp.rrd:target_temp:AVERAGE:step=1",
"VDEF:ds0avg=sc00,AVERAGE",
"LINE2:sc02#AAAAAA:Target Temp\t",
"LINE1:sc00#0000FF:Hall Temp\t",
"LINE1:sc01#FF0000:Heat Temp\l",
"TEXTALIGN:center",
"GPRINT:sc00_min:MIN:Min\: %2.1lf\t",
"GPRINT:ds0avg:Avg\: %2.1lf\t",
"GPRINT:sc00_max:MAX:Max\: %2.1lf\l",
"GPRINT:sc00_cur:LAST:Current\: %2.1lf\l",
"COMMENT: U".timeNow()
));
rrd_graph("rrdtool/hall_temp_w.png", array(
"--start", "-1w",
"--end", "now",
"--title", "Air temperature, week",
"DEF:sc00=rrdtool/hall_temp.rrd:hall_temp:AVERAGE:step=1",
"DEF:sc00_max=rrdtool/hall_temp.rrd:hall_temp:MAX:step=1",
"DEF:sc00_min=rrdtool/hall_temp.rrd:hall_temp:MIN:step=1",
"DEF:sc01=rrdtool/heat_temp.rrd:heat_temp:AVERAGE:step=1",
"DEF:sc02=rrdtool/target_temp.rrd:target_temp:AVERAGE:step=1",
"VDEF:ds0avg=sc00,AVERAGE",
"LINE1:sc00#0000FF:Temp week",
"LINE1:sc01#FF0000:Heat Temp",
"LINE2:sc02#AAAAAA:Target Temp\l",
"TEXTALIGN:center",
"GPRINT:sc00_min:MIN:Min\: %2.1lf\t",
"GPRINT:ds0avg:Avg\: %2.1lf\t",
"GPRINT:sc00_max:MAX:Max\: %2.1lf\l",
"COMMENT: U".timeNow()
));
rrd_graph("rrdtool/hall_temp_m.png", array(
"--start", "-1m",
"--end", "now",
"--title", "Hall temperature",
"DEF:sc00=rrdtool/hall_temp.rrd:hall_temp:AVERAGE:step=1",
"DEF:sc00_max=rrdtool/hall_temp.rrd:hall_temp:MAX:step=1",
"DEF:sc00_min=rrdtool/hall_temp.rrd:hall_temp:MIN:step=1",
"VDEF:ds0avg=sc00,AVERAGE",
"LINE1:sc00#0000FF:Temp month",
"TEXTALIGN:center",
"GPRINT:sc00_min:MIN:Min\: %2.1lf\t",
"GPRINT:ds0avg:Avg\: %2.1lf\t",
"GPRINT:sc00_max:MAX:Max\: %2.1lf\l",
"COMMENT: U".timeNow()
));
rrd_graph("rrdtool/hall_temp_y.png", array("--start", "-1y", "--end", "now", "DEF:sc00=rrdtool/hall_temp.rrd:hall_temp:AVERAGE:step=1", "LINE1:sc00#0000FF:'AT'"));
rrd_graph("rrdtool/boiler_relay_d.png", array(
"--start", "-1d",
"--end", "now",
"DEF:sc00=rrdtool/boiler_relay.rrd:relay_state:AVERAGE:step=1",
"VDEF:ds0avg=sc00,AVERAGE",
"AREA:sc00#0011AA:Relay day",
"GPRINT:ds0avg:Avg\: %1.2lf\t"
));
rrd_graph("rrdtool/boiler_relay_w.png", array(
"--start", "-1w",
"--end", "now",
"DEF:sc00=rrdtool/boiler_relay.rrd:relay_state:AVERAGE:step=1",
"VDEF:ds0avg=sc00,AVERAGE",
"AREA:sc00#0011AA:Relay week",
"GPRINT:ds0avg:Avg\: %1.2lf\t"
));
rrd_graph("rrdtool/boiler_relay_m.png", array(
"--start", "-1m",
"--end", "now",
"DEF:sc00=rrdtool/boiler_relay.rrd:relay_state:AVERAGE:step=1",
"VDEF:ds0avg=sc00,AVERAGE",
"AREA:sc00#0011AA:Relay month",
"GPRINT:ds0avg:Avg\: %1.2lf\t"
));
rrd_graph("rrdtool/boiler_relay_y.png", array(
"--start", "-1y",
"--end", "now",
"DEF:sc00=rrdtool/boiler_relay.rrd:relay_state:AVERAGE:step=1",
"VDEF:ds0avg=sc00,AVERAGE",
"AREA:sc00#0011AA:Relay year",
"GPRINT:ds0avg:Avg\: %1.2lf\t"
));
rrd_graph("rrdtool/water_temp_d.png", array(
"--start", "-1d",
"--end", "now",
"--title", "Water Temperature, day",
"DEF:sc00=rrdtool/water_temp.rrd:current_temp:AVERAGE:step=1",
"DEF:sc00_max=rrdtool/water_temp.rrd:current_temp:MAX:step=1",
"DEF:sc00_min=rrdtool/water_temp.rrd:current_temp:MIN:step=1",
"DEF:sc00_cur=rrdtool/water_temp.rrd:current_temp:LAST:step=1",
"DEF:sc01=rrdtool/water_temp.rrd:target_temp:AVERAGE:step=1",
"VDEF:ds0avg=sc00,AVERAGE",
"LINE1:sc01#AAAAAA:Target Temp\t",
"LINE1:sc00#FF0000:Water Temp\l",
"TEXTALIGN:center",
"GPRINT:sc00_min:MIN:Min\: %2.1lf\t",
"GPRINT:ds0avg:Avg\: %2.1lf\t",
"GPRINT:sc00_max:MAX:Max\: %2.1lf\l",
"GPRINT:sc00_cur:LAST:Current\: %2.1lf\l",
"COMMENT: U".timeNow()
));