[SOLVED] Graphs in IOS constantly refreshing

  • Platform information:
    • openHAB version: 2.4
  • Issue of the topic:

I have started to show my power usage in a chart. The information is coming from a DSMR powermeter which is registering the power usage. I expected the refresh rate to be the rate in which the graph was to be update but instead it randomly updates making the whole interface jumping up and down every half second or so.

  • Please post configurations (if applicable):
    • Items configuration related to the issue
Number MeterDeliveryTariff0 "Laag tarief [%.3f kWh]" 						<poweroutlet>		(gPowerMeasurement)
	{channel="dsmr:electricity_v5_0:myDSMRDevice:electricityV5:emeter_delivery_tariff1"}
Number MeterDeliveryTariff1 "Hoog Tarief [%.3f kWh]" 						<poweroutlet>		(gPowerMeasurement)
	{channel="dsmr:electricity_v5_0:myDSMRDevice:electricityV5:emeter_delivery_tariff2"}
Number MeterDeliveryTotal "Totale verbruik [%.3f kWh]"						<poweroutlet>		(gPowerMeasurement)
	Number MeterDeliveryTotalGraph
  • Sitemap configuration related to the issue
			Text item= MeterDeliveryTariff0
			Text item= MeterDeliveryTariff1
			Text item= MeterDeliveryTotal
			Switch item=MeterDeliveryTotalGraph label="Periode " mappings=[0="Hour", 1="Day", 2="Week"] icon="chart"
               Chart item=MeterDeliveryTotal period=h refresh=60000 visibility=[MeterDeliveryTotalGraph==0, MeterDeliveryTotalGraph=="Uninitialized"]
               Chart item=MeterDeliveryTotal period=D refresh=60000 visibility=[MeterDeliveryTotalGraph==1]
               Chart item=MeterDeliveryTotal period=W refresh=60000 visibility=[MeterDeliveryTotalGraph==2]
  • Rules code related to the issue
rule "Stroommeter totaal"
when
	Item MeterDeliveryTariff0 received update or Item MeterDeliveryTariff1 received update
then
	MeterDeliveryTotal.postUpdate(MeterDeliveryTariff0.getStateAs (DecimalType) + MeterDeliveryTariff1.getStateAs (DecimalType))
end	
  • Services configuration related to the issue
 Bridge dsmr:dsmrBridge:myDSMRDevice [serialPort="/dev/ttyUSB0"] {
     Things:
        device_v5 dsmrV5Device [channel=-1]
        m3_v5_0 mygasmeter [channel=1]
        electricity_v5_0 electricityV5 [refresh=10, channel=0]
 }

Old topic found describing the same behavior: Chart annoying refreshing

Somebody got a hint how I can disable refresh?

kr

Han

hi! It was long time ago but i resolve my problem.
I do not remeber exactly how i resolve it but perhaps i decrease refresh rate of my item. Not chart refresh rate.

It may or may not apply to IoS, but Classic UI for example will behave like that.
When some other Item on the page in view refreshes, the page repositions at the top from where you have scrolled to.
The visual effect is an unpleasant “jumping” around after scrolling.

The workaround is to design your sitemap to avoid having interesting things a long way down in a view that also has regularly refreshed things.

I put my graphs in their own sub-page

    Text item= MeterDeliveryTariff0
    Text item= MeterDeliveryTariff1
    Text item= MeterDeliveryTotal {
        Switch item=MeterDeliveryTotalGraph label="Periode " mappings=[0="Hour", 1="Day", 2="Week"] icon="chart"
        Chart item=MeterDeliveryTotal period=h refresh=60000 visibility=[MeterDeliveryTotalGraph==0, MeterDeliveryTotalGraph=="Uninitialized"]
        Chart item=MeterDeliveryTotal period=D refresh=60000 visibility=[MeterDeliveryTotalGraph==1]
        Chart item=MeterDeliveryTotal period=W refresh=60000 visibility=[MeterDeliveryTotalGraph==2]
    }
1 Like

That did the trick, thanks!

kr

Han