Persistence is not storing anything

Hello Everyone.

I’m having some issues with persistence. I have several values configured, and only some of them are being “persisted”. Here are two examples Insight_onToday and BedroomTV_currentPower , both bindings corresponding to a wemo switch.

Here is the items config

Number  Insight_onToday "On Today [%.0f]"       { wemo="Insight-1_0-221501K120036D;onToday" }
Number  BedroomTV_currentPower  "Current Power [%.0f]"  { wemo="Insight-1_0-221501K120036D;currentPower" }

And here is the persistance config:

// 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 * * * * ?"
        everyDay  : "0 0 15 * * ?"
}

Items {
        DemoSwitch,NoOfLights,Window_GF_Toilet,Heating* : strategy = everyChange, everyMinute, restoreOnStartup

        // let's only store temperature values in rrd
        Temperature*,Weather_Chart* : strategy = everyMinute, restoreOnStartup
        BedroomTV_currentPower, Insight_onToday, Smart6_Amps, Smart6_Volts, Smart6_Power, Smart6_Energy : strategy = everyChange
}

When I open the charts on habmin, the Insight_onToday graph is painted, not how I would expect but at least it is painted. None of the other items are being logged or graphed.

Checking the logs I can see that it is generating values:

2016-03-16 02:02:42 - Insight_onToday state updated to 2306
2016-03-16 02:02:42 - BedroomTV_currentPower state updated to 17
2016-03-16 02:03:42 - Insight_onToday state updated to 2366
2016-03-16 02:03:42 - BedroomTV_currentPower state updated to 17
2016-03-16 02:04:42 - Insight_onToday state updated to 2427
2016-03-16 02:04:42 - BedroomTV_currentPower state updated to 17
2016-03-16 02:05:42 - Insight_onToday state updated to 2487
2016-03-16 02:05:42 - BedroomTV_currentPower state updated to 17
2016-03-16 02:06:42 - Insight_onToday state updated to 2547
2016-03-16 02:06:42 - BedroomTV_currentPower state updated to 17
2016-03-16 02:07:42 - Insight_onToday state updated to 2607
2016-03-16 02:07:42 - BedroomTV_currentPower state updated to 17
2016-03-16 02:08:42 - Insight_onToday state updated to 2667
2016-03-16 02:08:42 - BedroomTV_currentPower state updated to 17
2016-03-16 02:09:43 - Insight_onToday state updated to 2727
2016-03-16 02:09:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:10:43 - Insight_onToday state updated to 2787
2016-03-16 02:10:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:11:43 - Insight_onToday state updated to 2847
2016-03-16 02:11:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:12:43 - Insight_onToday state updated to 2907
2016-03-16 02:12:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:13:43 - Insight_onToday state updated to 2967
2016-03-16 02:13:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:14:43 - Insight_onToday state updated to 3027
2016-03-16 02:14:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:15:43 - Insight_onToday state updated to 3087
2016-03-16 02:15:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:16:43 - Insight_onToday state updated to 3147
2016-03-16 02:16:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:17:43 - Insight_onToday state updated to 3208
2016-03-16 02:17:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:18:43 - Insight_onToday state updated to 3268
2016-03-16 02:18:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:19:43 - Insight_onToday state updated to 3327
2016-03-16 02:19:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:20:43 - Insight_onToday state updated to 3387
2016-03-16 02:20:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:21:43 - Insight_onToday state updated to 3448
2016-03-16 02:21:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:22:43 - Insight_onToday state updated to 3508
2016-03-16 02:22:43 - BedroomTV_currentPower state updated to 17
2016-03-16 02:23:44 - Insight_onToday state updated to 3568
2016-03-16 02:23:44 - BedroomTV_currentPower state updated to 17

Anyone has an idea of what could be happening?

For rrd4j you must use “everyMinute”, otherwise it doesn’t work reliable.

Thank you,

Should I reset the database values or something like that? It is still not logging anything.

You may delete the persist file and restart openhab.

< gesendet von Samsung Smartphone >

Hello,

It is now logging values correctly. It was not necessary to delete anything. Thank you very much. Is this information (that you are forced to do it every minute) on the wiki?

I haven’t looked at it. @rlkoshak wrote in a post a great explanation, take a look here:

Continuing the discussion from rrd4j gives strange results for Average:

It is documented on the Charting wiki page:

It should probably be part of the text on the rrd4j page, but I didn’t see
it after a quick scan.