[SOLVED] Rrd4j and chart [null error]

  • Platform information:
    • Hardware: RaspberryPi 3b
    • OS: OpenHabian
      • openHAB version:2.5M3
  • Issue of the topic: Cannot generate Charts
    Hi all, I have a problem to create a chart of my items:
    My items file:
  	Number          ControlloCarichi_Ch1TrasmissionePotenza         "Consumo istantaneo [%.2f KWh]" <energy>        (gControlloCarichi)     {channel="knx:device:89dfb93f:44"}

My rrd4j.persist:

Strategies {
// for rrd charts, we need a cron strategy
everyMinute : “0 * * * * ?”

    default = everyChange

}

Items {
// persist items on every change and every minute
ControlloCarichi_Ch1TrasmissionePotenza : strategy = everyChange, everyMinute
OutdoorTemp_Clima_Sala : strategy = everyChange, everyMinute
}

My sitemap:

   Frame label="grafico"    {
                            Chart item= OutdoorTemp_Clima_Sala period=D refresh=30000 service="rrd4j"
                                         }

My logs:

2019-09-09 16:08:46.941 [WARN ] [thome.ui.internal.chart.ChartServlet] - Chart generation failed: null

I have the items files in /var/lib/openhab2/persistence/rrd4j but I don’t know how to check if they are populated with data. Only stranges configuration is that I made a LINK of /var/lib/openhab2/persistence/ to an external disk…

Checking whether the rrd-file contains any entries can be done using the REST API ( install REST Docs to get it).
Read here on how to check for values.

In case you do have values stores it could be related to this issue., which is solved by installing fontconfig.

Good morning Opus, thanks for your time.
I don’t know if it’s normal but that are the rest results:

myserver:8080/rest/persistence
[{“id”:“mapdb”,“label”:“mapdb”,“type”:“Queryable”},{“id”:“rrd4j”,“label”:“rrd4j”,“type”:“Queryable”}]

myserver:8080/rest/persistence/items?serviceId=rrd4j
[ ]

myserver:8080/rest/persistence/items/ControlloCarichi_Ch1TrasmissionePotenza?serviceId=rrd4j
{“name”:“ControlloCarichi_Ch1TrasmissionePotenza”,“datapoints”:“179”,“data”:[{“time”:1568056800000,“state”:“0.18329166666666669”},{“time”:1568057040000,“state”:“0.25043589743589745”},{“time”:1568057280000,“state”:“0.2495”},{“time”:1568057520000,“state”:“0.2574166666666666”},{“time”:1568057760000,“state”:“0.2152083333333333”},{“time”:1568058000000,“state”:“0.176875”},{“time”:1568058240000,“state”:“0.16425”},{“time”:1568058480000,“state”:“0.178125”},{“time”:1568058720000,“state”:“0.17412500000000003”},{“time”:1568058960000,“state”:“0.13316666666666666”},{“time”:1568059200000,“state”:“0.2715416666666667”},{“time”:1568059440000,“state”:“0.16”},{“time”:1568059680000,“state”:“0.162”},{“time”:1568059920000,“state”:“0.25175000000000003”},{“time”:1568060160000,“state”:“0.21350000000000002”},{“time”:1568060400000,“state”:“0.230875”},{“time”:1568060640000,“state”:“0.23249999999999998”},{“time”:1568060880000,“state”:“0.19137500000000002”},{“time”:1568061120000,“state”:“0.11025”},{“time”:1568061360000,“state”:“0.09333333333333332”},{“time”:1568061600000,“state”:“0.09250000000000001”},{“time”:1568061840000,“state”:“0.08633333333333335”},{“time”:1568062080000,“state”:“0.057999999999999996”},{“time”:1568062320000,“state”:“0.05658333333333333”},
And so on…

So, what is strange for me is that second query (myserver:8080/rest/persistence/items?serviceId=rrd4j) result empty… Do you think is my case the second one? I’ll try to install fontconfig

EDIT:
Install the fontconfig packet solved the problem! You made my day :smiley:
Solution:
$sudo apt install fontconfig

That is normal, the request for all items for a specific persistence Service never workerd (I think).

I’m glad you got it working. Do you remember from when your original openhabian installation was? Mine is rather old (> 1 year+) and I haven’t run into this issue and as you saw that issue should be solved for actually downloaded version.

My installation is 6-8 month old :confused:

Thanks, that fits. Issue was solved in July.

1 Like