Excluding an item from persistence

Hello communitiy

I’ve set up a persistence for all my items. Now, I found out, that one item doesn’t get updated. In the logfile I see that it receives an update, but if I grapt this item, it only Shows the old value. Because this item controls my blinds, I have all day the same Setting :frowning:
Now I look for a way to exclude this item from my persistence. I’ve set a cronjob which runs in 25 years as Workaround. Do you have any furter ideas?


We need more details.

What persistence are you using?

What does your persist file look like?

You say you see the item being updated but imply that your blinds are not working. Is this correct or is it just that your historic data is not accurate? If your blinds are not changing the problem isn’t with persistence but elsewhere (Item definition or Rule).

The only way I can think of to exclude the item from persistence is to explicitly list all of the items to save to persistence in the persist file and just leave this one item off the list.

If your blinds are not being restored to the last state on a reboot then rather than trying to exclude the item from being persisted, you can exclude it from the restoreOnStartup strategy. Though this probably won’t solve your problem as instead of the state being set to a wrong past state it will be set to Undefined.

Hello Rich

I use rrd4j as persistence. My file is

Strategies {
everyMinute : “0 * * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
future : “0 0 12 1 1 ? 2047”
default = everyDay

Items {
Current_Weathercond_ID : strategy = future
Temp_Kinderzimmer : strategy = everyChange, everyMinute
Temp_Kueche : strategy = everyChange, everyMinute
Helligkeit_Kinderzimmer : strategy = everyChange, everyMinute
Helligkeit_Kueche : strategy = everyChange, everyMinute

  •   				: strategy = everyChange			


I had the Problem with the item “Current_Weathercond_ID”.
My Problem is, that I fire a rule regarding the Weathercondition ID. If there is always the same, the blinds do always the same :wink:

OK, so with rrd4j charts are unreliable at best unless you use the everyMinute strategy. So that can explain why the chart doesn’t work for Current_Weathercond_ID.

What is your trigger on that rule?

If I wanted to do something whenever that item changed I would use

Item Current_Weathercond_ID changed

If you do that there is no need to check the previous state because you already know that it is different or else the rule wouldn’t have triggered. And persistence doesn’t affect whether or not the rule gets triggered.

Does that help? It still isn’t clear what specific problem you have in your rules.

Hey Rich

I check if the item has an ID between 2 values, when I open the blind in the morning. But the item has every time the same value (but I see that it recieves an update in the logs).

Do u understand me now?

BTW: I do not talk about Charts…

Post your code and Items. Without that at this point I’d only be guessing.

I don’t know, why you Need my code, but here it is

Item Sunrise_Event received update
if((Current_Weathercond_ID.state >= 29) && (Current_Weathercond_ID.state <= 34)) {

Because there is the mentioned Problem with the persistence, the ID is always between 29 and 34. therefore it does every morning the same.


I need your rules AND your Items so I can see how they are configured and how they interact with each other, what bindings are involved, etc. I can also make suggested changes that will provide more information to help track down the problem. Without your Items definitions and rules (at a minimum) it is like calling a car mechanic and saying “my car makes noise, can you fix it over the phone?” with no other information.

  1. I need to see your Item definition for Current_Weathercond_ID
  2. Put a logInfo statement before the if statement in the rule to see what Current_Weathercond_ID actually is set to when the rule executes


Hi Micheal
From my point the easiest way to exclude an item is to put all other items in a special group (like ‘persistance’) but let this item out. Then save only this group to database.

I had some strange effects myself before I changed it that way.
BTW: I use mySQL persistance, just in case…


1 Like

Hey Guys

Thanks for your Response.
Because I’ve changed my Forecast-Provider I don’t Need this Item anymore and the question became obsolete.