I need too swap persist services too something that can handle all types of items and restore them on startup had issues with jjd4j and mapdb (check edits)
EDIT :
I have installed influxdb set it too default in runtime.cfg
Uninstalled all other persistence, created the persist file and set as default persistence in mainui
It looks like influx is now running the mainui charts and restores items on startup i wanted all items stored and restored on startup but it looks like switch items are not restored
I wanted persist all items every minute for charts and every change and restore them all on startup
If all you care about is restoreOnStartup why not use MapDB? I keep rrd4j for charting and use MapDB for restore on startup and was able to greatly simplify my setup, eliminating three services entirely (InfluxDB, Grafana, Grafana Image Renderer).
I’m not sure if having restoreOnStartup on to lines will cause OH to try to restore twice which admittedly shouldn’t cause a problem but it’s unnecessary.
I’ve seen some other reports with problems with Switches and Contacts in InfluxDB. I think an issue was filed but don’t use InfluxDB any more so haven’t followed it.
As the data ages it gets decimated. Ten concurrent entries are replaced with one value that is the average.
But does it really matter that you have a precise reading every minute from a day two years ago? Most of the time no, it doesn’t. Having one reading every 20 minutes that is the average of those is most of the time more than sufficient. (Note, I’m making that 1 every 20 minutes thing up, I don’t have memorized the decimation schedule).
But Sharpy specifically stated they moved to InfluxDB because rrd4j doesn’t support restoreOnStartup for all Item types, which is true.
The charts are generated from the default persistence service so you must set it to rrd4j (if using the two). MapDB does not have to be the default to do restoreOnStartup.
However, if setting up MapDB for restoreOnStartup you will want to create an rrd4j.persist file with something like:
* : strategy = everyChange, everyMinute
By default (this is new as of OH 3) rrd4j will try to restoreOnStartup too. Which persistence actually does the restore will be a matter of timing and I can imagine that might lead to unexpected behaviors.
I believe MapDB by default will save every change with restoreOnStartup too but the docs seem to have gone missing so I can’t say for sure. Defining that in the mapdb.persist file might be wise too.