5iver
(Scott Rushworth)
May 25, 2020, 6:41am
25
Your log looks to have rules loading before the Items are ready. I suggest scrapping the clunky old rules DSL and using scripted automation with Jython and the helper libraries , where you will not have this issue. If you want to stay with the rules DSL, then you should setup a way to delay the rules from loading.
Unfortunately, this still seems to be an issue…
…where rules get loaded before everything gets initialized. There is no such configuration as in OH1 to delay the loading. Here is a related topic and the solution I had used:
Since then, I have modified the script (you’ll need to create the prestart directory):
#!/bin/sh
mv `\ls -1 /opt/openhab2/conf/rules/*.rules | grep -v Startup.rules` /opt/openhab2/conf/rules/prestart
echo
echo Launching the openHAB runtime...
DIRNAME=`dirname "$0"`
exe…
I’ve run in some issues with the current startup process. Everything is starting at once which leads to several exceptions, errors and other problems. In my case the most annoying problem is the Homematic-Channel not found-problem .
According to my opinion, a reason is the triggering of rules during startup which leads to timing problems and other race conditions which then lead to further problems after startup.
I often read about moving or renaming the rules and copying back after startup, so…