[SOLVED] All charts is empty

Hello everyone!
Problem: All charts in OH2 is empty, database is empty, although rrd files are being created.
In the community there are a lot of topics on this issue, but none of them helped me. Apparently many people have difficulty setting up a chart.

My setup: rPi3+Openhabian v1.5, openHAB 2.4.0-1
After installing in openhabian-config was chosen Update, Upgrade System, Optional components, Log Viewer, Mosquitto.
In PaperUI installing MQTT Binding and RRD4J Persistence.
MQTT configured, everything works, values in the item are available.
In PaperUI > Configuration > System > Persistence chose default service rrd4j.


Strategies {
    everyMinute : "0 * * * * ?"
    everyHour 	: "0 0 * * * ?"
    everyDay 	: "0 0 0 * * ?"
    default = everyChange
Items {
    D0, T0, H0, T1, T2, T3, H1, H2, H3, T00 : strategy = everyHour


Group	dChart	"Chart Pressure"
Group	tChart	"Chart Temps"
Group	hChart	"Chart Humids"
Number	D0	"Pressure [%.1f mm]"	<pressure>	(dChart) {channel="mqtt:topic:myhome:D0"}
Number	T0	"Temp0 [%.1f °C]"	<temperature>	(tChart)	{channel="mqtt:topic:myhome:T0"}
Number	H0	"Hum0 [%.1f %%]"	<water>	(hChart)	{channel="mqtt:topic:myhome:H0"}
Number	T1	"Temp1 [%.1f °C]"	<temperature>	(tChart)	{channel="mqtt:topic:myhome:T1"}
Number	H1	"Hum1 [%.1f %%]"	<water>	(hChart)	{channel="mqtt:topic:myhome:H1"}
Number	T2	"Temp2 [%.1f °C]"	<temperature>	(tChart)	{channel="mqtt:topic:myhome:T2"}
Number	H2	"Hum2 [%.1f %%]"	<water>	(hChart)	{channel="mqtt:topic:myhome:H2"}
Number	T3	"Temp3 [%.1f °C]"	<temperature>	(tChart)	{channel="mqtt:topic:myhome:T3"}
Number	H3	"Hum3 [%.1f %%]"	<water>	(hChart)	{channel="mqtt:topic:myhome:H3"}
Number	T00	"Temp00 [%.1f °C]"	<temperature>	(tChart)	{channel="mqtt:topic:myhome:T00"}


sitemap myhome label="MY HOME" {
    Frame label="Charts Temps" {
        Chart item=tChart label="Chart temps" period=W refresh=60000
    Frame label="Chart Temp0" {
        Chart item=T0 label="Temp0" period=D refresh=60000



All files are updated every 10 minutes.

In REST API > Persistence > GET /persistence/items/{itemname}
serviceId > rrd4j
itemname > T0
Tri it out!

"name": "T0",
"datapoints": "0",
"data": []

URL: http://openhab:8080/rrdchart.png?items=T0&period=h

Tried it:

sudo apt install libfontconfig1 fontconfig ttf-dejavu
Reading package lists... Done
Building dependency tree
Reading state information... Done
fontconfig is already the newest version (2.13.1-2).
libfontconfig1 is already the newest version (2.13.1-2).
ttf-dejavu is already the newest version (2.37-1).

As I understand it, the database is empty, although rrd files are being created.
Please, what am I doing wrong?


Thanks, binderth
I just forgot to configure /var/lib/openhab2/services/rrd4j.cfg
Thanks to all!

I am confused. The red file IS a database hence the name “round robin database” it is a fixed size database where older items get replaced after the configured size is reached.
I am still new here but are you sure red is the correct choice for this application?

how did you define the items in the rrd4j.cfg? My guess is, there’s something missing…

From the documentation

When using rrd4j persistence, the strategy everyMinute (60 seconds) has to be used. Otherwise no data will be persisted (stored) and the chart will not be drawn properly


Yes, I did not configure this file …
I did it only according to this documentation, of course there is no talk about it in it.
Thanks, I’ll be there.

1 Like

Yes, on the overall persistence documentation this special requirement (everyminute) is not stated, looking on the rrd4j documentation Here would show it.

1 Like

Thanks, binderth
I just forgot to configure /var/lib/openhab2/services/rrd4j.cfg
Thanks to all!

1 Like