HABdroid also shows an empty graph.
But then again, if I access the classic UI from my PC, I can see the chart with data.
Also the log confirms that rrd4j is working:
2016-09-16 21:52:00.080 [DEBUG] [sistence.rrd4j.internal.RRD4jService] - Stored 'Aeon_CO_Humidity' with state '54' in rrd4j database
2016-09-16 21:52:00.092 [DEBUG] [sistence.rrd4j.internal.RRD4jService] - Stored 'Thermostat_WZ_SetTemp' with state '4.5' in rrd4j database
2016-09-16 21:52:00.104 [DEBUG] [sistence.rrd4j.internal.RRD4jService] - Stored 'Thermostat_BR_Valve' with state '0' in rrd4j database
Any idea why this isn’t working? Do I need to install something else? I am using the OH2 snapshot of a few days ago.
Okay, I just checked the implementation.
The entry point for the REST call is apparently org.eclipse.smarthome.io.rest.core.persistence.PersistenceResource.httpGetPersistenceServiceItems() which seems to call org.openhab.core.persistence.internal.QueryablePersistenceServiceDelegate.getItemInfo().
This method again just returns an empty Set.
If I got this right, then that’s the reason why the rest call returns an empty array.
A GET call for a specific persistence item ( /persistence/items/{itemname}) actually works.
Still no clue why the chart shows up on classic UI but not on HABdroid though…
Okay, I just realized that my group items itself are not persisted anymore.
All items inside the group are persisted (I can see rrd4j files in userdata/persistence/rrd4j) but the group item itself doesn’t have a rrd4j file anymore. This has been working before as I have old rrd4j files for the group items.
Did anything change recently regarding this? I didn’t change my persistence configuration in a long time, just updated to the latest OH2 snapshot and the latest rrd4j binding recently.
However, the android client compares the type with “GroupItem” in order to determine the URL for the rrd4j chart.
Because the type is Group, and not GroupItem, the android client uses the rrd4j URL for plain items, which results in an empty chart: http://raspberrypi:8080/chart?items=TemperatureChart&period=4h&random=410744457
So seems to be a mismatch between OH2 and the android client?
And for the other issue (why the group items are not persisted), this is actually normal and is described in the documentation Don’t know why I have rrd files for the group, they shouldn’t be there.
Ah, good catch! Yes, that is due to a (breaking) fix in the REST API - the Android app has been adapted recently, here.
But it seems that @digitaldan missed the code that you reference above. Could you create a PR for it? @digitaldan planned to push a new release to the Play store soon, so this fix should make it in there!
oot@openhab:/var/lib/openhab2/persistence/rrd4j# cat /etc/openhab2/persistence/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 * * * * ?”
}
So you are only persisting the items in group gWS4444PC.
The one item you tried to get data from seems to be updated when looking at the file date.
So you should have data from within the last day ( which is the default time frame for the REST query.
How do you show the chart in HABPANEL?
Everything looks OK to me, so I’m out of ideas.
You are persisting data (.rrd files get updated, habpanel shows the charts from the rrd4j database).
From where do you try to access the database via the REST or HABDroid, from the local net or from somewhere else (for HABdroid it would be through MyOpenHAB and should work)?