Item triggers do not work in my system

Hello. Any item triggers seem not working in my system while time triggers do.

For example, the TestItemTrigger rule would never execute while if I replace the item trigger with a time trigger it would.

I already spent all Sunday afternoon to fix it without success. Can anyone tell me how can I debug it? Thanks.


rule "TestItemTrigger"
    Item KitchenLight changed
    logInfo("my.rules", "KitchenLight " +  KitchenLight.state)

Switch KitchenLight    "KitchenLight [%s]"    <light>  { channel="knx:device:bridge:generic:KitchenLight" }

09:12:14.365 [INFO ] [smarthome.event.ItemStateChangedEvent] - KitchenLight changed from ON to OFF
(No LogInfo output)

Do you get an error when saving the rule file? I would add a .toString() to your state in the loginfo. Maybe that causes a problem. I’m not sure if there’s an automatic toString() added to an item state

1 Like

I just found out that item triggers restarted operating as I rebooted my system.
It looks the rules subsystem somehow crashed while I was debugging a .rules file.
I will leave this post open for another day hoping someone can give me a hint on what could halt the rule engine. Thanks.

I must say that I don’t recognize that behaviour, and I have had my fair share of errors in my rules files as well. Did you maybe have an error in your rules-file before this specific rule? That might cause the rest of the rule file not to be processed and thus not in effect.