- Platform information:
- Hardware: Raspberry Pi 4
- OS: CENTOS 9
- Java Runtime Environment: OpenJDK version “21.0.10” 2026-01-20 LTS
- openHAB version: 5.1.3
- Issue of the topic: A text-based rule with the SystemStartlevelTrigger(100) doesn’t load when OH restarts, when the file is modified, or when it is manually triggered with an item change
I have the following rule:
rules.JSRule({
name: "Initialize Items",
description: "Initialize items on system startup",
triggers: [triggers.SystemStartlevelTrigger(100),
triggers.ItemCommandTrigger('Override_InitializeItems','ON')
],
execute: () => {
console.debug("System Actions> Initialize Items> Starting.");
console.debug("System Actions> Initialize Items> Initializing scenes.");
items.LR_Scene_Automated.sendCommand(ON);
items.MBR_Scene_Automated.sendCommand(ON);
items.NBR_Scene_Automated.sendCommand(ON);
items.LR_Scene_Movie.sendCommand(OFF)
...
Somehow, it doesn’t get triggered when the system reaches level 100 (as you can see in the logs below). I have set the level to 80, but it still doesn’t work. The log level of the file where the rule is located is set to DEBUG, but not even the first line gets printed.
I have also tried it without the item command
triggers: [triggers.SystemStartlevelTrigger(100)
],
I can see in the logs that the file gets loaded. I modified it after the system reached level 100, seeing that
14:11:33.962 INFO
org.openhab.core.automation.module.script.rulesupport.loader.AbstractScriptFileWatcher
(Re-)Loading script '/etc/openhab/automation/js/System.js'
info_circle 14:11:34.705 INFO
org.openhab.automation.jsscripting.file.System.js
{}
info_circle 14:11:34.715 INFO
org.openhab.automation.openhab-js.rules
Adding rule: Telegram ask internal handler
info_circle 14:11:34.735 INFO
org.openhab.automation.openhab-js.rules
Adding rule: Telegram commands handler
info_circle 14:11:34.763 INFO
org.openhab.automation.jsscripting.openhab-js.rules
Adding rule: Initialize Items
info_circle 14:11:34.782 INFO
org.openhab.automation.jsscripting.openhab-js.rules
Adding rule: Report Offline Thing
info_circle 14:11:34.792 INFO
org.openhab.core.automation.module.script.rulesupport.loader.AbstractScriptFileWatcher
(Re-)Loading script '/etc/openhab/automation/js/Time_Machine.js'
info_circle 14:11:35.863 INFO
org.openhab.automation.jsscripting.openhab-js.rules
Adding rule: Calculate Time Of Day
info_circle 14:11:35.884 INFO
org.openhab.automation.jsscripting.openhab-js.rules
Adding rule: Recalculate Time Of Day
info_circle 14:11:42.144 INFO
openhab.event.StartlevelEvent
Startlevel '80' reached.
info_circle 14:11:42.149 INFO
openhab.event.StartlevelEvent
Startlevel '100' reached.
(Re-)Loading script '/etc/openhab/automation/js/System.js'
info_circle 14:14:47.437 INFO
org.openhab.automation.jsscripting.file.System.js
{}
info_circle 14:14:47.468 INFO
org.openhab.automation.openhab-js.rules
Adding rule: Telegram ask internal handler
info_circle 14:14:47.498 INFO
org.openhab.automation.openhab-js.rules
Adding rule: Telegram commands handler
info_circle 14:14:47.521 INFO
org.openhab.automation.jsscripting.openhab-js.rules
Adding rule: Initialize Items
info_circle 14:14:47.539 INFO
org.openhab.automation.jsscripting.openhab-js.rules
Adding rule: Report Offline Thing
When I try to trigger it with the item command, I see the command in the logs, but still the rule doesn’t get triggered.
It’s the only rule I have with the SystemStartlevelTrigger trigger.
I found SystemStartlevelTrigger not firing and SystemStartlevelTrigger in javascript, but they didn’t help.
Any suggestions?


