[SOLVED] Reducing the impact of turning off MANY lights? How to optimise

Hi All,

I have many many lights (over 150). Right now, my lights are part of quite a few groups, which roll up into

gAllLights

The network runs on OH 2.4 Stable. Lastest 2.5 ZWave Snapshot and sits on an Intel i3 8100 CPU with 16GB Ram and SSD. CPU/Memory usage are low (Around 1.5%)

What I see, when I turn off gAllLights, is every single command gets an OFF command, irrespective of if the light is ON or OFF. Not ideal.

The group configuration is as below:

Group:Switch:OR(ON,OFF)  gAllLights "All Lights" {alexa="PowerController.powerState"}

I also have a rule, but it seems every device gets an OFF command though anyway

rule "Turn off all Lights"
when
        Item gAllLights received command OFF
then
          gAllLights?.members.filter[Lights | Lights.state==ON].forEach[ LightsON |
               LightsON.sendCommand(OFF)
          ]
end

Am I doing something wrong?

The net result is it takes AGGGES! to turn off all the lights that were ON. Why, I’m guessing is because sending 150+ OFF commands to the Zwave Network is less than ideal.

Any thoughts/help on how I can optimise this? Thank you

.

Yes because you send the command to the group to the cvommands will cascade down the members regardless of the rule. Use a proxiItem instead

rule "Turn off all Lights"
when
        Item proxyAllLights received command OFF
then
          gAllLights?.members.filter[Lights | Lights.state==ON].forEach[ LightsON |
               LightsON.sendCommand(OFF)
          ]
end
1 Like

Thank you Vincent, good point! Ill test this out.

As your lights are in subgrous, I’m pretty sure you have to use allMembers instead:

rule "Turn off all Lights"
when
        Item proxyAllLights received command OFF
then
          gAllLights?.allMembers.filter[Lights | Lights.state==ON].forEach[ LightsON |
               LightsON.sendCommand(OFF)
          ]
end
2 Likes

I’ve created a function in the beginning of my rules file:

//GenericItem is used, so it can accept Dimmers, Switches and Groups
val checkFirstS=[GenericItem item,OnOffType command|
		if (item instanceof GroupItem){
			item.allMembers?.forEach[i|
				if (i.state != command) i.sendCommand(command)	
			]
		}else{
			if (item.state != command) item.sendCommand(command)	
		}
	]

What it does, it checks if it is necessary to send the command. It will cascade down to each item in the group.

You can use it anywhere in your rules file with the command:

checkFirstS.apply(gAllLights,OFF)

You can use it with Switches, Dimmers(only on/off) and Groups

3 Likes

Unforunately that did not work

