I’m having this weird problem where sometimes when I restart openhab it seems that the rules file is loaded before item state is restored from mysql…
This causes all sorts of mischief, such as lights turning on / off, the Roomba starting up, the TV turning off and my stereo turns on and starts streaming WeFunk show and other silly things…
I’m wondering if it is possible to delay the loading of the rules… ?
I might add that I’m not sure this is whats causing the problem, but thats the only thing I can think of.
You could possibly try to change the refresh cycles for loading configuration in
openhab.cfg so that persistence is loaded before rules. Here are my settings, but you would set a longer refresh for rules than persistence and see if it helps?