OH 2.1 & Frame->Text->Group (sublevels menu)

Hello!
I’m upgrading my OH 1.x to 2.x

I’ve a problem with these types of structure (working into 1.x versions):

        Frame label="AAA" {
                Group item=gAAA label="AAA" icon="aaa"
                Text label="BBB" icon="bbb" {
                        Group label="CCC" icon="ccc" {
                                        Image url="...." refresh=3000
                        }
                        Group label="DDD" icon="ddd" {
                                        Image url="..." refresh=3000
                        }
                        Group label="EEE" icon="eee" {
                                        Image url="..." refresh=1000
                                        Switch item=....
                        }
                }
        }

And this is the log:

[…]

Configuration model 'default.sitemap' has errors, therefore ignoring it: [44,63]: rule ruleGroup failed predicate: {getUnorderedGroupHelper().canLeave(grammarAccess.getGroupAccess().getUnorderedGroup_1())}?

[…]

I need a sublevels menu…

Best regards
Sim

Did you check which of those lines actually raises the error?

What are you actually trying to accomplish - why are you defining a Group element, then add nested elements to it?

Please compare with http://docs.openhab.org/configuration/sitemaps.html

Hello Thom,
thanks for reply!

The problem is the Group inside the Text (line 4 in this example)

I need this scenario:

  • From the “home” detect the section “AAA” (frame)
  • Then click button “BBB” (Text)
  • Inside I need 3 button: CCC, DDD, EEE (groups)
  • Clicking one of these i need to see different sections (in this example Image or Image + Switch, etc…)

This is an example but I’ve other sections with the same problem.

Sim

Exactly my point. These group elements are not valid. You probably want to use simple Text elements there.

My feeling is you have the wrong idea about Group elements. See: http://docs.openhab.org/configuration/sitemaps.html#element-type-group

1 Like

I concur. A Group element needs an item specified, like you have in the second line of your example. Try something like this:

    Frame label="AAA" {
            Group item=gAAA label="AAA" icon="aaa"
            Text label="BBB" icon="bbb" {
                    Text label="CCC" icon="ccc" {
                                    Image url="...." refresh=3000
                    }
                    Text label="DDD" icon="ddd" {
                                    Image url="..." refresh=3000
                    }
                    Text label="EEE" icon="eee" {
                                    Image url="..." refresh=1000
                                    Switch item=....
                    }
            }
    }
2 Likes

Thanks!

Sorry… this is an “old” setup (working with my old OH 1.8)

This solved my problem with OH 2.x

1 Like