12:22:36.415 [INFO ] [arthome.event.ItemStatePredictedEvent] - South_SpotLight_Sw1 predicted to become ON
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - Movie_Stairs_Sw1 predicted to become OFF
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Picture_Sw1 predicted to become OFF
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Downlights_Sw1 predicted to become OFF
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Pelmet_Sw1 predicted to become OFF
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - Entrance_FeatureWall_Sw1 predicted to become OFF
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - Study_Sw1 predicted to become OFF
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Downlights_Sw1 predicted to become OFF
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Picture_Lights_Sw1 predicted to become OFF
12:22:36.416 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Alcove_Sw1 predicted to become OFF
12:22:36.417 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Pelmet_Sw1 predicted to become OFF
12:22:36.417 [INFO ] [arthome.event.ItemStatePredictedEvent] - AeonSocket5Sw1 predicted to become OFF
12:22:36.417 [INFO ] [arthome.event.ItemStatePredictedEvent] - IslandBench_Downlights_Sw1 predicted to become OFF
12:22:36.417 [INFO ] [home.event.GroupItemStateChangedEvent] - gKitchenLights changed from OFF to ON through IslandBench_Downlights_Sw1
12:22:36.417 [INFO ] [arthome.event.ItemStatePredictedEvent] - KitchenBench_Lights_Sw1 predicted to become OFF
12:22:36.417 [INFO ] [arthome.event.ItemStatePredictedEvent] - Kitchen_Shadow_Sw2 predicted to become OFF
12:22:36.417 [INFO ] [arthome.event.ItemStatePredictedEvent] - Pantry_Downlights_Sw1 predicted to become ON
12:22:36.417 [INFO ] [arthome.event.ItemStatePredictedEvent] - Pantry_Cupboard_Sw2 predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_Downlights_Sw1 predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_Downlights_Dimmer predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_Picture_Sw1 predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_WallLights_Sw1 predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_CeilingLights_Sw2 predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Dining_Pelmet_Sw1 predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Table_Sw1 predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Master_Bedroom_Robe_Downlights_Dimmer predicted to become OFF
12:22:36.418 [INFO ] [arthome.event.ItemStatePredictedEvent] - Master_Bedroom_Ensuite_Downlights_Dimmer predicted to become OFF
12:22:36.419 [INFO ] [smarthome.event.ItemStateChangedEvent] - Master_Bedroom_Robe_Downlights_Dimmer changed from 100 to 0
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lift_Iris_Sw1 predicted to become OFF
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lift_Lobby_Chandelier_Sw1 predicted to become OFF
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lift_Lobby_Lights_Sw2 predicted to become OFF
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - Master_Bedroom_Downlights_Sw1 predicted to become OFF
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - Master_Bedroom_Mirror_Downlights_Sw1 predicted to become OFF
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - AeonSocket1Sw1 predicted to become NULL
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - AeonSocket3Sw1 predicted to become OFF
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - AeonSocket4Sw1 predicted to become OFF
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - Master_Bedroom_Robe_Downlights_Sw1 predicted to become OFF
12:22:36.419 [INFO ] [arthome.event.ItemStatePredictedEvent] - Master_Bedroom_Ensuite_Downlights_Sw1 predicted to become OFF
12:22:36.420 [INFO ] [arthome.event.ItemStatePredictedEvent] - AeonSocket2Sw1 predicted to become OFF
12:22:36.420 [INFO ] [arthome.event.ItemStatePredictedEvent] - AeonSocket5Sw1 predicted to become OFF
12:22:36.420 [INFO ] [arthome.event.ItemStatePredictedEvent] - IslandBench_Downlights_Sw1 predicted to become OFF
12:22:36.420 [INFO ] [arthome.event.ItemStatePredictedEvent] - KitchenBench_Lights_Sw1 predicted to become OFF
12:22:36.420 [INFO ] [arthome.event.ItemStatePredictedEvent] - Kitchen_Shadow_Sw2 predicted to become OFF
12:22:36.420 [INFO ] [arthome.event.ItemStatePredictedEvent] - Pantry_Downlights_Sw1 predicted to become ON
12:22:36.420 [INFO ] [arthome.event.ItemStatePredictedEvent] - Pantry_Cupboard_Sw2 predicted to become OFF
12:22:36.420 [INFO ] [arthome.event.ItemStatePredictedEvent] - Pantry_Downlights_Num1 predicted to become 0
12:22:36.431 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Pantry_Downlights_Sw1' received command OFF
12:22:36.431 [INFO ] [arthome.event.ItemStatePredictedEvent] - Pantry_Downlights_Sw1 predicted to become ON
12:22:36.432 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'South_SpotLight_Sw1' received command OFF
12:22:36.432 [INFO ] [arthome.event.ItemStatePredictedEvent] - South_SpotLight_Sw1 predicted to become ON

That’s a nice idea! I don’t really understand the logic, but I’ll give it a go!

My rules file would therefore be:

//GenericItem is used, so it can accept Dimmers, Switches and Groups
val checkFirstS=[GenericItem item,OnOffType command|
                if (item instanceof GroupItem){
                        item.allMembers?.forEach[i|
                                if (i.state != command) i.sendCommand(command)
                        ]
                }else{
                        if (item.state != command) item.sendCommand(command)
                }
        ]

rule "Turn off all Lights"
when
        Item Proxy_gAllLights received command
then
        checkFirstS.apply(gAllLights,OFF)
end

Have you looked at the new rule engine and the OpenHAB Helper Libraries? Rules run much faster there and there is already a function to send a command only if the item is in a different state.

I have not Micahel, is this what you speak of?

That would be the backbone yes. The Helper Libraries are where the magic happens. Python is the most developed of the 3 languages. And being that you are using a real language and not a scripting language you can write custom packages and import them in any script, instead of the hack-y versions of “global” functions found in the old rule engine.

I doubt that this would help here, as I’m pretty sure the binding is the bottleneck.

@dastrix80 Please put a log in your rule:

