Energy monitoring / Openhab 1.8 Chart

Hi,

Maybe I was not clear:

I use the ‘standard’ charts to make nice diagrams but I want to use historical data ( using persistence ) to calculate power consumption over time:
rule "Power"
when
Item powerCounter received update
then
var Number tmp
tmp = powerCounter.sumSince(now().minusHours(1), “rrd4j”)
power1Hr.postUpdate(tmp.toString)
tmp = powerCounter.sumSince(now().minusHours(4), “rrd4j”)
power4Hrs.postUpdate(tmp.toString)
tmp = powerCounter.sumSince(now().minusDays(1), “rrd4j”)
power24Hrs.postUpdate(tmp.toString)
tmp = powerCounter.sumSince(now().minusDays(7), “rrd4j”)
power1Wk.postUpdate(tmp.toString)
end
Every minute a delta value is stored and fed into rrd4j (var powerCounter) and from there I do some math.
All works fine except that the day and week calculation are wrong, this has to do with the fact that not all data is stored with high resolution (hence the round robin database) but how is it stored ?
Therefore I tried to change the resolution in the archives section og the rrd4j part of openhab.cfg:
########################### RRD4J Persistence Service #################################
#
# please note that currently the first archive in each RRD defines the consolidation
# function (e.g. AVERAGE) used by OpenHAB, thus only one consolidation function is
# fully supported
#
# default_numeric and default_other are internally defined defnames and are used as
# defaults when no other defname applies

#rrd4j:<defname>.def=[ABSOLUTE|COUNTER|DERIVE|GAUGE],<heartbeat>,[<min>|U],[<max>|U],<step>
#rrd4j:<defname>.archives=[AVERAGE|MIN|MAX|LAST|FIRST|TOTAL],<xff>,<steps>,<rows>
#rrd4j:<defname>.items=<list of items for this defname> 

rrd4j:energy.def=GAUGE,120,0,U,60        
rrd4j:energy.archives=AVERAGE,0.5,60,525600
#rrd4j:energy.archives=AVERAGE,0.5,3600,8760
rrd4j:energy.items=powerCounter 

Above setting should store with high resolution for 1 year (525600 minutes) but cannot get this to work, also I can not get the charts to work when using the ‘new’ settings.

Hope this clarifies my problem.

-ben