Chart: Aggregation: no graph when go back in time

Hi,

Using OH3 on a linux system and configured rrdj4 as persistence service…
The graph (aggregate function) on the chart for the current week are shown correct. But when i go back in time, on week base no data is shown anymore?

This is my yaml chart config
Chart.txt (2.4 KB)

Dumb question, did you check the API Explorer (REST API) whether there is data for the requested timeframe

Yes, just checked that. But it returns only 5 datapoints? I read only one value a day at 23.45h. But only 5 datapoints is a litllebit to less i suppose?

this is my persist config

Strategies {
       default = everyChange
}

Items {
        *: strategy = everyChange, restoreOnStartup
}

See

It’ is not made explicit there, but you almost certainly want to be using an everyMinute strategy as well,or instead of, unless you have made some quite technical customizing of your rrd4j.cfg

When requesting data from a rrd4j database the timeframe which you are looking for is the key, the longer the timeframe the larger are are the steps between consecutive points.Requesting the default is asking for the last 24 houres What timeframe did you request?
Reading the docs on that database is really helpful!

I’m sorry but I have to vote against that statement. The everMinute strategy requirement has been deleted from the docs because the updated rrd4j persistence takes care of that. Without customisation it even takes samples more often then per minute.

I’ll certainly take your word for that! Should that be clearer in docs? That asking for everyChange for example, will deliver more than you expected?

I’m guessing many users will want to configure what/when in rrd4j.persist, but not mess with rrd4j.cfg. Understanding the effects would be helpful.

In my humble understanding there is (now?) a difference between when new data is “fetched” from the item and how often the data “known” by rrd4j is stored into the database. The “fetching” is done by the setting in the strategy the storing by the archive setup. Since the default setups uses sample intervals of 10 or 5 secs the everyMinute strategy isn’t needed anymore. Instead the "requirement"of a maximum sample interval of 20 secs has been added( Guess who did suggest that change). Read the important note at the end of This.
If you have suggestions for a better explanation in there, I’m happy to give a second opinion.
As far as I understand Kai did a great job in order to have default setups that would suit the majority of users without the need to change the .cfg and without the need of a special strategy.

Looking at the different default setups of rrd4j I see no way to have only 5 datapoints or a single data point a day for the last day.
Did you use a custom setup of rrd4j ( maybe by keeping old .rrd files which would override the default setups)?

Hi Opus,

Thanks for your input. Have read the document again and if I’m correct there is no need to set the rrd4j.cfg and rrd4j.persist files. The defaults should do more then enough to get this working?
So removed the rrd4.cfg and rrd4j.persist files, i also removed all the rrd files in the /var/lib/openhab/persistence/rrd4j directory. I will follow this for the next week and come back later on with my findings.

BTW: What i don’t understand is how to configure wish item uses wish datasource.

Yep.

Doesn’t the following (from the docs) explain it?

default_numeric

This datasource is used for plain Number items…

default_quantifiable

This datasource is used for Number items with dimensions…

default_other

This datasource is used for any other items.