Item get "ItemStateChangedEvent" but no rule fires this

I have one rule if no one at home it should turn off all lights and lock the door, but it turns off the “fridge” in the office too and I don’t know why.

This is the rule:
//****************************************************************************************
// If no one is at home lock the door and turn off all the light
//****************************************************************************************

rule "Lock door if no one is at home"
when
    Item Smartphones changed from ON to OFF
then
    Hallway_Lock_Nuki.sendCommand(ON)
    gLights.sendCommand(OFF)
end

And this is the Group “gLights”:
image

And the item of the office fridge is:
Office_Power_Fridge_Osram

So you can clearly see that the “gLights” group doesn’t have this item.

But in the logs I see this after the rule fires (see bold entries):
2020-01-27 16:55:28.328 [GroupItemStateChangedEvent] - Smartphones changed from ON to OFF through TinaSmartphone_AtHome
2020-01-27 16:55:28.345 [ome.event.ItemCommandEvent] - Item ‘Hallway_Lock_Nuki’ received command ON
2020-01-27 16:55:28.384 [ome.event.ItemCommandEvent] - Item ‘gLights’ received command OFF
2020-01-27 16:55:28.385 [nt.ItemStatePredictedEvent] - Hallway_Lock_Nuki predicted to become ON
2020-01-27 16:55:28.413 [ome.event.ItemCommandEvent] - Item ‘LivingRoom_Lamp_TV_Left_Hue’ received command OFF
2020-01-27 16:55:28.415 [ome.event.ItemCommandEvent] - Item ‘LivingRoom_Lamp_TV_Right_Hue’ received command OFF
2020-01-27 16:55:28.475 [ome.event.ItemCommandEvent] - Item ‘Bedroom_Light_Right_Hue’ received command OFF
2020-01-27 16:55:28.476 [ome.event.ItemCommandEvent] - Item ‘LivingRoom_Light_TV_Board_Hue’ received command OFF
2020-01-27 16:55:28.476 [ome.event.ItemCommandEvent] - Item ‘Office_Light_Hue’ received command OFF
2020-01-27 16:55:28.477 [ome.event.ItemCommandEvent] - Item ‘Office_Lightstrip_Hue’ received command OFF
2020-01-27 16:55:28.477 [ome.event.ItemCommandEvent] - Item ‘Bathroom_Light_Hue’ received command OFF
2020-01-27 16:55:28.478 [ome.event.ItemCommandEvent] - Item ‘Kitchen_Light_hue’ received command OFF
2020-01-27 16:55:28.478 [ome.event.ItemCommandEvent] - Item ‘LivingRoom_Light_Couch_Hue’ received command OFF
2020-01-27 16:55:28.479 [vent.ItemStateChangedEvent] - Hallway_Lock_Nuki changed from OFF to ON
2020-01-27 16:55:28.479 [vent.ItemStateChangedEvent] - Hallway_LockState_Nuki changed from 3 to 4
2020-01-27 16:55:28.479 [nt.ItemStatePredictedEvent] - LivingRoom_Lamp_TV_Left_Hue predicted to become OFF
2020-01-27 16:55:28.480 [nt.ItemStatePredictedEvent] - LivingRoom_Lamp_TV_Right_Hue predicted to become OFF
2020-01-27 16:55:28.480 [nt.ItemStatePredictedEvent] - Bedroom_Light_Right_Hue predicted to become OFF
2020-01-27 16:55:28.480 [nt.ItemStatePredictedEvent] - LivingRoom_Light_TV_Board_Hue predicted to become OFF
2020-01-27 16:55:28.481 [nt.ItemStatePredictedEvent] - Office_Light_Hue predicted to become OFF
2020-01-27 16:55:28.481 [nt.ItemStatePredictedEvent] - Office_Lightstrip_Hue predicted to become OFF
2020-01-27 16:55:28.481 [nt.ItemStatePredictedEvent] - Bathroom_Light_Hue predicted to become 46,56,0
2020-01-27 16:55:28.482 [nt.ItemStatePredictedEvent] - Kitchen_Light_hue predicted to become OFF
2020-01-27 16:55:28.482 [nt.ItemStatePredictedEvent] - LivingRoom_Light_Couch_Hue predicted to become OFF
2020-01-27 16:55:33.591 [vent.ItemStateChangedEvent] - Kitchen_Power_Fountain_Osram changed from ON to OFF
2020-01-27 16:55:39.614 [vent.ItemStateChangedEvent] - Office_Power_Fridge_Osram changed from ON to OFF
2020-01-27 16:55:41.251 [vent.ItemStateChangedEvent] - Hallway_LockState_Nuki changed from 4 to 1

So can anybody help and give me some tips how I can find why the item “Office_Power_Fridge_Osram” is changed to OFF?

Can you share your item file where this item is defined?
Your item must be a member of a group. Maybe gLights, maybe an other group that is a member of gLights.

If this item is in the same file as the other items (the group posted above) I would move it to a separate items file. Happen to me in the past and this worked (don’t know why).

Or, if the item has ever been in the group, you may want to stop OH clean the cache and reboot.

Here are both groups:
image

I don’t use the local item files. I have set all via the GUI.
The “Office_Fridge_Power_Osram” is in the group gOffice.

I don’t use local item files.
I have all set via the GUI.

What about Hallway_Lock_Nuki item, is it part of the office group?

If you have everything created via GUI and the Office Fridge Power is not in a group that’s associated with Hallway Lock then I would stop OH and clean the cache.

From command line:
sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2

You didn’t mention how OH was installed, the above is for openhabian (apt-get) installs.

This item is in no group.

I have it running on my Synology NAS with the provided package from here:

But I am currently still on version 2.4.0.002!

Did this problem just start or did it started after adding or making a change to your OH setup?

BTW 2.4.0 is over a year old … but if it ain’t broke don’t fix it (reason for above question). :grinning:

2.5.0 was release just for a month or so.
So give me time to update it :wink:

No it is since I wrote the rules I think and I am searching since days why this happen.

So try this: edit the rule and comment out the Hallway lock and see what happens. If same issue then uncomment hallway lock and comment out gLights. Doing this will narrow down if either item is causing the problem.