Scenes in OH

In my livingroom I have setup 12 scenes, however on my tablet as far as I know i need to split it into 3 scenes, to make it render nicely.

Number Scene_LivingRoom1 "Scene" <sofa>
Number Scene_LivingRoom2 "Scene" <sofa>
Number Scene_LivingRoom3 "Scene" <sofa>

These are mapped as follow:

Switch item=Scene_LivingRoom1 label="Group 1" mappings=[1="TV", 2="DINNER", 3="READING",4="OFF"]
Switch item=Scene_LivingRoom2 label="Group 2" mappings=[1="FIREPLACE", 2="BAR", 3="PARTY",4="ON"]
Switch item=Scene_LivingRoom2 label="Group 3" mappings=[1="COOKING", 2="WALL", 3="KITCHEN",4="LOUNGE"]

The problem is that ideally I want 1 rule with select case 1 through 12 and when I click one button all to others to be disabled,

Currently I try to just send 0 to the other scenes:

rule "Activate Scene 1"
when
	Item Scene_LivingRoom1 received command 
then

	var hsbOff = HSBType::fromRGB(0, 0, 0)
	
	sendCommand(Scene_LivingRoom2,0)
	sendCommand(Scene_LivingRoom3,0)
	//Switch on TV
	if (receivedCommand==1) {	
		sendCommand(Light_Hallway, OFF)
		sendCommand(Light_Kitchen,OFF)
2 Likes

Rule triggers can use or

Within a rule, you can use receivedCommand

Switch item=Scene_LivingRoom1 label="Group 1" mappings=[1="TV", 2="DINNER", 3="READING",4="OFF"]
Switch item=Scene_LivingRoom2 label="Group 2" mappings=[5="FIREPLACE", 6="BAR", 7="PARTY",8="ON"]
Switch item=Scene_LivingRoom2 label="Group 3" mappings=[9="COOKING", 10="WALL", 11="KITCHEN",12="LOUNGE"]

and the rule

rule "Activate Scene 1"
when
	Item Scene_LivingRoom1 or Scene_LivingRoom2 or Scene_LivingRoom3 received command 
then

	var hsbOff = HSBType::fromRGB(0, 0, 0)
	
	//Switch on TV
	if (receivedCommand==1) {	
		sendCommand(Light_Hallway, OFF)

will only render 1 button as on all the time?

You are right, this will not work as you do not know which Switch sent the command. Why not simply check the state of your switch?

rule "Activate Scene 1"
when
    Item Scene_LivingRoom1 or Scene_LivingRoom2 or Scene_LivingRoom3 received command 
then
    //Switch on TV
    if (Scene_LivingRoom1.state==1) sendCommand(Light_Hallway, OFF)
    if (Scene_LivingRoom1.state==2) sendCommand(Light_2, OFF)
    if (Scene_LivingRoom1.state==3) sendCommand(Light_3, OFF)
    if (Scene_LivingRoom1.state==4) sendCommand(Light_4, OFF)
    if (Scene_LivingRoom2.state==1) sendCommand(Light_5, OFF)
    if (Scene_LivingRoom2.state==2) sendCommand(Light_6, OFF)
    ...
    
    Scene_LivingRoom1.postUpdate(0)
    Scene_LivingRoom2.postUpdate(0)
    Scene_LivingRoom3.postUpdate(0)
end

Another solution, which is a bit more tidy and implements your “case 1 through 12” idea:

rule "Activate Scene 1"
when
    Item Scene_LivingRoom1 or Scene_LivingRoom2 or Scene_LivingRoom3 received command 
then
    var scene = Scene_LivingRoom1.state
    if (Scene_LivingRoom2.state != 0) scene += Scene_LivingRoom2.state + 4
    if (Scene_LivingRoom3.state != 0) scene += Scene_LivingRoom3.state + 8

    switch (scene) {
        ...
    }
    Scene_LivingRoom1.postUpdate(0)
    Scene_LivingRoom2.postUpdate(0)
    Scene_LivingRoom3.postUpdate(0)
end

I think you’d need to do some postUpdate to get the other switches to render as not-selected.

1 Like

I"m starting to setup a multi-scene interface as well and decided to go with a Selection item in my sitemap to avoid the need for multi-switches. Just a suggestion on that UI side (then you don’t have to deal with the value of three different switches as well).

I am off for cabin trip now,

but what I really want to achieve is to loop through the group living room, then i have one group for each scene, so sth like this, except that i can not figure out if an item is a member of a group or not: The Bar button in Scene2…

Group_DMX_LivingRoom.members.forEach[item | 
            if item.memberOf(Group_DMX_Bar){
           
	        logInfo("Info", "ON of the thing:"+item.name)
                    if(item.state.toString=="0.0,0.0,0.0"){
	             item.sendCommand(hsbOn)
                   }
           else{
                  item.sendCommand(hsbOff)
          }
]

@rossko57 Right you are. Forgot that little detail. Now it should be fine

@skatun there are many solutions. You have to find the right one for you.
By now I’m confused what you are trying to accomplish, what your actual goal is. The second solution I’ve posted is I believe a clear and easy solution for a scene controller.

So in the above screenshot I have my 3 scene, which Ideally should have been one scene, however this does not work nicely on android, hence I split it up to 3 scenes. I clicked first on TV, Then Fireplace and last Kitchen, however I would like only KITCHEN to be highlighted.

And the question is if I can make one rule for them all or not, basically what I do is that the text on buttons coeespond to group: Group_DMX_TV and so on. So when that button is pressed i loop through all items in the group Group_DMX_LivingRoom switch them off, then I loop through Group_DMX_TV and switch them on.

//So all non bar lights in livingroom
val nonBarLights = Group_DMX_LivingRoom.members.filter[l |! l.memberOf(Group_DMX_Bar)]
nonBarLights .members.filter[l|l.state.toString != "0.0,0.0,0.0"].forEach[l| l.sendCommand(hsbOff)]

//Bar lights
val barLights = Group_DMX_LivingRoom.members.filter[l | l.memberOf(Group_DMX_Bar)]
barLights.members.filter[l|l.state.toString == "0.0,0.0,0.0"].forEach[l| l.sendCommand(hsbOn) ]

This will not work 100% accurate. Better is using receivedCommand then .state. Maybe this is a bug. Look at my posting: Virtual Item receives command (event) but state is (still) wrong

So this should then work right?
Items:

Switch item=Scene_LivingRoom1 label="Group 1" mappings=[1="TV", 2="DINNER", 3="READING",4="OFF"]
Switch item=Scene_LivingRoom2 label="Group 2" mappings=[5="FIREPLACE", 6="BAR", 7="PARTY",8="ON"]
Switch item=Scene_LivingRoom2 label="Group 3" mappings=[9="COOKING", 10="WALL", 11="KITCHEN",12="LOUNGE"]

and the rule, how to use switch instead of if else?

rule "Activate Scene 1"
when
	Item Scene_LivingRoom1 or Scene_LivingRoom2 or Scene_LivingRoom3 received command 
then

	var hsbOff = HSBType::fromRGB(0, 0, 0)
	
    if receivedCommand<=4 {
           Scene_LivingRoom2.postUpdate(0)
           Scene_LivingRoom3.postUpdate(0)
    
 } 
 else  if receivedCommand<=8 {
           Scene_LivingRoom1.postUpdate(0)
           Scene_LivingRoom3.postUpdate(0)
    }
 else  if receivedCommand<=12 {
           Scene_LivingRoom1.postUpdate(0)
           Scene_LivingRoom2.postUpdate(0)
    }


	
	switch receivedCommand {

    //Switch on TV
case {
		sendCommand(Light_Hallway, OFF)
            ........

   }
switch receivedCommand {
	case 0: {
		 //Switch on TV
		sendCommand(Light_Hallway, OFF)
	}
	case 1: {
		.....
	}
}

It doesn’t matter using if or switch. Switch is a bit more performant than if statements. Thats all.

here is my complete rule, however its unstable for only selecting one button…

rule "Activate Scene LivingRoom"
when
	Item Scene_LivingRoom1 received command or Item Scene_LivingRoom2 received command or Item Scene_LivingRoom3 received command 
then

	val hsbOff = HSBType::fromRGB(0, 0, 0)
	
	if ((receivedCommand>0) && (receivedCommand<5)) {
    	Scene_LivingRoom2.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
 	} 
 	else if ((receivedCommand>4) && (receivedCommand<9)) {
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
    }
 	else if ((receivedCommand>8) && (receivedCommand<13)) {
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom2.postUpdate(0)
    }
    else{
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom2.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
    }
	
	logInfo("Debug","Received command is " + receivedCommand.toString() )
	switch receivedCommand {
	case 0: {
		
		
		}
	case 1:{
		
	}
	case 2:{
		
	}
	case 3:{
		
	}
	case 4:{
		
	}
	case 5:{
		
	}
	case 6:{
		
	}
	case 7:{
		
	}
	case 8:{
		
	}
	case 9:{
		
	}
	case 10:{
		
	}
	case 11:{
		
	}
	case 12:{
		
	}
	case default:{
		
	}
	}
end

For what reason you put the switch/case in there? And what is unstable?

The buttons in each scene are activated:

Log output:

11:41:11.088 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Scene_LivingRoom1' received command 2
11:41:11.095 [INFO ] [marthome.event.ItemStateChangedEvent] - Scene_LivingRoom1 changed from 1 to 2
11:41:11.686 [INFO ] [eclipse.smarthome.model.script.Debug] - Received command is 2

So nothing inside the if else get executed the way I though… but the rule does…
My rule:

rule "Activate Scene LivingRoom"
when
	Item Scene_LivingRoom1 received command or Item Scene_LivingRoom2 received command or Item Scene_LivingRoom3 received command 
then

	val hsbOff = HSBType::fromRGB(0, 0, 0) 
	val hsbOn = HSBType::fromRGB(255, 255, 255)
	if ((receivedCommand>0) && (receivedCommand<5)) {
    	Scene_LivingRoom2.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
 	} 
 	else if ((receivedCommand>4) && (receivedCommand<9)) {
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
    }
 	else if ((receivedCommand>8) && (receivedCommand<13)) {
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom2.postUpdate(0)
    }
    else{
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom2.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
    }
	
	logInfo("Debug","Received command is " + receivedCommand.toString() )
	switch receivedCommand {
		//OFF
	case 0: {
		Group_DMX_LivingRoom.members.filter[l|l.state.toString != hsbOff.toString].forEach[l| l.sendCommand(hsbOff) ]
		logInfo("Debug","turning off lights" )
		}
		//ON
	case 1:{
		Group_DMX_LivingRoom.members.filter[l|
			logInfo("Debug","turning on lights: " + l.state.toString+ "  " + l.name )
			l.state.toString != hsbOn.toString
		].forEach[l| l.sendCommand(hsbOn) ]
		logInfo("Debug","turning on lights" )
	}

The second Scene_LivingRoom2 should be Scene_LivingRoom3

Received command is 2
should trigger

if ((receivedCommand>0) && (receivedCommand<5)) {
	Scene_LivingRoom2.postUpdate(0)
    Scene_LivingRoom3.postUpdate(0)
}

Its seems like after several reboots its now working… Below is my complete code, could maybe be written smaller and better, but I hope someone else might find it useful, Only thing not working is to have a dimmer to adjust red, green, blue value with the dimmer value, couldnt get it to work so left it out for now.

import org.eclipse.smarthome.core.library.types.HSBType
import org.eclipse.xtext.xbase.lib.*

var HSBType hsbValue
var HSBType hsbValueMasterBedRoom
var HSBType hsbValueBathRoom
val hsbOff = HSBType::fromRGB(0, 0, 0) 
val hsbOn = HSBType::fromRGB(255, 255, 255)
	
var int redColor
var int greenColor
var int blueColor
var double dimmerValue =1.0

var int redValue
var int greenValue
var int blueValue
var String RGBvalues

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// Switch the different areas where LED-Lights should be switched on/off ////////////////7////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

val Functions$Function3 rgbLights= [ GroupItem mainGroup,GroupItem subGroup, HSBType hsbValue |
	
    val hsbOff = HSBType::fromRGB(0, 0, 0)
    //So all non  scene group lights in livingroom get switched off if they not already are off
    //val nonSceneLights = Group_DMX_LivingRoom.members.filter[l | !l.members(s as Group)]
    //nonSceneLights.members.filter[l|l.state.toString != hsbOff.toString].forEach[l| l.sendCommand(hsbOff as Command)]

	mainGroup.members.filter[l|l.state.toString != hsbOff.toString].forEach[l| l.sendCommand(hsbOff) ]
	
	subGroup.members.forEach[l|l.sendCommand(hsbValue)]
	//s.members.filter[l|l.state.toString != hsbValue.toString].forEach[l| l.sendCommand(hsbValue) ]
			
 

]

rule "Activate Scene LivingRoom"
when
	Item Scene_LivingRoom1 received command or Item Scene_LivingRoom2 received command or Item Scene_LivingRoom3 received command 
then


	if ((receivedCommand>0) && (receivedCommand<5)) {
    	Scene_LivingRoom2.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
        logInfo("Debug","Received command is " + receivedCommand.toString() + " we deactivate 2 and 3" )
 	} 
 	else if ((receivedCommand>4) && (receivedCommand<9)) {
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
        logInfo("Debug","Received command is " + receivedCommand.toString()+ " we deactivate 1 and 3" )
    }
 	else if ((receivedCommand>8) && (receivedCommand<13)) {
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom2.postUpdate(0)
        logInfo("Debug","Received command is " + receivedCommand.toString() + " we deactivate 1 and 2")
    }
    else{
    	Scene_LivingRoom1.postUpdate(0)
        Scene_LivingRoom2.postUpdate(0)
        Scene_LivingRoom3.postUpdate(0)
        logInfo("Debug","Received command is " + receivedCommand.toString() + " SHOULD NEVER HAPPEN")
    }
	
	
	switch receivedCommand  {
	//Default
	case 0: {
		}
	//OFF
	case 1:{
		Group_DMX_LivingRoom.members.filter[l|l.state.toString != hsbOff.toString].forEach[l| l.sendCommand(hsbOff) ]
		logInfo("Debug","turning off lights" )
	}
	//ON
	case 2:{
		Group_DMX_LivingRoom.members.filter[l|l.state.toString != hsbValue.toString].forEach[l| l.sendCommand(hsbOn) ]
		logInfo("Debug","turning on lights" )
		
	}
	//Dinner
	case 3:{
		hsbValue = HSBType::fromRGB(255, 255, 153)
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_Dinner,hsbValue)
	}
	//Reading
	case 4:{
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_Reading,hsbValue)
	}
	//FirePlace
	case 5:{
		hsbValue = HSBType::fromRGB(60, 60, 100)
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_FirePlace,hsbValue)
	}
	//Bar
	case 6:{
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_Bar,hsbValue)
		
	}
	case 7:{
		
	}
	//TV
	case 8:{
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_TV,hsbValue)
	}
	//Cooking
	case 9:{
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_Cooking,hsbValue)
	}
	//Wall
	case 10:{
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_Wall,hsbValue)
	}
	//Kitchen
	case 11:{
		hsbValue = HSBType::fromRGB(255, 255, 255)
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_Kitchen,hsbValue)
	}
	//Lounge
	case 12:{
		hsbValue = HSBType::fromRGB(255, 204, 51)
		rgbLights.apply(Group_DMX_LivingRoom,Group_DMX_Lounge,hsbValue)
	}
	
	}