rule "Turn off all Lights"
when
        Item proxyAllLights received command OFF
then
          gAllLights?.allMembers.filter[Lights | Lights.state==ON].forEach[ LightsON |
               LightsON.sendCommand(OFF)
               logInfo("alloff","Item {} is set to OFF from {}",LightsON.name,LightsON.state)
          ]
end

The log will emerge in openhab.log

2 Likes

Thanks ill do that tonight!

Hi Udo

See below, i think it showed two lights but I still see all the OFF commands

The rule is as follows:

rule "Turn off all Lights"
when
        Item Proxy_gAllLights received command OFF
then
          gAllLights?.allMembers.filter[Lights | Lights.state==ON].forEach[ LightsON |
               LightsON.sendCommand(OFF)
               logInfo("alloff","Item {} is set to OFF from {}",LightsON.name,LightsON.state)
          ]
end


root@ihp:/etc/openhab2/items# cat /var/log/openhab2/openhab.log | grep alloff
2019-10-16 08:40:45.520 [INFO ] [clipse.smarthome.model.script.alloff] - Item Pantry_Downlights_Sw1 is set to OFF from ON
2019-10-16 08:40:45.522 [INFO ] [clipse.smarthome.model.script.alloff] - Item Lounge_Pelmet_Sw1 is set to OFF from ON

So that rule isn’t triggered, and something else is doing the work.
Are you still sending a command to a Group?
Make sure you have only one rule named “Turn off all Lights”

Hi rossko, I updated my post above

Yes, only one rule.

etc/openhab2/rules$ grep -r "Turn off all Lights"
scenes.rules:rule "Turn off all Lights"
:/etc/openhab2/rules$

You would be able to see that in your events.log. Please show us the beginning of your incidnet.

Scratch that! WRONG COMMAND! slaps forehead

Command gets sent to the group, despite only SOME lights being on, the command is sent to every light


