Persistence: difference between default strategy and *?

Originally my persistence strategy (“everything is the same!”) looked like this:

Strategies {
    every5:  "0 0/5 * * * ?"
    default = everyChange,ever5,restoreOnStartup
}

Items {
    *:strategy = everyChange,every5,restoreOnStartup
}

…and that worked. Everything persisted every 5, or every time it changed. But it seemed as though I had a somewhat redundant configuration; the default strategy and a catch-all was also called out in Items.

…I shouldn’t need to specify it twice like that, right?

So in my mind, a strategy that looks like this should work:

Strategies {
     every5 : "0 0/5 * * * ?"
     default = everyChange,every5,restoreOnStartup
}
Items {
}

should do the same thing, right?

Nope. Now nothing is being restored on startup, which means that the default strategy is being ignored.

What am I doing wrong here?


(What I want to do is have a default strategy, and then define individual items for which I want a different strategy. But I don’t think I can do that if I have a catch-all “*:strategy” under items.)

Upon reading the Persistence wiki page, you still need to fill in the Items section of the persist file but if you do not supply a strategy the default will be used.

For example:

Strategies {
     every5 : "0 0/5 * * * ?"
     default = everyChange,every5,restoreOnStartup
}
Items {
    *
    MyNonDefaultItem = every5
}

This will apply the default strategy to all Items and additionally apply the every5 to MyNonDefaultItem.

MMmm, that doesn’t work. If you throw a naked * in Items under persistence, designer pukes on it. If you do something like this (my current config):

Items {
	// do NOT persist virtual_resistence_loaded!  (and no reason to store it every 5 minutes, either!)
	VIRTUAL_PERSISTENCE_LOADED:strategy = everyChange

	*:strategy = everyChange,every5,restoreOnStartup
}

Then the *:strategy definition overrides VIRTUAL_PERSISTENCE_LOADED’s strategy. (VPL’s last state gets reloaded when openhab restarts.)

It appears that everything listed in items must have a strategy, which tends to make me think that default isn’t actually a default but essentially a user created label that happens to have the name default.

(Already tried swapping the order of things, putting * before VPL in case it was a last valid entry carries the day type situation. No dice, VPL still persists.)

Anybody have any other ideas?