Group not triggered when item change his state

Hi all,

I have installed openHab 2.4.0 upgraded from 2.3.0 on Ubuntu 18.04 fully updated.
Everythig works fine since 1 month, where two of my groups of items stop to work.
This are the groups:
Group:Contact:OR(OPEN,CLOSED) gDoorSensor "Porte Aperte [ (%d) ]" <door> (Home)

Group:Contact:OR(OPEN,CLOSED) gWindowSensor "Finestre Aperte [ (%d) ]" <window> (Home)

This are some of items in tehe groups:
Contact EntraceDoorSensorDoor "Porta Ingresso [%s]" <door> (GF_Entrace,gDoorSensor,gDoorSensorGF) { channel="zwave:device:755c5512:node4:sensor_door" }

Contact KitchenDoorSensorDoor "Porta Cucina [%s]" <door> (GF_LivingDining,gDoorSensor,gDoorSensorGF) { channel="zwave:device:755c5512:node10:sensor_door" }

When the items change his state the following rule don’t start:
rule "Doors Intrusion alarm OPEN"
Item gDoorSensor changed from CLOSED to OPEN

What is happened ?
How can I debug this problem?

Thanks Mirko

Make sure ALL the item in the group are CLOSED first
There maybe one of them NULL or UNDEF

As Vincent said there maybe other states as expected.

Here a little rule to see what the states are:

rule "Show Members of Group"
   Item Dummy4 changed to ON
   gDoorSensor .members.forEach[item|
        logInfo ("Schow Members", "Item Name: {} and Item State: {}",, item.state)

You have to create a Dummy-Switch like this and announce it in the sitemap:

Switch      Dummy4                                "Testschalter Dummy4 [%s]"                                    (gPower)

The result in the logger will look like:

2019-09-30 10:31:09.333 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_00 and Item State: 14.0 °C
2019-09-30 10:31:09.338 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_01 and Item State: 14.88 °C
2019-09-30 10:31:09.342 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_02 and Item State: 14.9 °C
2019-09-30 10:31:09.346 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_03 and Item State: 15.97 °C
2019-09-30 10:31:09.351 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_04 and Item State: 11.66 °C
2019-09-30 10:31:09.355 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_05 and Item State: 10.04 °C
2019-09-30 10:31:09.360 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_06 and Item State: 9.09 °C
2019-09-30 10:31:09.362 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_07 and Item State: 8.81 °C
2019-09-30 10:31:09.366 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_08 and Item State: 9.35 °C
2019-09-30 10:31:09.369 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_09 and Item State: 16.45 °C
2019-09-30 10:31:09.373 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_10 and Item State: 17.79 °C
2019-09-30 10:31:09.376 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_11 and Item State: 17.85 °C
2019-09-30 10:31:09.379 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_12 and Item State: 14.95 °C
2019-09-30 10:31:09.382 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_13 and Item State: 13.43 °C
2019-09-30 10:31:09.386 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_14 and Item State: 13.18 °C
2019-09-30 10:31:09.392 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_15 and Item State: 12.62 °C
2019-09-30 10:31:09.396 [INFO ] [smarthome.model.script.Schow Members] - Item Name: localHourlyForecastTemperature_16 and Item State: 11.92 °C

Maybe this helps to debug

All items in group are CLOSED or OPEN, but I have noticed that some sensor, are in state Node Initializing: REQUEST_NIF.
All this node don’t display the Battery information, but the contact works if I test the single Item.

What does that mean?
Does the item change to OPEN from CLOSED when you actually open the door/window?


If the Group is already OPEN, there will be no change.
If the Group was UNDEF before it changes to OPEN, this trigger will not fire.
(Groups can go to UNDEF if there is some problem calculating group state, like a bad member type)

Look in events.log to follow changes in your Item states.

That’s normal for battery operated zwave sensors that sleep.

This trigger: Item gDoorSensor changed from CLOSED to OPEN will only trigger if the group item changes. Maybe you want a different trigger: Member of gDoorSensor changed from CLOSED to OPEN
This will trigger the rule each time a member of the group changes from CLOSED to OPEN.

Yes, I need that my group is triggered when one of his items change from CLOSED to OPEN.

Is this defined in a different way ?

Just use the other trigger.

rule "Doors Intrusion alarm OPEN"
    Member of gDoorSensor changed from CLOSED to OPEN
    // do something
1 Like

This is my output:
2019-09-30 21:45:45.393 [INFO ] [eclipse.smarthome.model.script.Mirko] - Item Name: EntraceDoorSensorDoor and Item State: CLOSED
2019-09-30 21:45:45.393 [INFO ] [eclipse.smarthome.model.script.Mirko] - Item Name: KitchenDoorSensorDoor and Item State: CLOSED
2019-09-30 21:45:45.393 [INFO ] [eclipse.smarthome.model.script.Mirko] - Item Name: LoungeDoorSensorDoor and Item State: CLOSED
2019-09-30 21:45:45.394 [INFO ] [eclipse.smarthome.model.script.Mirko] - Item Name: BedroomDoorSensorDoor and Item State: CLOSED
2019-09-30 21:45:45.394 [INFO ] [eclipse.smarthome.model.script.Mirko] - Item Name: StairDoorSensorDoor and Item State: CLOSED
2019-09-30 21:45:45.395 [INFO ] [eclipse.smarthome.model.script.Mirko] - Item Name: LaudryDoorSensorDoor and Item State: OPEN
2019-09-30 21:45:45.395 [INFO ] [eclipse.smarthome.model.script.Mirko] - Item Name: LoungeRxDoorSensorDoor and Item State: CLOSED
2019-09-30 21:45:45.395 [INFO ] [eclipse.smarthome.model.script.Mirko] - Item Name: LoungeSxDoorSensorDoor and Item State: CLOSED

Nothing strange …

…so everything’s seems to be ok. Just use your rule as @Udo_Hartmann suggested and if any of your Group-Members will be opened, the rule triggers.