[SOLVED] OH 2.3 - Change in persistence handling for numbers?

All,

I habe upgraded to 2.3 and it works quite well.

However, it seems that numbers are not stored properly.
Even though I have set in jdbc.persist:
G_Numbers* : strategy = every5Minutes, everyChange, restoreOnStartup

Numbers are not stored every 5 minutes (for charts).
It used to be working fine with 2.2.

Is this related to a change or a problem of my personal setup.
I was not able to find a hint so far (breaking changes etc.)
Thanks in advance.

Could you post your jdbc.persist file please?

sure:

Strategies {
everyMinute : “0 * * * * ?”
every5Minutes : “0 */5 * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
}

Items {
// which data to be stored
* : strategy = everyChange, restoreOnStartup // after switching this OFF, no more Group states have been stored (G_Lights* only stores the members)
G_jdbc* : strategy = everyChange, restoreOnStartup
G_Numbers* : strategy = every5Minutes, everyChange, restoreOnStartup
G_Lights : strategy = everyChange, restoreOnStartup
G_All_OFF : strategy = everyChange, restoreOnStartup
G_Mobiles : strategy = every5Minutes, everyChange, restoreOnStartup
G_Windows : strategy = everyChange, restoreOnStartup
G_Melder : strategy = everyChange, restoreOnStartup
G_Bypass : strategy = everyChange, restoreOnStartup
G_Battery : strategy = everyChange, restoreOnStartup
G_OverR : strategy = everyChange, restoreOnStartup
G_Net : strategy = every5Minutes, everyChange, restoreOnStartup
G_Homecoming : strategy = everyChange, restoreOnStartup
G_Battery : strategy = everyChange, restoreOnStartup
G_Hood : strategy = everyChange, restoreOnStartup
G_CarWind : strategy = everyChange, restoreOnStartup
G_CarDoors : strategy = everyChange, restoreOnStartup
G_CarTyres : strategy = everyChange, restoreOnStartup
}

Try that:

every5Minutes : "0 0/5 * * * ?"

And please use the code fences

I would also recommend that you use mapdb for restoreOnStartup

This seems to work (for now).
Was there a change between 2.2 and 2.3 in this regard or have I been lucky back using 2.2 with this config?

Not that I am aware of.
Both cron expressions work in: https://www.freeformatter.com/cron-expression-generator-quartz.html

Glad it’s working now, please mark as solved. Thanks

too early happy.
After a restart - same thing.

Touching the persist file helped.
But this is not how it supposed to be :frowning:

I am really desparate about why this is happenning again.
In a rule I constantly check whether a specific number is stored correctly.

rule "Does persistence work?"
when
	Time cron "52 0/10 * * * ?"
then
// did persistence store properly the different values into maria_DB?
	if(!Presence_Num.updatedSince(now.minusMinutes(30),"jdbc")) {
		logInfo("system.rules", "Presence_Num not updated since 30 minutes - is there a problem with persistence?")
		sendTelegram("OH_TeleBot", "Presence_Num seit 30 min. nicht aktualisiert.\nPersistence Probleme?")
	}
end

However other number items (not all) are stored properly.
It is really weird.
Even a restart of openHAB (either with or without deleting the cache and tmp files) did not help.

You are checking that Presence_Num changed in the last 30 minutes every 10 minutes. Do people come and go in and out every 10 minutes?
The database will only be updated on a change of value. Not at every update.