Hi, I have a sitemap that uses Network Binding to display current ping state of various devices. Under OH 3.2 it worked as described below (I changed the image URLs from my localhost to OH demo)
When I’m checking the item’s current state in Main UI it says OFF, as it should, since the target ping device is offline. I created a dummy button to test the state display in this sitemap and it works correctly, showing green icon for ON and the red one for OFF.
It seems that when using Network Binding “valuecolor” only affects the item’s displayed state (the [%s] part), but not the actual icon. Adding UNDEF=“red” to “valuecolor” doesn’t work either.
Is your value properly rendered in red ?
With your visibility condition, you should not see the widget when the state is not ON. So I am not sure when you expect to see the red icon.
When the state is ON, the label next to green icon says ON
When the state is OFF, the label shows the date and time when the item was last seen on.
This all works as planned, the only thing I can’t figure out is the icon’s color
Why am i introducing “sitemap stuff” in a topic describing my problem with sitemap? Is that a trick question?
So if the wrong icon is in sitemap, what UI are you using to display sitemap ? basic UI or Android app or iOS app?
You previously answered Main UI, this is what introduced the confusion to me as Main UI doesn’t show sitemaps.
I’m not sure how to check that. The sitemap sits at \localhost\openHAB-conf\sitemaps. I’m accessing it using Chrome browser on a PC. Now I see there’s a “basicui” in the URL, so that’s probably what you’re asking.
Sorry for the confusion, but when you create something in a text file and access it directly through a browser, there’s no clear indication on what UI are you using.
Anyway, accessing this sitemap through an OpenHAB Android app yields the same result - icon with UNDEF state instead of the OFF one.
Yes, this is Basic UI if in a WEB browser.
As your first sitemap element is hidden when the item state is OFF, I assume you are talking about the second sitemap element linked to a date. The icon for this one will be grey because the value is a date