end


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// Change color freely ////////////////7////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////


 
rule "Set RGB value Living Room"
    when
            Item Color_LivingRoom changed
    then
    logInfo("Info", "Set RGB value Living Room to : " +redColor.toString+ ":"  +greenColor.toString+ ":"  +blueColor.toString)
    hsbValue = Color_LivingRoom.state as HSBType
    
    //redValue = (redColor*dimmerValue).intValue
	//greenValue = (greenColor*dimmerValue).intValue
	//blueValue= (blueColor*dimmerValue).intValue
	
    //hsbValue   = HSBType::fromRGB(redValue, greenValue,blueValue)
	//logInfo("Info", "Set RGB value Living Room to : " +redValue.toString+ ":"  +greenValue.toString+ ":"  +blueValue.toString)
   
	Group_DMX_LivingRoom.members.filter[l|
			logInfo("Debug","changing on lights: " + l.state.toString+ "  " + l.name )
			l.state.toString != hsbOff.toString
		].forEach[l| l.sendCommand(hsbValue) ]
end




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// Change the moodings of light, e.g. warm white, white, lounge and night ////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
rule "Change the color in Living Room"
when
	Item MoodSelector_LivingRoom received command
then
	
	//warm white
	if (receivedCommand==1) {
		redColor = 255
		greenColor = 0
		blueColor =0	
	}
    //white
	if (receivedCommand==2) {
		redColor = 0
		greenColor = 255
		blueColor =0
	}
	//lounge
	if (receivedCommand==3) {
		redColor = 0
		greenColor = 0
		blueColor =255	
	}
	//night
	if (receivedCommand==4) {
		//255, 244, 229
		redColor = 255
		greenColor = 244
		blueColor =229
	}
	
	hsbValue   = HSBType::fromRGB(redColor, greenColor,blueColor)
	Color_LivingRoom.sendCommand(hsbValue)
