PersistenceViewer

Could you please help me with the setup …

I’ve copied index.php to “/etc/openhab2/html/” (openhabian on RasPI).

image

When I try to call “http://openhabianpi:8080/static/PersistenceViewer/?rrd4j” it says
image

The command “http://openhabianpi:8080/rest/persistence” shows:

[{"id":"mapdb","label":"mapdb","type":"Queryable"},{"id":"rrd4j","label":"rrd4j","type":"Queryable"}]

RRD4J is my default database according to PaperUI

What I’m doing wrong?

You should create the folder “PersistenceViewer” in that folder and put the file into this folder.

This redirects to the page below:

Download the zip, then extract the PersistenceViewer directory to /etc/openhab2/html/. Also make sure the permissions are set so that the openhab account can read them (I think they are set to readable for all).

1 Like

This was obviously the missing part …
I downloaded this https://github.com/openhab-5iver/PersistenceViewer/tree/master/PersistenceViewer index.php

With the index.php from the ZIP it works now :slight_smile:

Thank you for your support!

1 Like

For me it looks like this:

I’ve updated the readme :slightly_smiling_face:

2 Likes

Is it intended that database files are created when selecting an item or a group, even if this item isn’t selected for persisting?
My setup.
rrd4j on OH 2.4 stable
For each item and group which are not persisted I see a .rrd file created at the moment it is clicked the first time in the Viewer.
Should I open an issue?

Yes, but since PersistenceViwer is only reading persistence data through the REST API, this sounds like an OH issue. Try sending the same commands through REST API to find a simple way to reproduce. I’ll help, but later tonight.

Sounds like rrd4j creates a table for everything it knows about.

PinPoint. Doing a REST for for Persistence/Items/{Itemname} created the .rrd! The question remains, is that an issue or intended? Since Kai is working on persistence for OH2, where to report it?

I suggest an issue in openhab1-addons to confirm if this is a bug or expected behavior.

Issue report

1 Like

Small update, but something that has bugged me for a while… the data was not refreshing after changing the date range, so you had to click the Item name again to populate the data. This is now fixed, as well as adding some more characters to the Time column.

2 Likes

I have opdated my openhab to version 3. Now, the PersistanceViewer is not working anymore. Is there a plan to bring it to the level of OH3, would be great.

Maybe try to use URL like below:

http://[openhab server]:8080/static/PersistenceViewer/index.html

For me it works on OH3

Hi Kris, thanks for your answer. I tried it again and now it is working. Maybe it has something to do with the OH3 version.
Thanks again

Hi,

For some reason the timestamp for all my items is every 15 minutes
I’m using rrd4j with the default persistence, so every 1 minute & on change
Any idea what could be the reason for this?

How did you check that? Using the API Explorer/ REST API?
Which Version of openHAB are you using?

Note that the timesteps between readings in a rrd4j database is dependent on the requested timeframe. Asking for a longer timerframe will most probably give you results from an archive that holds consolidated readings (as setup in the used configutation).

Hi Jürgen, thx for your reply
I’m getting the 15min interval on items only with PersistenceViewer, so with the index.html file
If i use the REST API directly, i’m seeing values every minute
I’m running OH 3.1, it’s a clean recent install with default persistence
Timeframe i’m requesting is only 24h, so that should not be the reason
Not sure what is going on, i’m not that good with html :slight_smile:

Ups, I missed that this was posted in a PersistenceViewer thread! I haven’t used it on OH3 (yet)!
Sorry for that.

I do recall having problems getting this viewer to use the correct timeframe.
If the API Explorer (the new name for the REST API) does show the minute values everything should be OK.

Edit:
As per the github page 1. By default, one month of persistence data will be retrieved, unless specific dates are entered in the Start and End date fields.
Which would explain what you are getting.

1 Like