Setting of chart visibility (switch from daily to hourly) not working in iOS app

Hello,

I have a problem with the setting of the visibility property within the iOS app.
I created a chart based on a one wire temperature sensor.

My sitemap looks like this:

Group label="Temperatur" icon="temperature" {
        Frame label="Fenster" {
                Text item=WindowTempSensor valuecolor=[WindowTempSensor<0="blue"]
                Switch item=WindowTempSensor_Period label="Periode" mappings=[0="Stunde", 1="Tag", 2="Woche"]
                Chart item=WindowTempSensor period=D refresh=1800 service="mysql" visibility=[WindowTempSensor_Period==0, WindowTempSensor_Period=="Uninitialized"]
        }
}

If I click on the button called “Tag” in a normal browser (Opera, Chrome), the chart disappears, which is correct because WindowTempSensor_Period is set to 1.
If I do the same in the iOS app, the value of WindowTempSensor_Period get’s also updated. I am able to see it in the log files:

14:39:45.574 [DEBUG] [o.i.r.i.resources.ItemResource:193  ] - Received HTTP POST request at 'items/WindowTempSensor_Period' with value '1'.

But my problem is, that the chart does not disapear. If I then leave the group, and enter it again, the chart is invisible as expected. It seems that the visibility property is not applied when the value is updated.

Is this just a mistake from me, or can sameone else also repreduce this behavior?

Thank you & Regards,
Thomas

I have seen similar behavior in the Android app. I don’t think the apps refresh their data and screen as frequently as the web pages for certain types of items. I’ve noticed that switches and contacts update in the apps immediately but it requires a entering a frame and coming back to update everything else, particularly for things controlled by the visibility attribute.

Android and iOS apps refresh the page as soon as openHAB tells them it has changed through long-polling mechanism. For times we’ve run into a problem with this mechanism, so first of all, tell us which version of openHAB itself are you using?

I am using version 1.7.1 from the Debian repository.

I know it sounds unrealistic, but now it works. I still have exact the same definition in the item and sitmap configuration… The only thing I did was restarting openHAB several times because I testet the CUL hardware.

Hm it’s nice that it’s working now but I have no clue why.

Hm Ok. Now I changed the content of my item file (just added “Number RoomTempSensor_Period”) and it’s again not working.

After a complete restart of openHAB (service openhab restart) it’s working again.

That’s exactly that problem I was talking about with refresh of long-polling requests we have to deal with sometimes. @digitaldan, was it finally fixed? :smile: