It appears to be mostly working for you. The only thing I see missing is the icon for the frame.
Do you really mean to do the following?
Frame label="Garage" {
Text item=GTemperature
Text item=GHumidity
Text item=GDoor
}
Or do you mean this?
Text label="Garage" icon="garage" {
Frame label="Garage" icon="garage" {
Text item=GTemperature
Text item=GHumidity
Text item=GDoor
}
}
A Frame just wraps the stuff in { } in a white box. The Text element followed by a { creates a subpage for the stuff in { }.
At the moment the ONLY thing I see working differently from expected is the lack of the icon for the Frame, which may be something BasicUI doesn’t support.
You need to use a Text label for the main label, and then frames inside.
e.g.
sitemap home label="Home"
{
////Lighting
Text label="Lights" icon="light_control"{
Switch item=Lights mappings=[OFF="All Off"]
Group item=LightsLiving
}
Then from the Home sitemap, you’ll see a frame labelled Lights, with the light_control icon. Entering into this frame will not bring the light_control icon into the head of this page, but will show you the Switch and Group items nested into the Text label.
That’s (kind of) a way to get it to work, I get that. But there is a difference between a Text element pointing to more elements and a Frame which can hold more than one element, all of which could point to more.
Cannot get service reference for transformation service of type MMAP
couldn't transform value in label because transformationService of type 'MMAP' is unavailable
Cannot get service reference for transformation service of type MMAP
couldn't transform value in label because transformationService of type 'MMAP' is unavailable
Unfortunately there are two ways that a Frame has been referenced in other threads, one of which isn’t technically correct.
A Frame provides a way to visually group a bunch of Items on the sitemap together by making it look like all the Items are in the same white box.
What is sometimes called a sub-frame though I wish there were a better term for it, is when you use a Text Item with the { }. This creates the little “>” that you can click on and open a separate page which itself may contain one or more Frames. Inside these frames will be additional Items, including potentially another Text Item with {} to go another page deeper.
What I believe @awsnap is after is to have the white box with both a nice title AND an icon, not a sub-frame which opens up another page.
Unfortunately this doesn’t seem to work in BasicUI (the icon part).
As in I have a line like “[MMAP(condition.map):%s]” ? I only call a map twice and they are both correct. It looks like you need to have text in front of MAP, “Text [MAP(map.map):%s]”
Ok, what DOES it work in, because I haven’t found it.
I may have to go the Text route to solve this. Does this mean that the documentation is wrong, or it just doesn’t work for me?
You can try it in ClassicUI and see if the Frame icon works there. I’ve never tried to use icons in a Frame so I don’t know.
I doubt the documentation is wrong. Either it works in ClassicUI, only works with OH 1.x, or there is bug which makes it no longer work which needs to be fixed.
This is an excerpt from my home sitemap with images to show how the icons work for me with Basic UI.
I set icon values in the items which are found in items files. If the sitemap which has a text label for a frame also needs an icon, then I set this icon on the sitemap. I believe this is the only way to do it as Frames and Items are not mutually inclusive.
sitemap home label="Home"
{
// Monitoring
Frame label="Monitoring"{
////Presence
Text label="Presence" icon="presence"{
Frame label="Presence"{
Switch item=present mappings=[ON="Occupied", OFF="Empty"]
}
Frame label="People" {
Text label="Paul Data" icon="man"{
Frame label="Presence" {
Switch item=phone_Paul
Switch item=ownTracks_Paul
}
Frame label="Data" {
Text item=ownTracks_PaulLat
Text item=ownTracks_PaulLon
Text item=ownTracks_PaulAcc
Text item=ownTracks_PaulBatt
}
Frame label="Heating" {
Setpoint item=Heating_PaulSetpoint label="Heating Setpoint [%.1f °C]" minValue=18 maxValue=24 step=1
}
}
Text label="Emily Data" icon="female"{
Frame label="Presence" {
Switch item=phone_Emily
Switch item=ownTracks_Emily
}
Frame label="Data" {
Text item=ownTracks_EmilyLat
Text item=ownTracks_EmilyLon
Text item=ownTracks_EmilyAcc
Text item=ownTracks_EmilyBatt
}
Frame label="Heating" {
Setpoint item=Heating_EmilySetpoint label="Heating Setpoint [%.1f °C]" minValue=18 maxValue=24 step=1
}
}
Frame label="Map"{
Webview url="http://192.168.1.20:8080/static/map.html" height=11
}
}
Frame label="Rooms" {
Text item=Door_Front
Text item=Door_Side
Text item=sensor_DiningPIR
Text item=sensor_HallPIR
Text item=sensor_ShedPIR
Text item=sensor_CarportPIR
Text item=sensor_FrontDoorPIR
Text item=camera_CarportMotion
Text item=camera_FrontDoorMotion
}
}
}
}
So you’re of the mindset that the documentation is wrong?
I’d like to use this feature to provide just a little more info on the higher pages before diving deeper. Frame would show the condition icon for weather, then Text within Frame would show temperature PLUS lead you to a deeper page, ALL while allowing you to have two Text’s under that one Frame. It’s honestly not a gigantic deal, but the documentation SAYS it can do it AND @rlkoshak does too.
In OH2 I cannot get it to work as per the docs. So yes, I believe that you cannot set a Frame icon in OH2 and BasicUI. I’ve never thought this was possible to be honest, but never read the docs…
I always treated Frame labels like the chapter headings in a book. They don’t necessarily hold any relevant data, but point and direct the reader to the content within.
I can have:
Frame item=weatherDetailed label="weather"
Which will populate the Frame with the value inside the Item weatherDetailed
So I agree that the frame Item and Label settings do work.
What you really want to do is not give the frames icons, but rather not use frames at all, and simply nest your items directly under the sitemap.