openHAB2.2 groups for nesting not working

I got a strange sitemap behavior with openhab 2.2.0-Build #1006

When creating a group to nest multiple items it throws a WARN.

[WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘converted.sitemap’ has errors, therefore ignoring it: [3,22]: rule ruleGroup failed predicate: {getUnorderedGroupHelper().canLeave(grammarAccess.getGroupAccess().getUnorderedGroup_1())}?

This was NO problem with openHAB 2.
http://docs.openhab.org/configuration/sitemaps.html#element-type-group

sitemap converted label="All Locations" {
    Frame label="Alle Standorte"{
        Group label="YO MAMA"{
	    Text item=C2SM01
        }
    }
}

Are you sure you can put more items into a group? I am pretty sure group sitemap items only contain the group members.

Your group is also missing the item value. The sitemap simply doesn’t know which group you want to display.

Maybe you wanted to use the Text type?

some prove

sitemap tmp label="Ignore me!" {
    Frame label="Some Stuff" {
        Frame label="I WANT" {
            Group label="YO MAMA" {
                Text item=C2SM01
            }
        }
    }
}

Which results in, with no WARN or ERROR

The prove that your sitemap is not correct :slight_smile:

with “some prove” I did not mean that my Sitemap is correct. Just that it was working with openHAB2.0

Really interesting that this worked, though.

Please keep in mind, the Group type is not for grouping items, but for adding an element which members are the members of a group (defined in your items file).

For grouping items you should consider Frames as you already do, and but they can not be nested. Or use Text, that will create a sub level.

1 Like

I know :smiley: But I used it since openHAB 1.X for nesting loose items :smile:
I was curious about this because I tried to port my openHAB2.0 config to openHAB 2.2 and got erros and warns.

@gersilex is this worth opening an enhancement issue on github? :joy:
I really liked the feature / bug that you can use Groups to create manual nesting.
or @Kai is there an equivalent for nesting items manual ?

Simply use “Text” instead of “Group” as @gersilex already mentioned above.

1 Like

Ahhh okay. This information should be added to the wiki http://docs.openhab.org/configuration/sitemaps.html#element-type-text
that you can do

Text label="My manual nesting" {
    Text item=C2SM01
}

A little bit hidden, but it’s there:

Another text element showing a “Multimedia” summary, e.g. “Currently playing”. The element is additionally the host for a nested block. By clicking in the element, a new view with two elements is presented

→ all the way down to http://docs.openhab.org/configuration/sitemaps.html#full-example