end

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// Change the moodings of light, e.g. warm white, white, lounge and night ////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* 
rule "Change dimming in Living Room"
when
	Item Dimmer_LivingRoom changed
then

	logInfo("Debug","Dimmer state: "  )
	dimmerValue = 0.2//Dimmer_LivingRoom.state as DecimalType
    Color_LivingRoom.sendCommand(hsbValue)
end

*/


/***********************************************************************************************************
 * ************************************** MASTER BEDROOM ***************************************************
 * *********************************************************************************************************
 */



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// Change color freely ////////////////7////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
rule "Set RGB value MasterBedRoom"
    when
            Item Color_MasterBedRoom changed
    then
    
    hsbValueMasterBedRoom = Color_MasterBedRoom.state as HSBType
    
    //redValue = (redColor*dimmerValue).intValue
	//greenValue = (greenColor*dimmerValue).intValue
	//blueValue= (blueColor*dimmerValue).intValue
	
    //hsbValue   = HSBType::fromRGB(redValue, greenValue,blueValue)
	//logInfo("Info", "Set RGB value Living Room to : " +redValue.toString+ ":"  +greenValue.toString+ ":"  +blueValue.toString)
   
	Group_DMX_MasterBedRoom.members.filter[l|
			l.state.toString != hsbOff.toString
		].forEach[l| l.sendCommand(hsbValueMasterBedRoom) ]
