Why have my rules stopped running?

If someone has a solution for the not always working rules, it is still not resolved, as the z-wave reports was only part of the solution…also the astro-binding-triggered rule seems to stop working sometimes…

Some additional info:

I keep my rules in separated files for example:

  • Fensterläden.rules
  • Licht.rules

Does this affect performance?

Just as an update…a reboot resolved everything (hail cc test-devices start working again, and all rules are operational). I don’t know the cause yet, but I will wait untill it happens again. Meanwhile I switch my report-method to multilevel-switch…thanks @chris =)

Okay as a summing up solution for the issue, I have Here the steps to follow when your rules stopped working. Thanks to @rlkoshak @chris @Bruce_Osborne @rossko57

  1. read the guide for rules: Why have my Rules stopped running? Why Thread::sleep is a bad idea (only applies for OpenHab 2.5, and no longer required in 3.0)

  2. make sure that your trigger runs by checking events.log. If you use z-wave, make sure that you have the report group 1 setup to basic or multilevel-switch reports and associated with the controller. Do not use hail cc

  3. If you copy some rules, make sure to keep names different! If you don’t, one rule may exclude the other from running (figured this out yesterday after weeks of searching! So be careful with names when you have many different rules)

If someone has another point to add/modify, feel free to post, and I’m gonna edit this :slight_smile:

1 Like
  1. only applies for OH 2.5 and before. 3.0 does not have a limited thread pool so long running rules blocking other rules from running is no longer a problem.
1 Like

What does this recent PR fix then? Still trying to learn…

you might find more info in this thread Bruce

1 Like

My question Rich is wouldn’t long running rules or rules that never return still be a problem? We seem to have simply removed the first sign/symptom of the problem

That does change things but I can’t tell from my phone or experience to say. There are a lot of “it depends”. How big is the thread pool? Is it fixed sized or does it grow? I can’t get the answers to these from the PR itself as the thread pool comes from somewhere else in core.

Looking at the referenced thread, I think they want to use a shared thread pool rather than have a bunch of threads that are idle most of the time.

That’s what a thread pool does. What I can’t say yet is how big is the pool? The default according to the code it five which puts us right back to only five simultaneous rules that can run at the same time. It doesn’t appear to grow if you need more so it looks like they reintroduced the limited number of simultaneous rules problem.

I would have expected a major change like this to be required to be tested in a snapshot rather than break a milestone, especially this late in the development cycle.