i have some counters which im trying to save and graph. the thing where im getting stuck is that its saving the values to the item, but the graph is every time 0
what i have done:
cat persistence/rrd4j.persist
Strategies {
// for rrd charts, we need a cron strategy
everyMinute : "0 * * * * ?"
}
Items {
KWH* : strategy = everyMinute
ws_regen : strategy = everyMinute
}
cat services/rrd4j.cfg
# configure specific rrd properties for given items in this file.
# please refer to the documentation available at
# https://www.openhab.org/addons/persistence/rrd4j/
#
# default_numeric and default_other are internally defined defnames and are used as
# defaults when no other defname applies
#<dsName>.def=[ABSOLUTE|COUNTER|DERIVE|GAUGE],<heartBeat>,[<minValue>|U],[<maxValue>|U],<sampleInterval>
#<dsName>.archives=[AVERAGE|MIN|MAX|LAST|FIRST|TOTAL],<xff>,<samplesPerBox>,<boxCount>
#<dsName>.items=<comma separated list of items for this dsName>
#cntr24h.def=COUNTER,1800,0,U,3600
#cntr24h.archives=TOTAL,0.5,1,168:TOTAL,0.5,24,730:TOTAL,0.5,7,520
ctr24h.def=COUNTER,1800,0,U,60
ctr24h.archives=AVERAGE,0.5,1,480:AVERAGE,0.5,10,144
ctr24h.items=ws_regen,SmartMeter_180,SmartMeter_181,SmartMeter_182
The smartmeteritems will change about 10 times per day or more, the ws_regen only some times if its raining.
SmartMeter_180,SmartMeter_181,SmartMeter_182 are member of group KWH
I read some casesabout graphing counters and also the documentation but im stuck. The thing im trying to avoid is to make items for each smartmeteritem per hour/per day per month because im thinking this should be possible by accumulated graph then if the rrd would have the data correctly in there.
if im trying to ask the rest then im seeing only 0 values in there:
{
"name": "SmartMeter_180",
"datapoints": "12",
"data": [
{
"time": 1662321600000,
"state": "0"
},
{
"time": 1662325200000,
"state": "0"
},
{
"time": 1662328800000,
"state": "0"
},
....
i have rrd4j in debug mode and if im looking for the value, then im seeing its changing:
....
2022-09-05 08:05:00.896 [DEBUG] [d4j.internal.RRD4jPersistenceService] - Stored 'SmartMeter_180' as value '2.51604E8' in rrd4j database (again)
2022-09-05 08:05:00.897 [DEBUG] [d4j.internal.RRD4jPersistenceService] - Stored 'SmartMeter_180' as value '2.516076E8' in rrd4j database
2022-09-05 08:06:00.827 [DEBUG] [d4j.internal.RRD4jPersistenceService] - Stored 'SmartMeter_180' as value '2.516076E8' in rrd4j database (again)
2022-09-05 08:06:00.828 [DEBUG] [d4j.internal.RRD4jPersistenceService] - Stored 'SmartMeter_180' as value '2.516076E8' in rrd4j database
2022-09-05 08:07:00.830 [DEBUG] [d4j.internal.RRD4jPersistenceService] - Stored 'SmartMeter_180' as value '2.516076E8' in rrd4j database (again)
2022-09-05 08:07:00.831 [DEBUG] [d4j.internal.RRD4jPersistenceService] - Stored 'SmartMeter_180' as value '2.516076E8' in rrd4j database
2022-09-05 08:08:00.853 [DEBUG] [d4j.internal.RRD4jPersistenceService] - Stored 'SmartMeter_180' as value '2.516076E8' in rrd4j database (again)
....
Is there anyone which can help me with that to give me a hint whats wrong?
Best thanks and regards
Andreas