Default persistence strategy is not applied if a group configuration is defined

  • Platform information:
    • Hardware: amd64/16G RAL
    • OS: Manjaro Linux
    • Java Runtime Environment: OpenJDK 17
    • openHAB version: 4.1.1


In order to be able to access my weather forceast items states in the future, I added a persistence configuration of type forecast on the group where all the items are placed.

This worked just fine, I’m now able to get the forecast values from any JS rule so that’s fine.

But this has had an unexpected consequence:
All other items are no longer persisted!

This really surprised me as the default strategies configuration still is everyChange and yet, I had to add another configuration that applies to ‘*’ with everyChange as its strategy.
And because MainUI won’t let me select “all items”, I had to go to the code tab and discovered the joys of escaping the star character.

Anyway, I now have the following configuration:

And this is the associated code:

  - items:
      - weather_forecast*
      - forecast
    filters: []
  - items:
      - "*"
      - everyChange
    filters: []
  - name: everyMinute
    cronExpression: 0 * * ? * *
  - name: everyHour
    cronExpression: 0 0 * * * ?
  - name: everyDay
    cronExpression: 0 0 0 * * ?
  - everyChange
thresholdFilters: []
timeFilters: []
equalsFilters: []
includeFilters: []

Maybe this is totally expected but as it caught me by surprise, I’m writing this message to warn others facing the same situation.

I think this is worthy of an issue. There should be a way in the UI to define a strategy for all items.

The fact that defining a strategy disables the default is expected. The trouble you had adding back a default is unexpected.

1 Like

Done: Unable to create a persistence configuration for all items · Issue #2516 · openhab/openhab-webui · GitHub

Well, it was definitely not clear enough in the documentation and it took me 3 days to notice that I was missing all my persisted state.
In particular when the documentation only mentions configuration files and totally ignores the MainUI dialogs that serve a similar purpose.

1 Like

There are lots of things missing from the docs or could be made more clear. but there’s are very few volunteers to work the docs.