De-activated or "forgotten" rules

Thank you for your reply. I’m simply observing the coincidence that after these log messages appear, the WOL rule does not trigger anymore until it is touched/deployed again. I was not sure if some exception could have had such an impact.

That “incorrect state” which you want to avoid by switching off autoupdate is something I do not fully understand. This state would be under control of the binding, wouldn’t it? So the “worst” thing which could happen is that the binding “guesses” wrong if it does not have contact to the thing.

The next version will also set the channel to OFF when this happens - As we are not yet seeing the device online that is a fair assumption.
But I don’t think that is the issue. It must have to do with the items state. Restarting OH and touching the rule should reset the state to undef. So from undef -> ON it works.
Could you again please explain steps to reproduce the issue?

Mostly and reproducibly

systemctl restart openhab2.service

Initially, I had the impression that waiting 24h would trigger some problem as well, but it might be related to some restart I have forgotten; the system is quite new and I configure every day.

The bindings always continue to work. E.g. my direct button for WOL always switches on the TV. And when it goes on, the lgwebos binding always detects this. But the rule is dysfunctional until I redeploy it. After which everything is OK again.

I have many other rules for lighting etc. All these don’t have any issues after a restart.

Do you want to be the first to test the latest release candidate?
Release RC3

See if this is still the same behavior.

What item state does LG_TV0_Power have when Item LG_TV0_Power received command ON does not trigger? I assume the TV is off then.

I am currently doing more debugging. I see some strange effects which contradict my (poor) understanding of the rules system. But part of what I observe contradicts earlier observations I dumped to this thread.

E.g.

  1. I switch UI button to ON.
  2. a rule with “received command” is triggered, but
  3. a rule with “received command ON” is not triggered.

The autoupdate=true has some effect as well. It immediately switches my UI widget OFF again.

I assume after a restart the LG_TV0_Power is Undef (no persistence for that item; could add it).
I assume later on the state would rather be “OFF”.
But to get it working again I just have to touch the rule and not update the state from Undef to OFF.

Sadly for today my concentration is gone. I’ll need to continue testing tomorrow (technically it is already tomorrow).

I am fine with testing your release candidate even if it is unrelated to this problem. But I do not plan to upgrade to openhab 2.2.x very soon; the last time I tried, I totally destroyed my configuration and had to restart from scratch. Have to prepare better backup mechanisms for the next time.

OK, I think I have it. The following rule works normally and after a restart:

rule "Power on TV via Wake on LAN (command)"
when 
Item LG_TV0_Power received command
then
    if (LG_TV0_Power.state != ON)
    {
		sendCommand( Network_WOL_LGTV, ON) 
	}
end

The initial rule with received command ON did never trigger when the initial state of LG_TV0_Power was null.
I still do not understand why, but the problem is solved for me.

So the rule was maybe wrong, but I still cannot fully understand why a simple redeploy/touch always cured the problem.

Update: I think I should mention it: This rule works in combination with the autoupdate="false".

I don’t understand it either. It should have worked. But I’m glad it is working now.