Ambiguous feature call.
The extension methods
postUpdate(Item, State) in BusEvent and
postUpdate(Item, Number) in BusEvent
both match.
Is the above line of code the correct way to specify the persistance service to be used?
Also, the default service is set to be mapdb. In what situations is this setting used? It seems I needed it for mapdb and rrd4j in order for one of them to work. The one not set there then has to be specified in the code as above. Influx seems quite happy without being specified anywhere.
i figured this thread might be the most fitting for my question, even though its a couple of years old now.
I started using multiple persistence services because i noticed that some values are not getting properly restored on startup.
So now i’m using rrd4j for charts and mapdb for reboot recovery.
Like m4rk i set the default persistence to mapdb but now the charts are not working. how do i need to set up multiple persistence services as so i get the charts through rrd4j and also get the restore of items on startup with mapdb, is there some textual file i need to change?
That’s why.
The “default” service setting is used by OH3s built-in charting to determine which persistence to fetch data from.
At the time of the original post there was no OH3
Yes, each service is individually controlled by a xxx.persist text file.
Including restore-on-startup, which is easy to nisconfigure for several services to fight over restore.
In OH3, the absence of a particular xxx.persist steering file invokes a default “everything” behaviour for that service.
I’d expect your defaults to have MapDB persisting everything, and restoring it. And rrd4j to be persisting everything numeric and switches, and also restoring it.
Ah okay, i think i got it now.
I do have both files, so one mapdb.persist, one rrd4j.persist
i changed the rrd4j.persist to not have any “RestoreOnStartup” values in it, the mapdb-file has them.
that should mean now if i change my default persistence in oh3 to rrd4j the charts will start to work again and mapdb will only make sure values are restored on startup?