Chart refresh time not working - Chart refreshes every item state change

Hi all,

I am using a chart in my sitemap which is based on persistence data of a group item from rrd4j service:

Chart item=gSDMEnergy service="rrd4j" period=D refresh=30000

My problem is, that the refresh interval (here 30000ms) does not influence the refresh time.

The chart reloads every time one of the items in the group changes. Because this happens very often in my case (every 2 or 3 seconds), the charts flickers on and off and it is not possible to read it.

So my question is, why does the refresh parameter does not control the refresh rate of the chart??

Thanks for your help!

Have you tried putting the parameters in the same order as in the docs?

Chart [item=<itemname>] [icon="<iconname>"] [label="<labelname>"] [refresh=xxxx]
[period=xxxx] [service="<service>"] [begin=yyyyMMddHHmm] [end=yyyyMMddHHmm] [legend=true/false]

In your case:

Chart item=gSDMEnergy refresh=30000 period=D service="rrd4j"

Issue already opened

For information, I just proposed a fix.
Please read my analysis in the Git issue, the problem was in fact depending on the kind of item linked to the chart element and so was not systematic for all chart elements.

But this only refers to the Android App… I am using iOS App… Any difference?

Yes is it different, the iOS app is quite buggy apparently, I just found out.
I don’t use it, but I was helping someone else and I found out the the mapviews don’t work on the iOS app as well as other sitemaps widgets.
You would need to raise a separate git issue for the iOS app.

My fix is a general fix on server side that will impact any UI. But then there could be additional issues in specific UIs like Android or iOS apps.

My fix on server side has been just merged. It should be available in OH snapshots in few days. At least Basic UI and Classic UI will be fixed, potentially other UIs too.

1 Like

is this fix included in the 2.3.0 release ?


I have a Group:Number:AVG Temperature which ignores the refresh time in a chart. It still refreshes when the group refreshes. Is this intended behaviour ?
I use OH 2.3.0 and I understand that it would probably work correctly if I remove the avg. Am I missing sth else here ?

Don’t forget to set a refresh parameter to ypur chart sitemap elements if you don’t want refresh through state changes.

I set the refresh parameter to refresh=999999 and do still get refreshes each time a temperature in the group changes. In addition to 2.3.0 I also tried the unstable version of openhab.
Someone suggested to obey a specific order of the arguments… is this really an issue ?

In which UI ?

I use BasicUI, android app.

Items are e.g.
Number Sensors_Bad_Temperature “Bad” (OG_Bad, gTemperatur, gUmwelt) { mqtt="<[raspimqtt:Sensors/Bad/Temperature:state:default]", expire=“12m”}

Chart is:
Chart item=gTemperatur icon=temperature period=2D service=“influxdb” refresh=99999999 legend=true

I had a look at the code from your github commit. It says:

if (widget instanceof Chart) {
Chart chartWidget = (Chart) widget;
skipWidget = chartWidget.getRefresh() > 0;
if (!skipWidget) {
addItemWithName(items, widget.getItem());
if (widget instanceof Frame) {
items.addAll(getAllItems(((Frame) widget).getChildren()));

I see it skipping the chart item with refresh enabled. But then it apparently adds everything thats inside a frame. My chart is inside a frame. Maybe thats the reason why I still see refreshes.

OK, did some more testing.
The BasicUI in a browser does fine, everything works as expected concerning the refresh parameter.
The android app does reload the chart if anything on the currently displayed page changes. This means:

  • if you only display the chart - thats ok.
  • if you display a group of parameters and the chart below- everything reloads if a member of that group changes.