OH3, Basic UI, "Dynamic Subsite"


I’m working on my Basic UI Setup and would like to define / show some subsite’s depinding on items state…

Here a short example:

Text item=NW_ESPCAM valuecolor=[NW_ESPCAM==ON=“green”, ==OFF=“red”]
Video url=“” encoding=“mjpeg”

in my overview I would just like to see the subsite with the videostream, when the item is online… by adding visibility=[NW_ESPCAM==ON] to the Video Url, the “subsite” is of cause empty, but will show up:


is it possible to configure my desired behaviour?

Thanks in advance!

Sure, put the visibility on the “owning” Text widget. Visibility allows you to control a widget using a different Items state.

If I remember, this can be a bit buggy or sluggish under some circumstances, try it out. I think you may need to have the “visibility controlling” Item in a widget on its own account somewhere else in the sitemap, to get updates from openHAB.

the owning item is

Text item=NW_ESPCAM valuecolor=[NW_ESPCAM==ON=“green”, ==OFF=“red”] <= this one
Video url=“” encoding=“mjpeg”

of cause i want to have that shown always… :wink: just the subsite { } should be visible depending on the NW_ESPCAM item state…

Oh right. Use visibility :wink:
But two Text widgets

Text item=NW_ESPCAM valuecolor=["green"] visibility=[NW_ESPCAM==ON]
   Video url="" encoding="mjpeg"
Text item=NW_ESPCAM valuecolor=["red"] visibility=[NW_ESPCAM!=ON]


I have similar problem but with motion alarm and above solution does not work for me :frowning:

Default icon="motion" label="Motion Alarm" item=AEOTECMultisensor6_MotionAlarm mappings=[ON="ALARM!",OFF="OK"]

works like that:

The state does not change to mapped text. :frowning:

adding valuecolor or visibility is displaying the error in the code window of the sitemap:

My intention is to change the icon color and state description depending on the item state.

in OH2 I had not problems with that. reading documentation it should work. Where do I make mistake?

You have not asked for a text display. You asked for a Default widget;

If you want the button-style Switch widget presentation (with mappings on the buttons) then I think you will have to explicitly ask for a Switch widget.

Switch icon="motion" ...

The MainUI sitemap editor had/has a number of bugs relating to advanced widget configuration.
Try editing in a text editor or VSCode.

this one works!

For this I am surprised. I was trying to find my sitemap on my server and it is … empty.

where are the files stored with the nice oh3 dashboard?

I don’t use the thing, but I think it keeps them in JSONDB and not in xxx.sitemap files.

I have created the .sitemap file manually. Do you know how to activate it to be visible as default one in OH3?