Visibility is not working as expected

Hi all,

I’ve been trying to use the tag “visibility” in a sitemap to show a graph according to a value, but with unexpected results :expressionless:. I tried to follow what I read in this thread Persistence & Graphs - why so complicated?.

After playing with it for a long time, I see that the value changes internally but the graph is not updated on the screen automatically. The only way to get the expected results, it is to refresh the browser but of course, this adds an additional step that I want to avoid.

I already did a search in this forum, and I found this thread, that although seems to be related to my issue, it’s not the same scenario.

During my tests, I added a Text on the screen to show the current value. Neither chrome or Edge update the value on the screen while Firefox, at least, shows the updated value. Again, if I refresh the browser (pressing F5), the graph is shown.

Is there anything I’m doing wrong? Am I missing anything? Or maybe, this attribute is no longer working in openHab.

Thank you very much for your help.

  • Platform information:
    • Hardware: Raspberry PI
    • openHAB version: openHAB 2.2.0-1 (Release Build)
  • Client
    • Firefox Versión 58.0.2 (64-bit)
    • Chrome. Versión 64.0.3282.167 (Build oficial) (64 bits)
    • Edge Versión Edge 41.16299.248.0

Sitemap (graphs are different on purpose to see clearly the changes on the screen)

    Frame label="Tiempo" {
       Text item=chart_period label="Etiqueta  [%.1f]"
       Switch item=chart_period label="Escala Temporal" mappings=[0 = "Hora", 1 = "Diario", 2 = "Semanal", 3 = "Anual"]
       Chart item=MX64         period=D refresh=600000 visibility=[chart_period == 0]
       Chart item=TempPrueba   period=D refresh=600000 visibility=[chart_period == 1]
       Chart item=MX64         period=W refresh=600000 visibility=[chart_period == 2]
       Chart item=TempPrueba   period=W refresh=600000 visibility=[chart_period == 3]


Number MX64 "Meraki MX64" 
Number TempPrueba "Temperatura Villanueva"
Number chart_period "Escala de tiempos"

Extract from openHAB log, showing how “chart_period” is updated properly as I play with the UI

2018-02-15 15:16:13.628 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 3
2018-02-15 15:16:50.936 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 2
2018-02-15 15:16:52.720 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 1
2018-02-15 15:16:54.586 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 0
2018-02-15 15:16:56.011 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 2
2018-02-15 15:16:59.959 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 1
2018-02-15 15:16:59.992 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 1
2018-02-15 15:17:06.049 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 3
2018-02-15 15:17:15.032 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 2
2018-02-15 15:17:44.650 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 1
2018-02-15 15:17:55.711 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 3
2018-02-15 15:18:18.663 [ome.event.ItemCommandEvent] - Item 'chart_period' received command 0

For firefox and chrome, it is working since a long time. For Edge, I fixed it very recently and it should work since OH snapshot 1212.

Thank you Lolodomo, so what do you think it’s not working in my environment?

I think I have nothing special or different but I can’t get it to work.Would you kindly share where I can try trace the problem down?

Once again, thank you. :grin:

Maybe your problem has no link with visibility but is the same as mentioned by few users that after changing config files, the updates are no more handled in Basic UI.
So restart OH after each config file update and confirm that Basic UI is then handling the visibility attribute.

@dcalvo looks like you have a meraki MX64 - i am interested in knowing how you have integrated this and what you are retrieving?