I am trying to set up persistence and graphing for counter values (e.g. water and power meter readings translated into use per unit time). The RRD type COUNTER is usually used for this and stores the delta between readings (e.g. 3 gallons) as opposed to the absolute reading itself (e.g. 287,145 gallons).
I have tried to set this up using the relatively new custom RRD4J configs, but something is not working right. I always get a blank graph:
Here are the relevant config snippets:
openhab.cfg
rrd4j:util_meter.def=COUNTER,3600,0,100000000,60
rrd4j:util_meter.archives=AVERAGE,0.5,1,480
rrd4j:util_meter.archives=AVERAGE,0.5,4,360
rrd4j:util_meter.archives=AVERAGE,0.5,15,644
rrd4j:util_meter.archives=AVERAGE,0.5,60,720
rrd4j:util_meter.archives=AVERAGE,0.5,720,730
rrd4j:util_meter.archives=AVERAGE,0.5,10080,520
rrd4j:util_meter.items=Water_Meter_Total
main.items
Number Water_Meter_Total "Total gallons used [%d]" (Test,Water,Sensors) {modbus="watermeter:0"}
rrd4j.persist
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
// for rrd charts, we need a cron strategy
everyMinute : "0 * * * * ?"
}
Items {
Sensors* : strategy = everyMinute, restoreOnStartup
Temperatures* : strategy = everyMinute, restoreOnStartup
Power* : strategy = everyMinute, restoreOnStartup
Water_Meter_Total : strategy = everyMinute, restoreOnStartup
Lights* : strategy = everyChange, everyMinute, restoreOnStartup
}
No errors or anything interesting I could find in the logs. The value for Water_Meter_Total displays in the UI properly and gets updated when I use water.
Any ideas?