Should the system trigger the System started event after editing the rules file?
I’m experiencing System started event too early, my items is not initialized yet.
All rules and items in files.
OH 3.2.0.M1 xubuntu x86
Hi rossko57,
Have you heard any news on this?
Started my migration from OH 2.4 to OH 3.2m4 but I can’t get my rules to start because of this. They get parsed for errors but never executes the Startup Event.
I even tried tweaking this below in the services.cfg to draw out but this didn’t help either.
startlevel:20=dsl:items,managed:item,dsl:things,managed:thing,managed:itemchannellink,dsl:persist
startlevel:30=persistence:restore
startlevel:40=things:handler
startlevel:50=dsl:sitemap
startlevel:60=dsl:rules
startlevel:70=managed:rule
startlevel:80=rules:refresh
startlevel:90=rules:dslprovider
startlevel:99=ruleengine:start
Best, Jay
Under what conditions? This thread was about failure to trigger files-based System started
rules when editing the xxx.rules
file (something that happened in OH2). Nothing to do with system actually restarting, nothing to do with GUI entered rules.
Correct, I have a large .rule file (28k lines long) and it never runs the ‘System Started’ rule. I let it sit for over an hour waiting for ‘System Started’, this was based on just starting the system up from scratch. Have OH 3.2m4 on a clean RaspberryPi4 dedicated to OH.
In OH 2.4, it takes 20 minutes to completely start the system up. This version sits on a Synology doing a bunch of other stuff also.
Best, Jay
You know you can put a test rule on its own in a separate file.
I did that and it worked fine; that’s how I found out that this variable doesn’t work anymore → ruleFilename
Best, Jay
Excellent.
So, the problem is looking like the digestion time for a huge xxx.rules
file? I wonder what happens if digestion completes after the ‘started’ event?
I have identified the issue, it’s the Java memory setting. I had this setting on my OH 2.4 installation and I assumed it was resolved for larger OH installations (2k items & 28k lines of rules) with OH 3.x.
vi /etc/default/openhab
Swap this line out with this one → EXTRA_JAVA_OPTS=-Xmx1024m
Best, Jay
Here’s the time frame for it to complete (30 min), first time in in a week for this to happen
2021-11-12 19:03:53.667 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.rules'
2021-11-12 19:32:53.368 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.
Best, Jay