08:57:06.015 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Proxy_gAllLights' received command OFF
08:57:06.018 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'gLivingDimmers' received command OFF
08:57:06.018 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'gLivingLights' received command OFF
08:57:06.018 [INFO ] [eclipse.smarthome.model.script.alloff] - Item FamilyRoom_Downlights_Sw1 is set to OFF from ON
08:57:06.019 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Movie_Stairs_Dimmer1' received command OFF
08:57:06.019 [INFO ] [eclipse.smarthome.model.script.alloff] - Item Lounge_Downlights_Sw1 is set to OFF from ON
08:57:06.019 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Picture_Dimmer1' received command OFF
08:57:06.020 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Downlights_Dimmer1' received command OFF
08:57:06.020 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Pelmet_Dimmer1' received command OFF
08:57:06.020 [INFO ] [eclipse.smarthome.model.script.alloff] - Item Lounge_Pelmet_Sw1 is set to OFF from ON
08:57:06.020 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Study_Dimmer' received command OFF
08:57:06.020 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Downlights_Dimmer' received command OFF
08:57:06.021 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Picture_Lights_Dimmer' received command OFF
08:57:06.021 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Alcove_Dimmer' received command OFF
08:57:06.021 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Pelmet_Dimmer' received command OFF
08:57:06.022 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'IslandBench_Downlights_Dimmer1' received command OFF
08:57:06.022 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Dining_Pelmet_Dimmer1' received command OFF
08:57:06.023 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'MovieRoom_External_Dimmer' received command OFF
08:57:06.023 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Movie_Stairs_Sw1' received command OFF
08:57:06.026 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Picture_Sw1' received command OFF
08:57:06.035 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Downlights_Sw1' received command OFF
08:57:06.036 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Pelmet_Sw1' received command OFF
08:57:06.037 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Entrance_FeatureWall_Sw1' received command OFF
08:57:06.037 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Study_Sw1' received command OFF
08:57:06.038 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Downlights_Sw1' received command OFF
08:57:06.039 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Picture_Lights_Sw1' received command OFF
08:57:06.039 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Alcove_Sw1' received command OFF
08:57:06.039 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Pelmet_Sw1' received command OFF
08:57:06.040 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'AeonSocket5Sw1' received command OFF
08:57:06.040 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'IslandBench_Downlights_Sw1' received command OFF
08:57:06.041 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'KitchenBench_Lights_Sw1' received command OFF
08:57:06.041 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Kitchen_Shadow_Sw2' received command OFF
08:57:06.042 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Pantry_Downlights_Sw1' received command OFF
08:57:06.042 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Pantry_Cupboard_Sw2' received command OFF
08:57:06.043 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Cinema_Downlights_Sw1' received command OFF
08:57:06.043 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Cinema_Downlights_Dimmer' received command OFF
08:57:06.048 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Cinema_Picture_Sw1' received command OFF
08:57:06.049 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Cinema_WallLights_Sw1' received command OFF
08:57:06.049 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Cinema_CeilingLights_Sw2' received command OFF
08:57:06.050 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Dining_Pelmet_Sw1' received command OFF
08:57:06.050 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Table_Sw1' received command OFF
08:57:06.050 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Garden_Sw1' received command OFF
08:57:06.050 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'SecretGardenSpot_Sw2' received command OFF
08:57:06.051 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'MovieRoom_External_Sw1' received command OFF
08:57:06.051 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'LivingLevel_Wall_Lights_Sw1' received command OFF
08:57:06.051 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Entrance_Stairs_Sw1' received command OFF
08:57:06.052 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'EntranceWallLights_Sw1' received command OFF
08:57:06.052 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'EntranceDownLights_Sw2' received command OFF
08:57:06.053 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Covered_Balcony_Sw1' received command OFF
08:57:06.054 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Covered_Balcony_Sw2' received command OFF
08:57:06.054 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'South_SpotLight_Sw1' received command OFF
08:57:06.055 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Downlights_Sw1' received command OFF
08:57:06.055 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Downlights_Sw1' received command OFF
08:57:06.056 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'gFamilyLights' received command OFF
08:57:06.056 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Pelmet_Sw1' received command OFF
08:57:06.057 [INFO ] [arthome.event.ItemStatePredictedEvent] - Movie_Stairs_Dimmer1 predicted to become OFF
08:57:06.058 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Picture_Dimmer1 predicted to become 0
08:57:06.059 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Downlights_Dimmer1 predicted to become OFF
08:57:06.059 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Pelmet_Dimmer1 predicted to become OFF
08:57:06.060 [INFO ] [arthome.event.ItemStatePredictedEvent] - Study_Dimmer predicted to become OFF
08:57:06.060 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Movie_Stairs_Sw1' received command OFF
08:57:06.061 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Picture_Sw1' received command OFF
08:57:06.062 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Downlights_Sw1' received command OFF
08:57:06.062 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'FamilyRoom_Pelmet_Sw1' received command OFF
08:57:06.062 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'AeonSocket2Sw1' received command OFF
08:57:06.063 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Entrance_FeatureWall_Sw1' received command OFF
08:57:06.063 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Downlights_Sw1' received command OFF
08:57:06.064 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Picture_Lights_Sw1' received command OFF
08:57:06.065 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Alcove_Sw1' received command OFF
08:57:06.066 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Lounge_Pelmet_Sw1' received command OFF
08:57:06.068 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Dining_Pelmet_Sw1' received command OFF
08:57:06.068 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Downlights_Dimmer predicted to become OFF
08:57:06.069 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Table_Sw1' received command OFF
08:57:06.070 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Picture_Lights_Dimmer predicted to become OFF
08:57:06.070 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Alcove_Dimmer predicted to become OFF
08:57:06.071 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Pelmet_Dimmer predicted to become OFF
08:57:06.072 [INFO ] [arthome.event.ItemStatePredictedEvent] - IslandBench_Downlights_Dimmer1 predicted to become OFF
08:57:06.072 [INFO ] [home.event.GroupItemStateChangedEvent] - gLivingDimmers changed from OFF to ON through Movie_Stairs_Dimmer1
08:57:06.072 [INFO ] [smarthome.event.ItemStateChangedEvent] - FamilyRoom_Downlights_Dimmer1 changed from 100 to 0
08:57:06.072 [INFO ] [smarthome.event.ItemStateChangedEvent] - Lounge_Downlights_Dimmer changed from 100 to 0
08:57:06.073 [INFO ] [arthome.event.ItemStatePredictedEvent] - Dining_Pelmet_Dimmer1 predicted to become OFF
08:57:06.073 [INFO ] [smarthome.event.ItemStateChangedEvent] - Lounge_Pelmet_Dimmer changed from 100 to 0
08:57:06.074 [INFO ] [home.event.GroupItemStateChangedEvent] - gLivingDimmers changed from ON to OFF through Lounge_Pelmet_Dimmer
08:57:06.074 [INFO ] [arthome.event.ItemStatePredictedEvent] - MovieRoom_External_Dimmer predicted to become OFF
08:57:06.074 [INFO ] [arthome.event.ItemStatePredictedEvent] - Movie_Stairs_Sw1 predicted to become OFF
08:57:06.075 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Picture_Sw1 predicted to become OFF
08:57:06.075 [INFO ] [home.event.GroupItemStateChangedEvent] - gLivingLights changed from OFF to ON through Movie_Stairs_Sw1
08:57:06.076 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Downlights_Sw1 predicted to become OFF
08:57:06.076 [INFO ] [smarthome.event.ItemStateChangedEvent] - FamilyRoom_Downlights_Sw1 changed from ON to OFF
08:57:06.076 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Pelmet_Sw1 predicted to become OFF
08:57:06.076 [INFO ] [arthome.event.ItemStatePredictedEvent] - Entrance_FeatureWall_Sw1 predicted to become OFF
08:57:06.077 [INFO ] [arthome.event.ItemStatePredictedEvent] - Study_Sw1 predicted to become OFF
08:57:06.077 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Downlights_Sw1 predicted to become OFF
08:57:06.077 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Picture_Lights_Sw1 predicted to become OFF
08:57:06.078 [INFO ] [smarthome.event.ItemStateChangedEvent] - Lounge_Downlights_Sw1 changed from ON to OFF
08:57:06.078 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Alcove_Sw1 predicted to become OFF
08:57:06.078 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Pelmet_Sw1 predicted to become OFF
08:57:06.078 [INFO ] [arthome.event.ItemStatePredictedEvent] - AeonSocket5Sw1 predicted to become OFF
08:57:06.078 [INFO ] [smarthome.event.ItemStateChangedEvent] - Lounge_Pelmet_Sw1 changed from ON to OFF
08:57:06.079 [INFO ] [home.event.GroupItemStateChangedEvent] - gFamilyLights changed from ON to OFF through Lounge_Downlights_Sw1
08:57:06.079 [INFO ] [home.event.GroupItemStateChangedEvent] - gLivingLights changed from ON to OFF through Lounge_Downlights_Sw1
08:57:06.079 [INFO ] [arthome.event.ItemStatePredictedEvent] - IslandBench_Downlights_Sw1 predicted to become OFF
08:57:06.079 [INFO ] [home.event.GroupItemStateChangedEvent] - gAllLights changed from ON to OFF through gFamilyLights
08:57:06.080 [INFO ] [arthome.event.ItemStatePredictedEvent] - KitchenBench_Lights_Sw1 predicted to become OFF
08:57:06.080 [INFO ] [home.event.GroupItemStateChangedEvent] - gInsideLights changed from ON to OFF through gFamilyLights
08:57:06.080 [INFO ] [home.event.GroupItemStateChangedEvent] - gAllLivingLights changed from ON to OFF through gFamilyLights
08:57:06.080 [INFO ] [arthome.event.ItemStatePredictedEvent] - Kitchen_Shadow_Sw2 predicted to become OFF
08:57:06.081 [INFO ] [arthome.event.ItemStatePredictedEvent] - Pantry_Downlights_Sw1 predicted to become OFF
08:57:06.081 [INFO ] [arthome.event.ItemStatePredictedEvent] - Pantry_Cupboard_Sw2 predicted to become OFF
08:57:06.081 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_Downlights_Sw1 predicted to become OFF
08:57:06.081 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_Downlights_Dimmer predicted to become OFF
08:57:06.082 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_Picture_Sw1 predicted to become OFF
08:57:06.082 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_WallLights_Sw1 predicted to become OFF
08:57:06.082 [INFO ] [arthome.event.ItemStatePredictedEvent] - Cinema_CeilingLights_Sw2 predicted to become OFF
08:57:06.082 [INFO ] [arthome.event.ItemStatePredictedEvent] - Dining_Pelmet_Sw1 predicted to become OFF
08:57:06.082 [INFO ] [arthome.event.ItemStatePredictedEvent] - Table_Sw1 predicted to become OFF
08:57:06.082 [INFO ] [arthome.event.ItemStatePredictedEvent] - Garden_Sw1 predicted to become OFF
08:57:06.083 [INFO ] [arthome.event.ItemStatePredictedEvent] - SecretGardenSpot_Sw2 predicted to become OFF
08:57:06.083 [INFO ] [arthome.event.ItemStatePredictedEvent] - MovieRoom_External_Sw1 predicted to become OFF
08:57:06.083 [INFO ] [arthome.event.ItemStatePredictedEvent] - LivingLevel_Wall_Lights_Sw1 predicted to become OFF
08:57:06.084 [INFO ] [arthome.event.ItemStatePredictedEvent] - Entrance_Stairs_Sw1 predicted to become OFF
08:57:06.084 [INFO ] [arthome.event.ItemStatePredictedEvent] - EntranceWallLights_Sw1 predicted to become OFF
08:57:06.084 [INFO ] [arthome.event.ItemStatePredictedEvent] - EntranceDownLights_Sw2 predicted to become OFF
08:57:06.085 [INFO ] [arthome.event.ItemStatePredictedEvent] - Covered_Balcony_Sw1 predicted to become OFF
08:57:06.085 [INFO ] [arthome.event.ItemStatePredictedEvent] - Covered_Balcony_Sw2 predicted to become OFF
08:57:06.085 [INFO ] [arthome.event.ItemStatePredictedEvent] - South_SpotLight_Sw1 predicted to become OFF
08:57:06.085 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Downlights_Sw1 predicted to become OFF
08:57:06.085 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Downlights_Sw1 predicted to become OFF
08:57:06.086 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Pelmet_Sw1 predicted to become OFF
08:57:06.086 [INFO ] [arthome.event.ItemStatePredictedEvent] - Movie_Stairs_Sw1 predicted to become OFF
08:57:06.086 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Picture_Sw1 predicted to become OFF
08:57:06.086 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Downlights_Sw1 predicted to become OFF
08:57:06.086 [INFO ] [arthome.event.ItemStatePredictedEvent] - FamilyRoom_Pelmet_Sw1 predicted to become OFF
08:57:06.087 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Picture_Lights_Sw1 predicted to become OFF
08:57:06.087 [INFO ] [arthome.event.ItemStatePredictedEvent] - AeonSocket2Sw1 predicted to become OFF
08:57:06.087 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Downlights_Sw1 predicted to become OFF
08:57:06.087 [INFO ] [arthome.event.ItemStatePredictedEvent] - Entrance_FeatureWall_Sw1 predicted to become OFF
08:57:06.087 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Alcove_Sw1 predicted to become OFF
08:57:06.088 [INFO ] [arthome.event.ItemStatePredictedEvent] - Lounge_Pelmet_Sw1 predicted to become OFF
08:57:06.088 [INFO ] [arthome.event.ItemStatePredictedEvent] - Dining_Pelmet_Sw1 predicted to become OFF
08:57:06.088 [INFO ] [arthome.event.ItemStatePredictedEvent] - Table_Sw1 predicted to become OFF

