-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Startup order rules vs io - sendBroadcastNotification not loading until after system start rules fire #1991
Comments
Let me add some more info on this based on watching logs through restarts. "system started" rules trigger before the rules engine starts. This seems to cause a problem because the system isn't fully up at that point. All 4 below are "system started" triggers. 2020-12-23 12:57:54.450 [DEBUG] [e.automation.internal.RuleEngineImpl] - The rule 'startup-3' is executed. |
@morph166955 With #2222 in place may I ask you to test if this issue is still present? |
Sure, I haven't been following that one, anything specific I need to do to my scripts? Also to confirm, it looks like S2267 includes this as well as #2241 so I'll be loading that. |
Running S2267 stock with no changes to my rules. It looks like trigger 2 for startup-3 is actually a cron job that runs once a minute. It also looks like the three samsung rules that are executed are item triggers caused by the startup-3 rule running. Why any are running before the rule engine started, not sure. Also same issue that sendBroadcastNotification is still not loaded at that point. EDIT: trigger 2 is not a cron job. Sorry, I forgot that it counts at 0. trigger 2 is an item changing (which I'm actually not sure what is causing that item to change either, the only rule that actually changes that item is startup-3).
|
Something I just realised: the changes in #2222 pertain to the |
Thanks for testing. The differences to my case are that I am using JSR223 Python rules and the error message (see #1983 (comment)) occurred while parsing the rule. You are trying to use the |
No problem. Is it possible to load IO before the rules engne fires System started? |
I believe this is an issue with the new startup order and not the binding itself, hence putting it here versus addons.
When OH3 loads org.openhab.io.* seems to be very far down in the startup process (almost at the bottom on mine). It looks like my rules load before org.openhab.io.openhabcloud has a chance to completely load. This causes errors like:
2020-12-22 16:48:16.611 [ERROR] [module.script.internal.handler.ScriptActionHandler] - Script execution of rule with UID 'startup-3' failed: The name 'sendBroadcastNotification' cannot be resolved to an item or type; line 180, column 4, length 71 in startup
It also has a by-product that my startup rule notifications are not sent and the startup rules end up crashing (which is also confusing because they are in a "try {} finally {}" but that's another story).
The text was updated successfully, but these errors were encountered: