- Platform information:
- Hardware: Raspberry Pi 4 Model B Rev 1.5
- OS: Linux openhabian 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
- Java Runtime Environment: openjdk 17.0.10 2024-01-16
- openHAB version: 4.1.2
During an effort to start over with a new OpenHAB installation I want to make sure all things are running smoothly from the very beginning. So, after installing a few bindings, I started tracking the OpenHAB system Start Level to make sure things (including Things) are initialized properly. A few things come to my attention:
- The order is not monotonic, it seems like 80 comes before 60 and 70, and 100 (fully started) comes before 90. So, it seems like 100 is not the final Start Level.
- Start levels appear in two sets, where the second set has the same order as the first but occurs a few seconds later. Interesting…
- The documentation (Rules | openHAB) is not updated?!
Anyone who can shine som light on this?
See rules and log output below.
Rule to print start levels (note all levels 00, 10, 20, 30 merged into rule for start level 40), startlevel.rules:
rule "Start level 40"
when System reached start level 40
then
logInfo("OpenHAB", "Start level reached 00: OSGi framework has been started.")
logInfo("OpenHAB", "Start level reached 10: OSGi application start level has been reached, i.e. bundles are activated.")
logInfo("OpenHAB", "Start level reached 20: Model entities (items, things, links, persist config) have been loaded, both from db as well as files.")
logInfo("OpenHAB", "Start level reached 30: Item states have been restored from persistence service, where applicable.")
logInfo("OpenHAB", "Start level reached 40: Rules are loaded and parsed, both from db as well as dsl and script files.")
end
rule "Start level 50"
when System reached start level 50
then
logInfo("OpenHAB", "Start level reached 50: Rule engine has executed all SYSTEM STARTED rules and is active.")
end
rule "Start level 60"
when System reached start level 60
then
logInfo("OpenHAB", "Start level reached 60: TBD.")
end
rule "Start level 70"
when System reached start level 70
then
logInfo("OpenHAB", "Start level reached 70: User interface is up and running.")
end
rule "Start level 80"
when System reached start level 80
then
logInfo("OpenHAB", "Start level reached 80: All things have been initialized.")
end
rule "Start level 90"
when System reached start level 90
then
logInfo("OpenHAB", "Start level reached 90: TBD.")
end
rule "Start level 100"
when System reached start level 100
then
logInfo("OpenHAB", "Start level reached 100: Startup is fully complete.")
end
where start level description is copied from Rules | openHAB.
Filtered (“start level”) output of openhab.log and events.log during OpenHAB startup:
2024-04-12 16:21:56.155 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 10: OSGi application start level has been reached, i.e. bundles are activated.
2024-04-12 16:21:56.156 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 20: Model entities (items, things, links, persist config) have been loaded, both from db as well as files.
2024-04-12 16:21:56.158 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 30: Item states have been restored from persistence service, where applicable.
2024-04-12 16:21:56.159 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 40: Rules are loaded and parsed, both from db as well as dsl and script files.
2024-04-12 16:21:56.164 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 50: Rule engine has executed all SYSTEM STARTED rules and is active.
2024-04-12 16:21:56.227 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 80: All things have been initialized.
2024-04-12 16:21:56.228 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 60: TBD.
2024-04-12 16:21:56.230 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 70: User interface is up and running.
2024-04-12 16:21:56.236 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 100: Startup is fully complete.
2024-04-12 16:21:56.243 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 90: TBD.
2024-04-12 16:21:56.152 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 00: OSGi framework has been started.
2024-04-12 16:21:56.155 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 10: OSGi application start level has been reached, i.e. bundles are activated.
2024-04-12 16:21:56.156 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 20: Model entities (items, things, links, persist config) have been loaded, both from db as well as files.
2024-04-12 16:21:56.158 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 30: Item states have been restored from persistence service, where applicable.
2024-04-12 16:21:56.159 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 40: Rules are loaded and parsed, both from db as well as dsl and script files.
2024-04-12 16:21:56.164 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 50: Rule engine has executed all SYSTEM STARTED rules and is active.
2024-04-12 16:21:56.227 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 80: All things have been initialized.
2024-04-12 16:21:56.228 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 60: TBD.
2024-04-12 16:21:56.230 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 70: User interface is up and running.
2024-04-12 16:21:56.236 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 100: Startup is fully complete.
2024-04-12 16:21:56.243 [INFO ] [rg.openhab.core.model.script.OpenHAB] - Start level reached 90: TBD.