Image refresh within a rule

Hi everyone,
I would like to render an image in my sitemap, wich is refreshed if a Switch or something similar is changed.
Is there an option to refresh an image within a rule or something similar?
at he moment my code of the sitemap is as follows:

	Image url="http://myip:myport/chart?items=Temperatur_innen&period=h&h=500&w=1000" refresh=1000 visibility=[CHART_PERIOD==0, CHART_PERIOD=="Uninitialized"]
	Image url="http://myip:myport/chart?items=Temperatur_innen&period=D&h=500&w=1000" refresh=1000 visibility=[CHART_PERIOD==1]
	Image url="http://myip:myport/chart?items=Temperatur_innen&period=W&h=500&w=1000" refresh=1000 visibility=[CHART_PERIOD==2]
	Switch item=CHART_PERIOD label="Zeitspanne" mappings=[0="Stunde", 1="Tag", 2="Woche"]

If i change the CHART_PERIOD i want to change the image wich is visible immediately. At the moment i have to refresh the browser to change the shown image.

Does anyone knew a solution for my problem?

If you send a command to the CHART_PERIOD item from a rule, does the UI not change to show to chart you want to see? Does the highlighted switch button not change?

Which client (Basic, Classic, Android, iOS) are you using where you see this lack of updating when the switch changes? Do all clients you’ve tried behave the same in this regard?

Does it behave the same if you use the Chart widget instead of the Image widget?

1 Like

Hey watou,
first ty for your fast answear,
I normaly used the Basic UI with openhab2, there it doesn’t apper oder disapper immediately,
But if I was using the Classic UI with openhab2 it works fine, so there seems to be a problem in the Basic UI?!
Testing it with a Chart Element as well, same result, Classic UI works fine, but Basic UI didn’t.
Now i will testing it with changing the CART_PERIOD within a rule.
will post result later :wink:

result as prommised,
setting CHART_PERIOD within a rule, in Classic UI chart and image are reloaded immediatly (the whole page seems to reload), but it the Basic UI i must reload the page by myself to update the shown Chart or Image (testet with both options).
So is there a command to refresh a whole page, like it is done in the Classic Ui ?

That’s an issue with the Basic UI:

Ah ok, didn’t know it yet, so i will use Classi UI and everything is fine, thx watou for your help :thumbsup:

1 Like