Setting up rrd4j and storing and displaying temperature

Hi

I’m quite frustrated. I tried to setup rrd4j persistence and store the temperature data of one item.
Unfortunately nothing gets stored. I have no clue.

Here the steps I did:
1.) Installed rrd4j binding via Paper UI
Karaf Console says: 190 │ Active │ 80 │ 1.11.0.201711190210 │ openHAB RRD4j Persistence Bundle
2.) I left rrd4j.cfg untouched
3.) I change in PaperUI the default persistence to rrd4j
4.) I change addons.cfg: persistence = rrd4j
5.) I created a file rrd4j.persists

// 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 * * * * ?"
        everyHour	: "0 0 * * * ?"
    }
    Items {
        // which data to be stored
    	Outdoor_Temperature : strategy = everyMinute
    	}

The Outdoor_Temperature Item is defined as
Number Outdoor_Temperature "Aussentemperatur [%.1f]" <temperature> (gTemperature) {knx="<1/1/5"}

6.) I restarted OH2 Service
7.) No errors in any log files
8.) No Output in /var/lib/openhab2/persistence/rrd4j

I tried to generate a chart, which is for sure generating an error:
2017-11-22 19:44:20.998 [ERROR] [4j.internal.charts.RRD4jChartServlet] - Error generating graph: {} java.io.FileNotFoundException: Could not open /var/lib/openhab2/persistence/rrd4j/Outdoor_Temperature.rrd [non existent]

Any help is really welcome.

You mean rrd4j.persist ?

yes, rrd4j.persist
Here the extract from the logfile after re-start:

2017-11-22 19:48:05.031 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2017-11-22 19:48:05.096 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2017-11-22 19:48:05.125 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard
2017-11-22 19:48:05.623 [INFO ] [b.core.service.AbstractActiveService] - Plex Refresh Service has been shut down
2017-11-22 19:48:26.668 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'plex.items'
2017-11-22 19:48:27.069 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'knx.items'
2017-11-22 19:48:27.488 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.items'
2017-11-22 19:48:27.535 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'status.items'
2017-11-22 19:48:28.112 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rdd4j.persist'
2017-11-22 19:48:37.298 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'jalousie.rules'
2017-11-22 19:48:41.311 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.rules'
2017-11-22 19:48:41.758 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'weather.rules'
2017-11-22 19:48:43.212 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'status.rules'
2017-11-22 19:48:44.319 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'astro:sun:local' to inbox.
2017-11-22 19:48:44.336 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'astro:moon:local' to inbox.

You make the same typo as I do:

rdd4j.persist != rrd4j.persist

If that does not solve it I already typed some other suggestions:

Can you enable logging for rrd4j:

log:set DEBUG org.openhab.persistence.rrd4j

I also saw some comments about the _ not always working properly, although I also have rrd4j files with _.

Does your Outdoor_Temperature have a value? Do you have write access to the folder?

I use it via groups and added a * at the of the name, but I don’t know whether its needed or optional…

2 Likes

Thnx Martin. I overlooked it 10 times plus. That solved it! It was just the typo :smiley: