Missing EOF at 'Group' - OH2 upgraded to new version, now default.items not loading

I had a working OH2 installation, then upgraded it to the latest.
Now the sitemap shows errors (does not load).
I’m confident that the syntax has become more restrictive but I cant for the life of me work it out.

can you see anything non-compliant with my code please?

when open in Smart Home Designer

DEFAULT.SITEMAP BELOW

sitemap default label="Savages Road"
//These switches are also used by RULEs.  Rules are  needed to allow arduino HMI to work correctly.
//Switch item=AllLightsSwitch icon="light" label="ALL LIGHTS [%d]" mappings=[OFF="All OFF",ON="All ON"]
//Switch item=AllKitchenLightsSwitch icon="light" label="KITCHEN [%d]" mappings=[OFF="All OFF",ON="All ON"]
{
Switch item=AllLightsSwitch icon="light" label="ALL LIGHTS"
Switch item=AllKitchenLightsSwitch icon="light" label="KITCHEN"
}
Group label="Kitchen"{
Switch item="KitchenLightSwitch1" icon="light" label="Kitchen Light 1"
Switch item="KitchenLightSwitch2" icon="light" label="Kitchen Light 2"
Switch item="KitchenLightSwitch3" icon="light" label="Kitchen Light 3"
}
Group label="Living Room"{
    Switch item="LivingRoomLightSwitch1" icon="light" label="Living Room Light 1"
    Switch item="PianoLightSwitch" icon="light" label="Piano"
}
Group label="Front Door"{
    Switch item="FrontDoorInteriorLight1" icon="light" label="Front Door Interior Light 1"
    Switch item="FrontDoorExteriorLight1" icon="light" label="Front Door Exterior Light 1"
    Switch item="CraftTableLightSwitch" icon="light" label="Craft Table"
}
Group label="Pool"{
    Switch item="PoolPumpSwitch1" icon="flow" label="Pool Pump"
}

DEFAULT.ITEMS BELOW

/* active groups */
Group:Switch:OR(ON, OFF)        gAllLights      "All Lights [(%d)]"
Group:Switch:OR(ON, OFF)        gAllKitchenLights      "All Kitchen Lights [(%d)]"
Switch TestLightSwitch1  "Test Light Switch 1"
                {autoupdate="false" ,mqtt="
                <[broker:myhome/test/light/switch/1/command:command:MAP(arduino.map)],
                <[broker:myhome/test/light/switch/1/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard2/command:command:ON:A,1,1],
                >[broker:myhome/switchboard/switchboard2/command:command:OFF:A,1,0],
                <[broker:myhome/switchboard/switchboard2/shieldA/relay1/state:state:MAP(switchboard.map)],
                <[broker:myhome/switchboard/switchboard2/shieldA/relay1/state:state:MAP(switchboard.map)],"}
Switch TestLightSwitch2  "Test Light Switch 2"
                {autoupdate="false" ,mqtt="
                <[broker:myhome/test/light/switch/2/command:command:MAP(arduino.map)],
                <[broker:myhome/test/light/switch/2/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard2/command:command:ON:A,2,1],
                >[broker:myhome/switchboard/switchboard2/command:command:OFF:A,2,0],
                <[broker:myhome/switchboard/switchboard2/shieldA/relay2/state:state:MAP(switchboard.map)],
                <[broker:myhome/switchboard/switchboard2/shieldA/relay2/state:state:MAP(switchboard.map)],"}
Switch KitchenLightSwitch1  "Kitchen 1" (gAllLights,gAllKitchenLights) 
                {autoupdate="false" ,mqtt="
                <[broker:myhome/kitchen/light/switch/row1/command:command:MAP(arduino.map)],
                <[broker:myhome/kitchen/light/switch/row1/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:A,1,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:A,1,0],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay1/state:state:MAP(switchboard.map)],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay1/state:state:MAP(switchboard.map)],"}
Switch KitchenLightSwitch2  "Kitchen 2" (gAllLights,gAllKitchenLights) 
                {autoupdate="false" ,mqtt="
                <[broker:myhome/kitchen/light/switch/row2/command:command:MAP(arduino.map)],
                <[broker:myhome/kitchen/light/switch/row2/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:A,2,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:A,2,0],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay2/state:state:MAP(switchboard.map)],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay2/state:state:MAP(switchboard.map)],"}
Switch KitchenLightSwitch3  "Kitchen 3" (gAllLights,gAllKitchenLights) 
                {autoupdate="false" ,mqtt="
                <[broker:myhome/kitchen/light/switch/row3/command:command:MAP(arduino.map)],
                <[broker:myhome/kitchen/light/switch/row3/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:A,3,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:A,3,0],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay3/state:state:MAP(switchboard.map)],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay3/state:state:MAP(switchboard.map)],"}
Switch CraftTableLightSwitch  "Craft Table" (gAllLights)
                {mqtt="
                <[broker:myhome/CraftTableLight/light/switch/command:command:MAP(arduino.map)],
                <[broker:myhome/CraftTableLight/light/switch/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:A,4,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:A,4,0],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay4/state:state:MAP(switchboard.map)],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay4/state:state:MAP(switchboard.map)],"}
Switch PianoLightSwitch  "Piano" (gAllLights)
                {autoupdate="false" ,mqtt="
                <[broker:myhome/Piano/light/switch/command:command:MAP(arduino.map)],
                <[broker:myhome/Piano/light/switch/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:A,5,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:A,5,0],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay5/state:state:MAP(switchboard.map)],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay5/state:state:MAP(switchboard.map)],"}
Switch LivingRoomLightSwitch1  "Living Room Light 1" (gAllLights)
                {autoupdate="false" ,mqtt="
                <[broker:myhome/livingroom/light/switch/tv/command:command:MAP(arduino.map)],
                <[broker:myhome/livingroom/light/switch/tv/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:A,7,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:A,7,0],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay7/state:state:MAP(arduino.map)],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay7/state:state:MAP(arduino.map)],"}
//Switch FrontDoorInteriorLight1  "Front Door Interior Light 1" (gAllLights)  
Switch FrontDoorInteriorLight1  "Front Door Interior Light 1" (gAllLights)
		{autoupdate="false" ,mqtt="
		<[broker:myhome/frontdoor/light/switch/interior/command:command:MAP(arduino.map)],
		<[broker:myhome/frontdoor/light/switch/interior/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:A,6,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:A,6,0],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay6/state:state:MAP(arduino.map)],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay6/state:state:MAP(arduino.map)],"}
//Switch FrontDoorExteriorLight1  "Front Door Exterior Light 1" (gAllLights)
Switch FrontDoorExteriorLight1  "Front Door Exterior Light 1" (gAllLights)
                {autoupdate="false" ,mqtt="
                <[broker:myhome/frontdoor/light/switch/exterior/command:command:MAP(arduino.map)],
                <[broker:myhome/frontdoor/light/switch/exterior/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:B,1,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:B,1,0],
                <[broker:myhome/switchboard/switchboard1/shieldB/relay1/state:state:MAP(arduino.map)],
                <[broker:myhome/switchboard/switchboard1/shieldB/relay1/state:state:MAP(arduino.map)],"}
//Switch PoolPumpSwitch1  "Pool Pump" { autoupdate="false" }
Switch PoolPumpSwitch1  "Pool Pump" 
                {autoupdate="false" ,mqtt="
		<[broker:myhome/pool/pump/switch/command:command:MAP(arduino.map)],
		<[broker:myhome/pool/pump/switch/command:command:MAP(arduino.map)],
                >[broker:myhome/switchboard/switchboard1/command:command:ON:A,8,1],
                >[broker:myhome/switchboard/switchboard1/command:command:OFF:A,8,0],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay8/state:state:MAP(arduino.map)],
                <[broker:myhome/switchboard/switchboard1/shieldA/relay8/state:state:MAP(arduino.map)],"}
// Dummy switch - Triggered by AllLights RULE
// When AllLights RULE exectues this switch so MQTT messages are received by arduinos to update HMI.
// When arduino sends command to toggle this switch, the RULL executes AllLights group switch.
Switch AllLightsSwitch  "All Lights"
                {autoupdate="false" ,mqtt="
                <[broker:myhome/group/AllLights/switch/command:command:MAP(arduino.map)],
                <[broker:myhome/group/AllLights/switch/command:command:MAP(arduino.map)],
                >[broker:myhome/group/AllLights/switch/state:state:ON:1],
                >[broker:myhome/group/AllLights/switch/state:state:OFF:0]"} 
                      
Switch AllKitchenLightsSwitch        "All Kitchen Lights switch"
                {autoupdate="false" ,mqtt="
                <[broker:myhome/group/KitchenAllLights/switch/command:command:MAP(arduino.map)],
                <[broker:myhome/group/KitchenAllLights/switch/command:command:MAP(arduino.map)],
                >[broker:myhome/group/KitchenAllLights/switch/state:state:ON:1],
                >[broker:myhome/group/KitchenAllLights/switch/state:state:OFF:0]"}
 //Switch TestLight1  "test 1" (testswitch)
 //                {mqtt="
 //               <[broker:myhome/test/light/switch/command:command:MAP(arduino.map)],
 //               <[broker:myhome/test/light/switch/command:command:MAP(arduino.map)],
 //               >[broker:myhome/switchboard/switchboard2/command:command:ON:A,1,1],
 //               >[broker:myhome/switchboard/switchboard2/command:command:OFF:A,1,0],
 //               <[broker:myhome/switchboard/switchboard2/shieldA/relay1/state:state:MAP(switchboard.map)],
 //               <[broker:myhome/switchboard/switchboard2/shieldA/relay1/state:state:MAP(switchboard.map)],"}
```**strong text**

Ok, so i’m making some progress.
I have removed all the “Group” labels and the quotes around items= statements.
And the sitemap web page now loads ok.
How do I get my groups back?

sitemap default label=“Savages Road”

//These switches are also used by RULEs. Rules are needed to allow arduino HMI to work correctly.
//Switch item=AllLightsSwitch icon=“light” label=“ALL LIGHTS [%d]” mappings=[OFF=“All OFF”,ON=“All ON”]
//Switch item=AllKitchenLightsSwitch icon=“light” label=“KITCHEN [%d]” mappings=[OFF=“All OFF”,ON=“All ON”]
{
Switch item=AllLightsSwitch icon=“light” label=“ALL LIGHTS”
Switch item=AllKitchenLightsSwitch icon=“light” label=“KITCHEN”
//}

//Group label=“Kitchen”{
Switch item=KitchenLightSwitch1 icon=“light” label=“Kitchen Light 1”
Switch item=KitchenLightSwitch2 icon=“light” label=“Kitchen Light 2”
Switch item=KitchenLightSwitch3 icon=“light” label=“Kitchen Light 3”
//}

//Group label=“Living Room”{
Switch item=LivingRoomLightSwitch1 icon=“light” label=“Living Room Light 1”
Switch item=PianoLightSwitch icon=“light” label=“Piano”
//}

//Group label=“Front Door”{
Switch item=FrontDoorInteriorLight1 icon=“light” label=“Front Door Interior Light 1”
Switch item=FrontDoorExteriorLight1 icon=“light” label=“Front Door Exterior Light 1”
Switch item=CraftTableLightSwitch icon=“light” label=“Craft Table”
//}

//Group label=“Pool”{
Switch item=PoolPumpSwitch1 icon=“flow” label=“Pool Pump”
}

This Topic is awful to read! Sorry but you need to keep information rather short. Only the important parts.
Referring to my Post

Group {
}

Is now WRONG


Now it has to be

Text {
}

Just replace Group with Text and check the result.
Example of a valid *.sitemap

sitemap dev label="Dev Sitemap" {
    Frame label="Main Frame" {
        Text label="Nesting for items" {
            Text item=Dev01 label="Placeholder for later use"
        }
    }
}

Thanks BrutalBirdie, your frank response is welcomed. I used the provided text formatting and it’s certainly very sparse in its layout. I note other posts complain they do not have the full file/extract to review so I added everything to provide the best level of info. I’ll redact in future :slight_smile:

I’ll implement tomorrow, test, and report back.

I note also that although the web GUI is no presented, the switching of items is not firing MQTT events attributed in the default.items / rules.

Monitoring mqtt events yields no messages.

Is there something in the items file which is depreciated also?

Can’t tell that with this formation. Could you post your *.items and *.sitemap to https://pastebin.com/ ?

I think a better solution would be to use code fences for your code, configs, and logs.

```
code goes here
```

That will keep your indentations, avoid premature line wraps, and put everything in a nice little box with scroll bars that makes it SOOOO much easier to read.

I’d rather see more information properly formatted than have you redact information when you don’t really know what is or is not relevant yet.

Not in relation to MQTT.

What version of OH are you upgrading from?

If OH 1.8 (or before) are you following the Migration Tutorial?

MQTT works largely the same but just in case:

Thanks Rlkoshak,
I resolved the MQTT issues (commands not firing after upgrade by uninstalling the OH2 MQTT addon, and reinstalling. Automagically all was good in the world again. Thanks for your contribution.

Thanks BrutalBirdie,
Your advice was correct. I copied my sitemap to a temp location. Deleted all content from old OH2 sitemap, and used the structure you provided and moved my switches line by line into the new format. Worked perfectly!
I’ll post my final config and screenshot when back at my laptop (responding on phone).

Many thanks,

Charles

1 Like

No problem :slight_smile: Glad I could provide the needed information.