WARNING: Users who have this template already installed for versions of OH 5.1 and before, after removing the old template and installing this new one, open your rule(s), click on the code tab, and change the ruleTemplate property to ohrt-delayStart before regenerating the rule.
System startup can be noisy and chaotic.
This is a rule that triggers at system startlevel 40 (Rule Engine Started) and again at a runlevel 100. When it triggers at startlevel 40, it disables a user selected set of rules immediately. When it triggers at startlevel 100 it will wait a user selected amount of time and then reenable the selected rules.
This rule tempalte requires the openhab_rules_tools library to be installed. See openHAB Rules Tools Announcements for details. You can install it from openhabian-config and there is a rule template which may work for you to install it. See the announcements for all the ways to install this library.
Language: JS Scripting ECMAScript 2021
Dependencies:
- openhab-js 5.18.2+
- openhab_rules_tools 2.1.0+
Changelog
Version 1.0
- migrated to YAML file format for OH 5.2
- use wrapper
- standardize logger names
- use the JavaScript
eventObject - instead of setting a falg in the cache to tell the difference between the startlevel triggers, pull the startlevel from the
event.payload
Version 0.2
- rules can come and go, catch the exception if a rule no longer exists rather than blowing up.
Version 0.1
- initial release
Sponsorship
If you want to send a tip my way or sponsor my work you can through Sponsor @rkoshak on GitHub or PayPal. It won’t change what I contribute to OH but it might keep me in coffee or let me buy hardware to test out new things.
