Group status goes out of sync with the status of individual items

Evening all,

I’ve set up one light (Study) and attached it to the group ‘Lights_Indoor’ which is attached to ‘Lights All’

The light switch and group switches control the LIFX bulb perfectly well, but the UI does not reflect the correct status.

For instance, when the ‘Study’ light is switched off using the ‘Study’ switch, there are no lights on in the group, but the icons remain in the ‘on’ state.

In the sample above, the ‘All Lights’ and ‘Indoor Lights’ switches should have gone ‘off’.

The same thing applies when switching the light back on from the item-level, it has no effect on the group switches.

That’s the ‘bottom up’ scenario. The ‘top down’ scenario works perfectly fine (Using the ‘All Lights’ switch correctly sets the ‘Indoor Lights’ and ‘Study Lights’ icons to on/off as appropriate.

The ‘Indoor Lights’ switch updated the ‘Study Light’ switch correctly, but has no affect on the ‘All Lights’ switch.

I’ve no idea about the nature of this issue :frowning:

Here is my .items definition:

/* Lights */
Group:Switch:OR(ON, OFF)	Lights_All		"All Lights [%d]"		<light>
Group:Switch:OR(ON, OFF)	Lights_Indoor		"Indoor Lights [%d]"	<light>		(Lights_All)
Group:Switch:OR(ON, OFF)	Lights_Outdoor		"Outdoor Lights [%d]" 	<light>		(Lights_All)

Color 		Light_Study		"Study Light [%d %%]"			<light>		(Lights_All, Lights_Indoor) 	{ channel="lifx:colorlight:D073D51407BC:color" }

In the Basic UI, the two group switches update each other correctly but have no affect on the ‘Study’

Whether switching the groups on or off - not effect on the item ‘Study’:

In the Basic UI the ‘Study’ switch does control the two group switches, but after a spit second sets itself to the ‘off’ position and thereafter no longer works:

I’ve seen similar behaviour with my Domitech Z-Wave bulb and my Wemo lights so I don’t think its a binding issue

So it seems I’ve created some kind of disjoint in my setup. Can anyone advise?

1 Like

I’m having a very similar problem, did you find a solution?

@electron_misfire, I’m going to build a simple set of lights and groups and try figure it out. I think it may have something to do with the group definition, and I’m hoping I don’t need to write a rule to achieve it. Once I’m done I’ll update here.

Did you have any luck in the mean time?

Hi Craig, I am running into the same behaviour. More over: the group switch is perfectly in sync on the OH app (Android), but not in the Basic UI (web UI on Chrome - Mac).
I would be interested to know if you found a root cause for your issue?

Hi Peter,

To work around this I created some ‘proxy switches’ which I use to control the individual lights.

I’ve attached my items definition and rules. It works very well but to this day I’m not sure if its the best solution or just a dirty workaround.

I would actually expect it to behave correctly out of the box just by assigning items to a group.

Items:

/* -----------------Groups---------------- */
Group:Dimmer	Lights_All			  "All Lights [%d]"		<light>
Group:Dimmer	Lights_Indoor		  "Indoor Lights [%d]"	<light>		(Lights_All)
Group:Dimmer	Lights_Outdoor		"Outdoor Lights [%d]"	<light>		(Lights_All)
Group:Dimmer  Lights_Front_Door "Front door Lights [%d]"	<light>		(Lights_All, Lights_Outdoor)
Group:Dimmer  Lights_Patio      "Patio Lights [%d]"		    <light>		(Lights_All, Lights_Outdoor)

/* -----------------Lights----------------- */
Dimmer Light_Front_Door_1		"Front Door 1 [%d %%]"	 <light>		(Lights_Front_Door) {channel="hue:0100:001788494ba6:1:brightness"}
Dimmer Light_Front_Door_2 	"Front Door 2 [%d %%]"		 <light>		(Lights_Front_Door)	{channel="hue:0100:001788494ba6:2:brightness"}
Dimmer Light_Kitchen_Porch	"Kitchen Entrance [%d %%]"	 <light>		(Lights_Outdoor)	  {channel="hue:0100:001788494ba6:4:brightness"}
Dimmer Light_Braai 				  "Braai [%d %%]"		 <light>		(Lights_Outdoor)	  {channel="wemo:MZ100:Bridge-1_0-231441B0100BB8:94103EA2B27828AA:brightness"}
Dimmer Light_Patio_1 			  "Patio 1 [%d %%]"		 <light>		(Lights_Patio)	    {channel="wemo:MZ100:Bridge-1_0-231441B0100BB8:94103EA2B277FB48:brightness"}
Dimmer Light_Patio_2 			  "Patio 2 [%d %%]"		 <light>		(Lights_Patio)	    {channel="wemo:MZ100:Bridge-1_0-231441B0100BB8:94103EA2B27825D3:brightness"}
Dimmer Light_Adi_Deck			  "Adi's deck [%d %%]"	 <light>		(Lights_Outdoor)  	{channel="hue:0100:001788494ba6:3:brightness"}
Dimmer Light_Backyard 			"Back yard [%d %%]"		 <light>		(Lights_Outdoor)	  {channel="wemo:MZ100:Bridge-1_0-231441B0100BB8:94103EA2B2784DC7:brightness"}
Dimmer Light_Study 				  "Study [%d %%]"		 <light>		(Lights_Indoor)		  {channel="zwave:device:f8465124:node3:switch_dimmer"}

Virtual switches:

/* -----------------Groups---------------- */

// schedules a event which starts at sunset, updating the Switch with ON, followed by a OFF

Switch NightState         	"Night"
Switch LateNightState     	"Late at Night"

Rules to control the switches:

rule "Switch lights on at night"
when
	Item NightState changed to ON
then
	logInfo("Night time", "--> Lights on")
			sendCommand(Lights_Outdoor, ON)
			sendCommand(Light_Study, 40)
			logInfo("Night time", "--> Lights switched " + NightState.state)
end

rule "Switch study lamp off late at night"
when
	Item LateNightState changed to ON
then
			sendCommand(Light_Study, OFF)
			logInfo("Study light", "--> Switched " + NightState)
end

My day/night rules:

rule "Switch NightState to ON at sunset"
when
    Channel 'astro:sun:home:set#event' triggered START
then
		postUpdate(NightState, ON)
    logInfo("NightState updated", "--> NightState set to " + NightState.state)
end

rule "Switch NightState and LateNightState to OFF at sunrise"
when
    Channel 'astro:sun:home:rise#event' triggered START
then
		postUpdate(NightState, OFF)
    postUpdate(LateNightState, OFF)
    logInfo("NightState updated", "--> NightState set to " + NightState.state)
    logInfo("LateNightState updated", "--> LateNightState set to " + LateNightState.state)
end

rule "Switch LateNightState to ON at 22h00"
when
    Time cron "0 0 22 1/1 * ? *"
then
		postUpdate(LateNightState, ON)
    logInfo("LateNightState updated", "--> LateNightState set to " + LateNightState.state)
end