Delay loading of rules until mysql persistance is done restoring?

Hey,

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… :wink:

I’m wondering if it is possible to delay the loading of the rules… ? :smile:

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?

folder:items=10,items
folder:sitemaps=20,sitemap
folder:rules=30,rules
folder:scripts=35,script
folder:persistence=40,persist
2 Likes