[SOLVED] RRD4J no charts

Thanks for the explanation.

This seems to be ok.

I’m (almost) quite sure.

Which screenshot do you mean?

Thanks for creating an issue ticket.

Is there another option to have charts in the sitemap (e.g. influxdb)?

The very last one showing the PersistenceViewer with the item “EG_bad_x_tp1_energyusage” selected.

Charts can be created by nearly all persistence services ( not by mapdb).
I would not change the service and I still think that you would get a chart from a correctly persited numeric value. The reported issue should be of no concern, stick to the numeric items you are persisting and try to chart them (like a Chart for the item “EG_bad_x_tp1_energyusage”).
If I remember correctly there were some posts about the former ability of rrd4j to convert on/off or true/false items to numeric ones, but this is said to be gone.

I did another test run with one of my backup installations - openHAB 2.4.0-1 (Release Build).

Persistence:

Strategies {
    everyMinute:    "0 * * * * ?"
    every10Minute:  "10 * * * * ?"
    everyHour:      "0 0 * * * ?"
    everyDay:       "0 0 0 * * ?"
    default = everyChange
}
// When using rrd4j persistence, you must use the everyMinute (60 seconds) logging strategy. Otherwise rrd4j thinks that there is no data and will not properly draw the charts.

    EG_bad_x_tp1_switch: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_power: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_energyusage: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_rssi: strategy = everyMinute, restoreOnStartup
	

Sitemap:

    Frame label="RRD4J" {
        Text item=Gcharts {
            
            Chart item=EG_bad_x_tp1_switch refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_power refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_energyusage refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_rssi refresh=60000 period=h legend=true
            }
    }

Immediately there are charts:

So, the question is, what is different?

I really don’t know :frowning:
The .persist and .sitemap codes are quite the same.
The code below is from the buggy setup:

Strategies {
    everyMinute:    "0 * * * * ?"
    every10Minute:  "10 * * * * ?"
    everyHour:      "0 0 * * * ?"
    everyDay:       "0 0 0 * * ?"
    default = everyChange
}

Items {

    SonoffS201_switch : strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_switch: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_power: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_energyusage: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_rssi: strategy = everyMinute, restoreOnStartup
}
    Frame label="RRD4J" {
        Text item=Gcharts {
            
            Chart item=EG_bad_x_tp1_switch refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_power refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_energyusage refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_rssi refresh=60000 period=h legend=true
            }
    }

The only differences are (fresh) text file based installation - the setup (with charting) originated from an oH 2.2. installation including 2 version updates - and the usage of persistence viewer. Which I’ve installed after the problems occurred (as far as I remember) …

I think I’ll start from scratch with another fresh installation on a second SSD …

Good luck!

This is really crazy.

I did another attempt and installed openhabian from scratch.

  1. wrote the image file with Etcher to SSD
  2. booted the raspberry and went through the installation
  3. installed the RRD4J binding via paper UI
  4. copied the following stripped down versions of textfiles to raspi

tplink.things

tplinksmarthome:hs110:YYYY    "TP-Link: Zwischenstecker 1 - HS - HS110"        [ deviceId="XXXXXXXXXXXX", refresh=60 ]

home.items

Switch   EG_bad_x_tp1_switch         "Trockner - Switch"         <selfsocket>    (gM,gR,Gtplink,Gzstecker,Geg,Gbadeg)          {channel="tplinksmarthome:hs110:YYYY:switch"}
Switch   EG_bad_x_tp1_led            "Trockner - Switch Led"     <selfsocket>    (gM,Gtplink,Gzstecker,Geg,Gbadeg)          {channel="tplinksmarthome:hs110:YYYY:led"}
Number   EG_bad_x_tp1_rssi           "Trockner - Signal"         <selfsocket>    (gM,gR,Gtplink,Gzstecker,Geg,Gbadeg)          {channel="tplinksmarthome:hs110:YYYY:rssi"}
Number   EG_bad_x_tp1_power          "Trockner - Power"          <selfsocket>    (gM,gR,Gtplink,Gzstecker,Geg,Gbadeg)          {channel="tplinksmarthome:hs110:YYYY:power"}
Number   EG_bad_x_tp1_energyusage    "Trockner - Energy Usage"   <selfsocket>    (gM,gR,Gtplink,Gzstecker,Geg,Gbadeg)          {channel="tplinksmarthome:hs110:YYYY:energyUsage"}
Number   EG_bad_x_tp1_current        "Trockner - Current"        <selfsocket>    (gM,Gtplink,Gzstecker,Geg,Gbadeg)          {channel="tplinksmarthome:hs110:YYYY:current"}
Number   EG_bad_x_tp1_voltage        "Trockner - Voltage"        <selfsocket>    (gM,Gtplink,Gzstecker,Geg,Gbadeg)          {channel="tplinksmarthome:hs110:YYYY:voltage"}

rrd4j.persist

Strategies {
    everyMinute:    "0 * * * * ?"
    every10Minute:  "10 * * * * ?"
    everyHour:      "0 0 * * * ?"
    everyDay:       "0 0 0 * * ?"
    default = everyChange
}

Items {
    EG_bad_x_tp1_voltage: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_switch: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_power: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_energyusage: strategy = everyMinute, restoreOnStartup
    EG_bad_x_tp1_rssi: strategy = everyMinute, restoreOnStartup
}

test.sitemap

sitemap test label="Test" {
    Frame label="RRD4J" {
        Text item=Gcharts {
            Chart item=EG_bad_x_tp1_switch refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_power refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_energyusage refresh=60000 period=h legend=true
            Chart item=EG_bad_x_tp1_rssi refresh=60000 period=h legend=true
			Chart item=EG_bad_x_tp1_voltage refresh=60000 period=h legend=true
            }
    }
}

The outcome was the same as always:

[thome.ui.internal.chart.ChartServlet] - Chart generation failed: null

The next thing I’ll do is to try a fresh installation on an SD card - maybe there is something wrong with RRD$J in connection with SSD???

Is it correct that persistence-rrd4j is version 1.13.0 - according to paper UI?

The version is correct.
What is your default persistence service in PaperUI? Rrd4j needs to be set there or it needs to be specified in the chart line.

BTW: My raspi is running openhabian from a ssd!

This field is currently empty. But the only persistence I’ve installed is RRD4J

As said before, the chart needs it either there or in the defining line.

BTW: You had it set in your original post!

IT WORKS NOW :smile:

I did a new install on an SD card - and tried the steps above … still didn’t work.

THEN I came across @P4trick’s thread … installed InfluxDB+Grafana - and finally, the charts are back (which is very strange)

image

Next step is to try it on my live system.

Just to understand you are still using rrd4j?

Yes - only RRD4J in this test setup.

Really weird!
Which version did you install? I’m on 2.4.0 Release Build

openHAB 2.4.0-1 (Release Build) - on Raspberry PI 3B with SSD

Don’t know where the “1” is coming from, where did you look for the version? My statement is from the opening statement of the Karaf console.

It from SSH login screen:

Ups, stupid.me! I’m on the same version, also running from a raspi 3B with ssd.
Maybe we should compare our bundle:list. Can’t say how to write that output to afile on the karaf console.

Yes, sure - please let me know how to do …