openhab-core
openhab-core copied to clipboard
Prevent executing (almost) all rules until start level 50 is reached
I am currently seeing several rules being triggered during openHAB startup which are then referencing items which are either missing or unitialized at that point. In order to fix that I propose to prevent all rules (except for system started rules) from executing until startlevel 50 is reached. With this fix we would make sure that system started rules are executed first and all items are there and have been initialized.
If this works properly and fixes these issues other "limits" could be added aswell, for example the REST-API can be queried too early, blocking requests until we reached start level 50 should prevent that aswell.