-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System runlevel 100 rule triggered twice during OH startup #4395
Comments
I tried reproducing it, but nothing shows up in the log. Do you have log level DEBUG enabled? |
Probably I have DEBUG enabled. How do I see what I have enabled? You could use logError instead. logError and setting the log level are mentioned also at https://www.openhab.org/docs/configuration/rules-dsl.html#logging . Unfortunately in
|
I normally use log:set DEBUG you can see the current log level with log:get |
Yes, I have DEBUG log level. |
ok I can see it in the logs when I have ERROR level enabled. So what is the issue exactly? I clicked run and it logged it |
The issue is that once the script is installed and the system starts, this text is logged twice. It should be printed exactly once. |
I did try to start openHAB again but I it doesn't log the message when it does |
Your message is ambigous: it could mean that it logs zero times the message, or that it logs once the message. In any case the problem report is that the message is sometimes printed twice and sometimes once. To be precise it is indeed sometimes not printed, like after a fresh upgrade, where the new addons have not yet been downloaded, but this happens so soldom that I decided not to file a case for it. |
To determine whether the runlevel event occurs twice or whether something else if going on with the rule itself, set the level of Note, if this rule is in a .rules file and for some reason that file gets reloaded after the system finishes starting up it will be called a second time on that second load. Verify that's not happening by looking for a "loaded model..." for that .rules file in openhab.log. |
I have set
|
Above I had set the log level to ERROR. After |
The procedure is as follows:
If once, the problem is caused by your rule triggering twice for some reason. If twice, the problem is the runlevel 100 event occurs twice for some reason. The next steps are radically different depending on the reason the rule is running twice. |
So with
restarting openhab, events.log contains a single |
OK, that narrows down the issue significantly. You might chnage the title of the issue to reflect this new information: "System runlevel 100 rule triggered twice during OH startup" The system isn't reaching runlevel twice. There is only the one event. But something is causing your rule to run twice. And that something isn't that the .rules file is reloaded after the startup (no loading model log message). |
I have this rule
I stop OpenHAB 4.2.2, then start openhab. I expect, that OpenHAB will eventually print "System reached start level 100” once.
But usually it prints it twice with a delay of approximately 30 seconds.
The text was updated successfully, but these errors were encountered: