I’m trying to chart a simple 1 wire one sensor temperature reading.
When I try to install the rrd4j persistence service I get the following.
[ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-persistence-rrd4j': Error restarting bundles
This is a clean install of OH2 on Rpi3 please any advice would be a big help.
I have seen errors like this while trying to install an binding/persistence. Is this the only entry regarding rrd4j? Check in PaperUI if the persistence is installed despite of this error.
Thanks for the quick response it does appear to be working despite that error but I couldn’t get it working before I uninstalled it and reinstalled and when I reinstalled it I noticed I got that error so I figured that had to be the reason it wasn’t working.
Just a couple quick questions because I’m still trying to figure out what was going wrong.
Here is my rrd4j.cfg does this look correct to you?
I have mapdb and rrd4j installed and have mapdb set as the default persist service in runtime.cfg.
Do you think that can cause a problem? My mapdb.persist looks like this? If I understand correctly the first line in the items portion says persist all items once a day and on every change. Any thoughts on that?
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
default = everyChange
* : strategy = everyChange, everyDay, restoreOnStartup
Camera1, Surveillance*: strategy = everyChange, restoreOnStartup
Regarding mapdb, I’d suggest to use it just to restore the last state after a restart. There for I use only the strategies: everyChange, restoreOnStartUp
Looking at your rrd4j setup, you should rethink.
To start of, yoy configured a step size (timeintervall between readings). that should always be 60 seconds.
You have created only one archive, which takes an entry every step. The call for an average will be neglected, since this average will be done over a single entry.
If you would create a second archive, which would get an entry for example every readings, an average could be calculated.
Your single archive does hold 300 values, in other words you are storing the values for the last 1500 minutes, nothing else.
Thanks again @opus for all the help. I changed my rrd4j.cfg to the following.
Based on my limited understanding of the rrd4j.cfg I set a heartbeat of 15 seconds because my temp probe is taking a reading every 15 seconds. I have the min and max of the min and max temperatures the probe should read in fahrenheit.
I set the step to 60 seconds to match the everyMinute persistence strategy.
For the archives I want the average of all the readings for the last 5 minutes does that look correct? I’ve read the rrd4j persistence documentation over and over and can’t seem to make sense of it. Thanks again for all your help on this.
As stated before the first archive won’t givd you averages.
Make it it with two archives like that:
That way the first archive holds a value for each minute for 5 minutes, the second archive takes a new value for every 5 minutes (calculated as an average from the minute values). There are 288 of those values, since each stands for 5 minutes, you have an average for each 5 minute Intervall of the last day.
If you request a value Folsom the last 5 minutes the first archive is takes, a request from a later time will get values from the second archive.
Thanks again for all your help, and explanation of the archives and the importance of having 2 archives.