[SOLVED] Charts are empty (group) or display a straight line (single)

Hi there, I’ve a problem with the temperature charts. A time ago they were visible, but since last week (didn’t change anything) they show no values for groups or a straight line (actual value) for single values.

rrd4j.persist

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

Items
{
EG_Flur_Solltemperatur : strategy = everyMinute
EG_Flur_Isttemperatur : strategy = everyMinute
 
Heizung_Aussentemperatur : strategy = everyMinute
}

default.items

Group   EG_Flur_Temperatur                      
Number  EG_Flur_Isttemperatur                  "℃ Flur EG IST-Temperatur [%.1f °C]"          <temperature>       (EG_Flur, EG_Flur_Temperatur, AVG_Temp, gTemperatur)              { channel="onewire:temperature:bridge:28_FF3ECE001704:temperature", channel="knx:device:bridge:MDT-AKH-080002:EG_Flur_Isttemperatur" }
Number  EG_Flur_Solltemperatur                 "Flur EG SOLL-Temperatur [%.1f °C]"           <temperature>       (EG_Flur, EG_Flur_Temperatur)                           { channel="knx:device:bridge:MDT-AKH-080002:EG_Flur_Solltemperatur" }

Number Heizung_Aussentemperatur             "Aussentemperatur [%.1f °C]"                <temperature>           { channel="mqtt:topic:mosquitto:heizung:aussentemperatur" }

sitemap

Text label="Aussentemperatur" icon="chart"
{
    Switch item=Chart_Zeitraum_D_W_M_Y label="" mappings=[0="Tag", 1="Woche", 2="Monat", 3="Jahr"]
    Chart item=Heizung_Aussentemperatur period=D refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==0, Chart_Zeitraum_D_W_M_Y=="Uninitialized"]
    Chart item=Heizung_Aussentemperatur period=W refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==1]
    Chart item=Heizung_Aussentemperatur period=M refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==2]
    Chart item=Heizung_Aussentemperatur period=Y refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==3]
}

Text label="EG Flur" icon="chart"
{
    Switch item=Chart_Zeitraum_D_W_M_Y label="" mappings=[0="Tag", 1="Woche", 2="Monat", 3="Jahr"]
    Chart item=EG_Flur_Temperatur period=D refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==0, Chart_Zeitraum_D_W_M_Y=="Uninitialized"]
    Chart item=EG_Flur_Temperatur period=W refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==1]
    Chart item=EG_Flur_Temperatur period=M refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==2]
    Chart item=EG_Flur_Temperatur period=Y refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==3]
}

rrd4j seems to be working, the values are stored in the db.

log

16:10:00.123 [DEBUG] [rsistence.rrd4j.internal.RRD4jService] - Stored 'EG_Flur_Solltemperatur' with state '21.0' in rrd4j database
16:10:00.235 [DEBUG] [rsistence.rrd4j.internal.RRD4jService] - Stored 'EG_Flur_Isttemperatur' with state '21.25' in rrd4j database
16:10:00.365 [DEBUG] [rsistence.rrd4j.internal.RRD4jService] - Stored 'Heizung_Aussentemperatur' with state '10.2' in rrd4j database

Restarted oh2, cleaned the cache & tmp directory … I’ve no more ideas.

Uninitialized is not is use anymore, use UNDEF
Have you tried removing the default line in the strategies?
OH may need to be restarted after modifying the .persist file.

    Chart item=Heizung_Aussentemperatur period=D refresh=30000 visibility=[Chart_Zeitraum_D_W_M_Y==0, Chart_Zeitraum_D_W_M_Y=="UNDEF"]

Changed Undefined to UNDEF and testet removing the default strategy. Values are written into the rrd files but nothing changed in the chart display.

Single
single

Group
group

What is your default persistence service in PaperUI -> Configuration -> System -> Persistence?

I leave the default persitence empty. For other items I’m using mapdb. :face_with_raised_eyebrow:

Ok so either put rrd4j as default persistence of specifiy the persistence to be used in the chart element on the sitemap:

    Chart item=Heizung_Aussentemperatur refresh=30000  period=D service="rrd4j" period=D visibility=[Chart_Zeitraum_D_W_M_Y==0, Chart_Zeitraum_D_W_M_Y=="UNDEF"]

And ensure that the order of the parameters are the same as in the docs. The parsers can be very picky.

You’re my hero! Since I’ve insert service=“rrd4j” it is working!!! But … why was it working in the past. :thinking: No matter! Thank you and have a nice weekend!

Because openHAB uses the default database specified in the Settings. If no database is specified it will use the first one it finds.

See from link above:

service sets the persistence service to use. If no service is specified, openHAB will use the first queryable persistence service it finds. Therefore, for an installation with only a single persistence service, this is not required.

1 Like

I strongly advise you to specify a default persistence service. As you can see, not have one can cause some services to “float”

Yep, I’ll do so!