I used in OH1 a mechanism to delay the rule execution during startup, as during the items loading phase some rules triggered unwanted .
Is this behaviour still existent in OH2? I want to get rid of this workaround. What is the recommendation for this workaround, if necessary?
As during startup the items change from NULL to state (ON/OFF) I could trigger
Item sq_wohnen_power changed from OFF to ON
or
Item sq_wohnen_power changed from OFF to ON or
Item sq_wohnen_power changed from ON to OFF
which replaces the single line trigger
Item sq_wohnen_power changed
Than the NULL event is filtered, which hopefully only applies at startup. Would this be the right solution? Or are my thoughts not correct?
It might be a better trigger to catch a command. I think at startup this are just updates and no commands. So this could be a valid solution:
Item sq_wohnen_power received command
Can you confirm this?
And a further question:
Does a change from NULL to ON trigger this
Item KinoDunkel received update ON
and how can I suppress this event during startup?
I can not say so difinitively, but I believe in OH 2 persistence and restoreOnStartup completes better any rules run. Consequently no events occur during restoreOnStartup to trigger the rules. At least that is the behavior I’m seeing. I restoreOnStartup everything and have received update, received command and changed triggered rules and none get triggered during startup.