CHart displays one item correctly, another one not

Hi,

I setup mapdb, rrd4j and influxdb according to the article Design Pattern: Group Based Persistence of @rlkoshak

Now I have different items that I are displayed in a chart, several are not displayed.
Here is one sample for each of them:

  1. WORKS

    // Persistence Groups
    Group gMyOpenhab // for Items that are exposed to IFTTT
    Group gChart // for Items to persist for charting
    Group gHistory // for Items to preserve their history
    //Group gRestore // for Items to restore on startup (currently everything so commented out)

    // To choose a proper chart period in a sitemap
    // mappings=[0=“Tag”, 1=“Woche”, 2=“Monat”, 3=“Jahr”]
    Number chart_period “Graph Zeitraum”

    // Wetter
    Group gChartWeather "Wetterdaten"
    Number Temperature “Temperature Outside” (gChart, gChartWeather) { channel=“yahooweather:weather:munich:temperature” }

Sitemap:
Chart item=Temperature period=D refresh=30000 visibility=[chart_period==0, chart_period==“Uninitialized”]

It works with rrd4j and influxdb

  1. WORKS NOT

    Number SpeedtestResultPing “Ping [%.3f ms]” (gHistory)
    Number SpeedtestResultDown “Downlink [%.2f Mbit/s]” (gChart, gChartSpeedtest)

Sitemap:
Chart item=SpeedtestResultDown period=D refresh=30000 visibility=[chart_period==0, chart_period==“Uninitialized”]

But data is recorded for both items, and I cannot see any difference why it works for the one but not for the other.

select * from Temperature
name: Temperature
time value


1492291089204000000 8
1492291256414000000 8
1492291856486000000 8

select * from SpeedtestResultDown
name: SpeedtestResultDown
time value


1492291291008000000 41.09
1492291443281000000 41.09
1492293617085000000 38.15

Thankful for any ideas
Cheers MArkus

Show your .persist files

// rrd4j.persist file: I use rrd4j for historic data. Because of limitations of rrd4j data must be saved at least every minute for charting or else you end up
// with blank charts and previousState and historicState do not appear to work.

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

    default = everyChange

}

Items {
// additionally persist weather info every minute
gHistory* : strategy = everyUpdate, everyMinute
// gChart* : strategy = everyUpdate, everyMinute
}

// influxdb.persist file: I use InfluxDB along with Grafana for generating complex and attractive charts. See the InfluxDB+Grafana tutorial28 for details.
// persistence strategies have a name and a definition and are referred to in the “Items” section

Strategies {
default = everyChange
}

Items {
gChart* : strategy = everyUpdate
}

// mapdb.persist file: I only use MapDB for restoreOnStartup and restoreOnStartup applies to all Items

Strategies {
default = everyUpdate
}

Items {
// persist all items on every change and restore them from the db at startup
* : strategy = everyChange, restoreOnStartup
}

Now when I stored everything in rrd4j all charts work.

So obviously the chart didnt work with influxdb, but I checked the data was written to influxdb.
Is there any config I need to do to tell the charts to use influxdb?

There shoudn’t be. Note that if influxdb is not your default persistence engine, you need to provide it in your Chart element on the sitemap.

Chart item=Temperature period=D refresh=30000 service="influxdb" visibility=[chart_period==0, chart_period=="Uninitialized"]

Otherwise, it tries to use whatever is the default persistence which probably doesn’t have these Items in it to chart.

thanks a lot, now it seems obvious to me…