[SOLVED] Rrd4j persists issue with strategy "everyChange"

charts
Tags: #<Tag:0x00007f01486c6470>

(Dennis Lang) #1

Hello Guys,

I try to implement Charts for Temoerature of my heaters and Outdoor. If I set only an Item and set “everyMinute” everything is working fine. But if I change to “everyChange” no values is saved.

Further I cannot set multiple Charts be setting a group I here i get no chart (not an empty one - totally no chart)

What I doing wrong?

This is my (working) rrd4j.persist :

Strategies {
 everyMinute : "0 * * * * ?"
   everyHour : "0 0 * * * ?"
    everyDay : "0 0 0 * * ?"
}
 
Items {
 //ein Item wird jede Minute persistiert:
 WohnzimmerCurrentTemp : strategy = everyMinute //jede Minute wird der Wert gespeichert 
 KuecheCurrentTemp : strategy = everyMinutee //jede Minute wird der Wert gespeichert 
 SchlafzimmerCurrentTemp : strategy = everyMinute //jede Minute wird der Wert gespeichert 
 GaestezimmerCurrentTemp : strategy = everyMinute //jede Minute wird der Wert gespeichert 
 ArbeitszimmerCurrentTemp : strategy = everyMinute //jede Minute wird der Wert gespeichert 
 BadCurrentTemp : strategy = everyMinute //jede Minute wird der Wert gespeichert 
 MFZCurrentTemp : strategy = everyMinute //jede Minute wird der Wert gespeichert
 NetatmoIndoorTemp : strategy = everyMinute //jede Minute wird der Wert gespeichert
 NetatmoOutdoorTemp : strategy = everyMinute //jede Minute wird der Wert gespeichert
}

This is my not working File:

Strategies {
 everyMinute : "0 * * * * ?"
   everyHour : "0 0 * * * ?"
    everyDay : "0 0 0 * * ?"
}
 
Items {
 //ein Item wird jede Minute persistiert:
 WohnzimmerCurrentTemp : strategy = everyChange //Bei Änderung wird der Wert gespeichert 
 KuecheCurrentTemp : strategy = everyChange //Bei Änderung wird der Wert gespeichert 
 SchlafzimmerCurrentTemp : strategy = everyChange //Bei Änderung wird der Wert gespeichert 
 GaestezimmerCurrentTemp : strategy = everyChange //Bei Änderung wird der Wert gespeichert 
 ArbeitszimmerCurrentTemp : strategy = everyChange //Bei Änderung wird der Wert gespeichert 
 BadCurrentTemp : strategy = everyChange //Bei Änderung wird der Wert gespeichert 
 MFZCurrentTemp : strategy = everyChange //jede Minute wird der Wert gespeichert
 NetatmoIndoorTemp : strategy = everyChange //jede Minute wird der Wert gespeichert
 NetatmoOutdoorTemp : strategy = everyChange //jede Minute wird der Wert gespeichert

HeizungCurrentTemp * : strategy = restoreOnStartup, everyChange //bei jeder Änderung des Wertes wird dieser gespeichert 
}

Thank you!


(Angelos) #2

Source: https://www.openhab.org/addons/persistence/rrd4j/


(Markus Storm) #3

While I can confirm I’ve hit the same problem when I omitted everyMinute, I wonder whether the docs are correct here. Is it really everyMinute that has to be there or could it be any strategy as defined in the Strategies{} section ? everyMinute is causing unnecessary load and writes (bad if going to SD cards).
Could you check if it works with everHour or similar (plus everyChange, of course) as well ?
You can setup debugging to get output on items being persisted: org.openhab.persistence.rrd4j if I’m not mistaken.


(Dennis Lang) #4

ok - but what is with my second problem! I get no chart with group items

in the sitemap I see only:


(YvesHanoulle) #5

I 'm using influxDB, yet the saving is similar.
There I have

Strategies {
everyMinute : “0 * * * * ?”
every5Minutes : “0 */5 * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
default = everyChange
}


(Rich Koshak) #6

My experience with rrd4j is quite old but it used to be that if you don’t use everyMinute with rrd4j you cannot generate charts and you cannot query for historic data from rrd4j. Since a write only database isn’t all that useful…

It has something to do with the way rrd4j works internally. The rrd4j config can be changed so you could use some other periodic strategy (don’t ask me how), but there must be a value saved every so often for the database to function.


(Jürgen Baginski) #7

On your missing chart problem, please post your sitemap file.


(Dennis Lang) #8

Hi,

Thank you, here the intesting part!

Chart item=HeizungCurrentTemp period=h refresh=30000

BR


(Angelos) #9

remove the space after the Group name


(Dennis Lang) #10

Already done - but it still not work!


(Angelos) #11

did you add everyMinute to the Group’s persistence?

HeizungCurrentTemp* : strategy = everyMinute, everyChange, restoreOnStartup, //bei jeder Änderung des Wertes wird dieser gespeichert

Which Items are members of the HeizungCurrentTemp Group?
If you list the Group, you don’t need to list the individual Items belonging to the Group in your rrd4j.persist


(Dennis Lang) #12

Are members of the Group “HeizungCurrentTemp”


(Angelos) #13

in this case, you only need to list the Group to cover them
any additional Items which are not members of this Group, you can list them individually (but remember to add the everyMinute strategy in your rrd4j.persist

do you have more than 1 persistence service installed? or only rrd4j?


(Dennis Lang) #14

You are right, thank You - Now I deleted the individual Items which member in the Group and the indevidual Charts still working! But I cannot see the Multiple Chart of the group.

only this peristence


(Angelos) #15

I don’t know if there is any limitation with regards to how many Grouped Items can be displayed on a single graph (you have 7 Items now)

Try the following: Create another Group, put only 2 Items as members, add it in persistence and try to graph this on your sitemap

Ps: If you want advanced graphs, take a look at: InfluxDB+Grafana persistence and graphing


(Dennis Lang) #16

Already tried! Also with 2 items it ins not working!


(Angelos) #17

Kim can provide the solution (joking):
image

I really don’t know what is wrong… your Chart element looks correct to me
maybe leave some time to pass for the system to collect some data in persistence and then try to display the graph?


(Jürgen Baginski) #18

Me too! I created a chart with a 2 member group just last night and don’t see the problem. The last Point you didn’t post so far (Definition of Group and items) seems to be correct (otherwise the persistence would have stopped).


(Angelos) #19

I found something (very old) from the wiki: https://github.com/openhab/openhab1-addons/wiki/Explanation-of-Sitemaps#element-chart

Maybe this was patched (or maybe not… i didn’t check github)

Can you post your Items to be checked?


(Dennis Lang) #20

I will read this for advanced graphs - may I switch to this!

Many thanks for you support!