[SOLVED] Persistance RRD4J - Change since midnight


I have persisted the item “LG_Resus_Charge_Tot” which shows the total amount of charged battery energy.
Now I would like to know only the todays value. Something like this:

Actual Value - Value at midnight

I already tried if something like this is working, but without success:

rule "Test"
		Item LG_Resus_Charge_Tot changed
		var Number today = LG_Resus_Charge_Tot.changeSince(now.minusMinutes(30), "rrd4j").state as DecimalType
		postUpdate(LG_Resus_Charge_Day, today)									    					

Any ideas how I can get this value? Is another persistance service needed than rrd4j? The persistance itself is working (everyMinute)


There seems to be a DSP-problem OpenHAB not saving mesaurements after daylight saving time change

I’m already on snapshot 1238, so this should be fixed in my setup.

My question is more how the rule should look like. Because my understanding is that I don’t get the value with “changeSince”. The rule that I have posted was only for testing with last 30 minutes…at the end the delta between now and last midnight is needed.

Found it:

var Number today = LG_Resus_Charge_Tot.deltaSince(now.toDateMidnight, “rrd4j”)