OH3 Persistence InfluxDB

Hello everyone!

Recently upgraded to OH3.
Nice feature that every item is now automatically added to influxdb persistence.

The strategy for all items is now the default=everyChange.
Is there a way in OH3 to change those strategies without creating a .persist file?
Need time-based ones (every 5 mins, etc.) for environmental measurements…

thanks a lot

You could create a simple persist file that exposes groups and then just add the items to those groups.

As a side note, another neat little trick is to create a ‘Non-Semantic’ master group which can act as a root container, so that when a model is viewed with the non-semantic checkbox selected it shows a nice tree-view.

Is there no other way to change those strategies in the ui?

I don’t believe the MainUI includes anywhere to set persistence (at least I haven’t come across anywhere).

I do know that rrd4j is installed by default and has a default config that sets all items to persist on everyChange with restoreOnStartUp, so that the ‘Analyze’ link works out of the box. Note: if you create a custom rrd4j config this will override the default.

so if i would use the standard example of the OH-docs:

// persistence strategies have a name and definition and are referred to in the "Items" section
Strategies {
        everyHour : "0 0 * * * ?"
        everyDay  : "0 0 0 * * ?"

        // if no strategy is specified for an Item entry below, the default list will be used
       default = everyChange

 * Each line in this section defines for which Item(s) which strategy(ies) should be applied.
 * You can list single items, use "*" for all items or "groupitem*" for all members of a group
 * Item (excl. the group Item itself).
Items {
        // persist the Item state of Heating_Mode and Notifications_Active on every change and restore them from the db at startup
        Heating_Mode, Notifications_Active: strategy = everyChange, restoreOnStartup

        // additionally, persist all temperature and weather values every hour
        Temperature*, Weather* : strategy = everyHour

would it persist all temp values from my semantic model with



i hesitate a little from creating a custom .persist file… Will it stopp persisting every other item that hasn’t been declared in the new .persist file?

thanks a lot!

rrd4j is installed by default, and defaults to storing everything it can.


Yes, after OH3 clean installation i changed the persistence to InfluxDB without a .persist file and it still adds new items (sometimes i have to run Fix Permissions) and tracks every item so far on everyChange.

Thanks. so i wont create any .persist file jet.

Found a new way without creating a persist file:
My things are updating every ~10 mins…
Made a group with all the needed items.
So i just created a rule in UI which fires on every update(or time based) then run a script with


Works like a charm👍