PersistenceViewer

I just made another update that allows for all of the user variables to be put into the URL as a querystring. For example…

http://[openhab server]:8080/static/PersistenceViewer/?serviceId=mapdb&shouldSort=false&startItem=gPersistence

1 Like

I added another query string so that the startup behavior can be to load all items (startWithGroups=false). If you have a lot of items, this will cause the page will be very slow to load! The default behavior is to display groups without parents.

I found the problem with the missing items! It was between my ears!

I had some items (the ones missing) assigned to a non-existent group!

2 Likes

…and the mapDB entries are also shown!

Thank You!

PS: I’m actually most astonished by “was put together by my wife”

She’s so awesome… documented some of our stuff too… and NEVER an issue with WAF!

1 Like

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