end

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// Change the scene of light, e.g. warm white, white, lounge and night ////////////////////////////
//

rule "Change the scene in Master Bedroom"
when
	Item Scene_MasterBedRoom received command
then
	
	//warm white
	switch receivedCommand {
		//OFF
		case 1: {
			hsbValueMasterBedRoom = HSBType::fromRGB(0, 0, 0)
			Group_DMX_MasterBedRoom.members.forEach[l|l.sendCommand(hsbValueMasterBedRoom)]	
			logInfo("Info", "Set RGB value Master Room to :")
		}
		//ON
		case 2:{
			hsbValueMasterBedRoom = HSBType::fromRGB(255, 255, 255)
		    rgbLights.apply(Group_DMX_MasterBedRoom,Group_DMX_MasterBedRoom,hsbValueMasterBedRoom)
		    logInfo("Info", "Set RGB value Master Room to ON :")
		}
		//NIGHT
		case 3:{
			hsbValueMasterBedRoom = HSBType::fromRGB(50, 10, 10)
		    rgbLights.apply(Group_DMX_MasterBedRoom,Group_DMX_MasterBedRoom,hsbValueMasterBedRoom)
		}
		//READING
		case 4:{
			hsbValueMasterBedRoom = HSBType::fromRGB(200, 200, 100)
		    rgbLights.apply(Group_DMX_MasterBedRoom,Group_DMX_MasterBedRoom,hsbValueMasterBedRoom)
		}
	}		
	