Udo’s log shows this:

cat /var/log/openhab2/openhab.log | grep alloff
2019-10-16 08:40:45.520 [INFO ] [clipse.smarthome.model.script.alloff] - Item Pantry_Downlights_Sw1 is set to OFF from ON
2019-10-16 08:40:45.522 [INFO ] [clipse.smarthome.model.script.alloff] - Item Lounge_Pelmet_Sw1 is set to OFF from ON
2019-10-16 08:57:06.018 [INFO ] [clipse.smarthome.model.script.alloff] - Item FamilyRoom_Downlights_Sw1 is set to OFF from ON
2019-10-16 08:57:06.019 [INFO ] [clipse.smarthome.model.script.alloff] - Item Lounge_Downlights_Sw1 is set to OFF from ON
2019-10-16 08:57:06.020 [INFO ] [clipse.smarthome.model.script.alloff] - Item Lounge_Pelmet_Sw1 is set to OFF from ON

Which contradicts what the other log shows

Yep. Because the group has an OR aggregated state. Plus individual members that are really ON will get another OFF command.
You can enhance the rule to ignore Group types, or restructure the rule to deal with bottom-level groups only.

Ah, the TOP level group has OR yes.

Can you elaborate on the suggestions you’ve mentioned? Essentially, I want the OFF to the individual members of the bottom level groups