RRD4J doesn't store any data

Setting up to IDE takes some time, especially if it is the first time for you.

Found an older thread with a suggestion to remove the “_” in an item-name in order to make rrd4j start persisting. It should be worth a try.
On the topic “naming restrictions” I’m actually scanning the code (with no luck so far) for real restrictions.

[Edit:] That gives evidence of my stupidity! I am using Items like “E10_1” which are persisted with rrd4j without any problem!:blush:

Also saw this old thread and already tried it. Didn’t solve the issue.

:frowning_face::frowning_face::frowning_face:

In order to help, could you post or PM the log from startup up to 20 minutes runtime? I have no clue what I’m looking, but…

Sorry, for the late reply. I was pretty busy in the last few days.

You can download the logs here.
But I would be surprised if you find anything. org.openhab.persistence.mapdb and org.openhab.persistence.rrd4j were set to loglevel DEBUG.

Thanks!

Good morning,
can’t look into the log from here.
however, the user in this thread, who seems to have been experiencing the same problem, concluded it might have been caused by the use of the Homegear binding. Although this is NOT confirmed, could you state your system specifics for hardware and the your used addons?

I’m using OH on a RaspberryPi 3 together with the KNX binding.

But I’ve now disabled everything and just set up a minimal demo case: In this config I have only one test item together with a rule which updates the test item every minute with a random int value. Even with this setup no data is stored with RRD4J.
Then I copied this config over to my Linux workstation (Ubuntu 17.10) and tried it there. Same issue.

You can download the demo config here. Feel free to try yourself. On my workstation and the Raspberry I was using OH installed from the APT sources (stable release).

Thanks!
Michael

I’m sorry, but ad said I’m out of ideas. (Can’the read the setup on my phone)

No problem. I don’t say that you have to have an answer. :slight_smile:
The good news is that we now have a minimal reproduction case. I’ll file a bug for that. Would be great if anyone else could try to reproduce it with mentioned config.

Did you file a bug yet?
I’ll be trying to get rrd4j working, total fail so far.

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