end


/****************************************************************************************************
 * ***************************************** BATHROOM ***********************************************
 ************************************************************************************************* */


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// Change color freely ////////////////7////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
rule "Set RGB value BathRoom"
    when
            Item Color_BathRoom changed
    then
    
    hsbValueBathRoom = Color_BathRoom.state as HSBType
    
    //redValue = (redColor*dimmerValue).intValue
	//greenValue = (greenColor*dimmerValue).intValue
	//blueValue= (blueColor*dimmerValue).intValue
	
    //hsbValue   = HSBType::fromRGB(redValue, greenValue,blueValue)
	//logInfo("Info", "Set RGB value Living Room to : " +redValue.toString+ ":"  +greenValue.toString+ ":"  +blueValue.toString)
   
	Group_DMX_BathRoom.members.filter[l|
			l.state.toString != hsbOff.toString
		].forEach[l| l.sendCommand(hsbValueBathRoom) ]
end

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// Change the scene of light, e.g. warm white, white, lounge and night ////////////////////////////
//

rule "Change the scene in Bathroom"
when
	Item Scene_BathRoom received command
then
	
	//warm white
	switch receivedCommand {
		//OFF
		case 1: {
			hsbValueBathRoom   = HSBType::fromRGB(255, 0, 0)
			Group_DMX_BathRoom.members.forEach[l|l.sendCommand(hsbValueBathRoom)]	
		}
		//ON
		case 2:{
			hsbValueBathRoom = HSBType::fromRGB(255, 255, 255)
		    rgbLights.apply(Group_DMX_BathRoom,Group_DMX_BathRoom,hsbValueBathRoom)
		}
		//NIGHT
		case 3:{
			hsbValueBathRoom = HSBType::fromRGB(50, 10, 10)
		    rgbLights.apply(Group_DMX_BathRoom,Group_DMX_BathRoom,hsbValueBathRoom)
		}
		//SHOWER
		case 4:{
			hsbValueBathRoom = HSBType::fromRGB(200, 200, 100)
		    rgbLights.apply(Group_DMX_BathRoom,Group_DMX_BathRoom,hsbValueBathRoom)
		}
	}		
	
end

@skatun This is what I experienced with OH a lot. At some point, if you refreshed rules, the updates don’t show up on the client (browser, Android etc.). But I think that’s a thing we have to life with. :cry:

What is wrong with
Frame label=“Scenes” {
Switch item=Scene_LivingRoom1 label=“Group 1” mappings=[1=“TV”, 2=“DINNER”, 3=“READING”,4=“OFF”]
Switch item=Scene_LivingRoom1 label=“Group 2” mappings=[5=“FIREPLACE”, 6=“BAR”, 7=“PARTY”,8=“ON”]
Switch item=Scene_LivingRoom1 label=“Group 3” mappings=[9=“COOKING”, 10=“WALL”, 11=“KITCHEN”,12=“LOUNGE”]
Text item=Scene_LivingRoom1 label=“Scene = [%d]”
}

Works fine with me, but maybe I miss something

It was rebooting issues. All works fine. I even wrote a tutorial about it: