Persistence config in OH3 with InfluxDB (v1.8)

Hello,

i’m wondering how the configuration of persistence (strategies, groups, items) is done with openHAB3.

I’ve set up a oh3M3 with all my items and rules and so far everything seems to be running good.
But it seems OH3 with influxdb as default service is persisting every item on every change by default.
When i copy/paste my old influxdb.persist file from my 2.5.10 to /conf/persistence of the M3 instance nothing is persisted anymore, not even the items with the correct group membership ?!?

Tried to
LOG:SET DEBUG org.openhab.persistence.influxdb and also
LOG:SET TRACE org.openhab.persistence.influxdb
but i can’t find any entries in any log file.

ItemStateEvents and ItemChangedEvents are logged and are also sent to my MagicMirror installation by a rule, so this part is working fine.

Any hints what i’m doing wrong or missing here?

Regards,
Thorsten

I can’t say what is going wrong but I can say that the. persist file is unchanged between OH 2 and OH 3.

Hey Rich,

checked my config and items after your comment and it seems i had some typo in there.
Working as intended now, should have double checked before posting i guess :confused:

I define my things and items from text files. Persist strategies in my older configurations were based on groups defined in these text files. Is this still valid with OH3?

Hi Rob,

groups for persisting still work for me.
when i switched to OH3 i’ve used “Add Item from Textual Configuration”
All items i want to persist in my influxdb have a group “gInfluxTag” and the influxdb.persist file looks like this:

Strategies {
everyMinute : "0 * * * * ?"
everyHour   : "0 0 * * * ?"
everyDay    : "0 0 0 * * ?"

default = everyChange
}

Items {
gInfluxTag*			: strategy = everyChange, everyMinute
}

regards,
T.

Thanks for the quick reply Raven.

I recently upgraded to OH3 and have carried over my influxdb.persist configured similar to yours from OH2, but this is seemingly not working (I am talking in context to “Analyze” button in items in the “new paper UI” here, not Grafana). Are there any additional steps involved here that need to be performed.

Hi Rob,

pretty sure you have to set your default persistence service to influx in the UI
See here:
persist1
persist2

Regards

1 Like

What is the proper way to debug .persist files? Where can I set level of logging?

Is restarting the openhab.service enough to reload changed .persist file?

Change the logging level of the add-on itself. There isn’t any generic logging for loading the .persist fine beyond general syntax problems you’d already be seeing.

Yes, that restarts the whole program.

1 Like

Thanks, I just realized I can set LOG levels in openhab-cli. (This info couldb be added to documentation)

It also looks like .persist file is reloaded with each change automatically (all changes are monitored).