There is no queryable persistence service registered with the id 'rrd4j'

Hi,

I try to use some persistence features with OH2 (something after build 462) and MySQL/JDBC, but its a bit tricky. OH2 persists all changes to the database and I can retrieve data by sitemap charts.

But it does not work if I use persistence functions within rules.

sendCommand(THERMOSTAT_SET_TEMP, THERMOSTAT_SET_TEMP.previousState(true).state as Number);

throws

2016-09-04 16:04:24.753 [WARN ] [nce.extensions.PersistenceExtensions] - There is no queryable persistence service registered with the id 'rrd4j'

And thats true. I have no rrd4j persistence service but a mysql service. In OH1 there was a default setting, but this was removed from OH2 !?

I only use mysql as persistence backend (and my.openhab). So how can I setup mysql as my default persistence service on OH2?

Thanks!

P.S.: If I add ‘mysql’ to previousState(true, 'mysql') it works as expected.

The default setting has not be removed, but moved. You will find it in runtime/etc/services.cfg. Note that this file is not meant to be edited through, but you can overwrite the setting by simply defining your default in conf/services/runtime.cfg.

Nonetheless, I agree that rrd4j as a system default does not really make sense, so I have removed it with https://github.com/openhab/openhab-distro/pull/274.

Hope this helps!
Kai

Thanks!

Hi Kai,
how does the persistence line has to look like?
In OH1 I had in openhab.cfg

persistence:default=influxdb

Which line do I need in conf/services/runtime.cfg?

Thanks Michael