RRD4J doesn't store any data

I’ve filed one now: https://github.com/openhab/openhab2-addons/issues/2863

My rdd4j is still working, and I update it regularly, your minimal example has at least one problem which I can quickly spot.

The item to which the rdd4j.persist refers to is not the item which is stored in the test.items and my rrd4j.cfg does not contain any active configuration.

Can you please correct that error and try with the latest snapshot.

@chrode maybe you can also share your config?

Mine is simple:

rrd4j.cfg

# just the default commented out lines, nothing active

rrd4j.persist:

// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
        // for rrd charts, we need a cron strategy
        everyMinute : "0 * * * * ?"
}

Items {
    gHistory* : strategy = everyUpdate, everyMinute
    gChart*   : strategy = everyUpdate, everyMinute
}

Items:

Group gChart     // for Items to persist for charting
Group gHistory   // for Items to preserve their history

Group Temperature_Chart (gChart, gHistory)

Number OutsideTemperature  "Buiten temperatuur [%.1f°C]" <temperature> (Temperature_Chart, gSyncToOH2, Avg_Temp) [ "CurrentTemperature" ]  { channel="rfxcom:temperaturehumidity:7153de9b:26382:temperature" }

And the real cause here is also the name of the file:

rrd4j.persist !== rr4dj.persist

Damn! I didn’t see THAT one! Sorry.

1 Like

Don’t be, I only responded when an issue was filled you were and are there always and intime :slight_smile:

Argh … indeed! The typo in the filename was the issue. Thanks a lot for spotting this! I can’t believe it … I triple checked that!
It works now.

I’ll file a FR to issue a warning in the logs if a config file is loaded which doesn’t match an addon name. :wink: I think the confusing part was that I always saw the nice ‘Loading model …’ message when I changed the file or restarted openhab. Therefore I might have believed that everything is working fine and the error must be somwhere else.
Another possibility would be to issue a warning saying that the addon runs with it’s default parameters because no config file was found.

Anyway, thanks a lot for your help. Much appreciated!

Michael

I upgraded yesterday to latest openhab version, deleted the persistence files, restarted, since then everything works fine. THX Martin for your reply

Actually I could not find any information in the wiki that .persist has to be name ot the persistence service you want to use. Stumbled over that post after a full day search! Looks like it is not only me having that problem. Anyway many thanks. That solved my problem and data in chart is displayed.

OH hasn’t use a wiki for years. Are you looking at the most recent docs?

This page does state

Persistence Strategies are configured in a file named <persistenceservice>.persist , stored in $OPENHAB_CONF/persistence . Replace “persistenceservice” with the name of your persistence add-on (e.g. rrd4j.persist ).

If these are the docs you used, do you have a recommendation for how to make this more clear?

1 Like