toggledbits / Reactor

Reactor (for Vera and openLuup) is a Vera Home Automation plugin that provides advanced programmable logic.
17 stars 0 forks source link

Luup Restarts #30

Closed Tarkus-NJ closed 5 years ago

Tarkus-NJ commented 5 years ago

Patrick, Been getting a lot of luup reloads under the new vera beta firmware. It seems to happen when I put my sensors to the test. It seems stable when idle or with sensors disabled. Let me know if you need any data pulled since I am not sure what would be helpful in this case.

John

P..S. If possible please fix typo in subject..

toggledbits commented 5 years ago

I've got the 7.0.29 firmware beta on both my dev and "production" (home) Plus's, and the improvement in system stability is notable, especially on the production system. I would see if you can narrow down to one sensor, and look carefully for logic loops between sensors.

Tarkus-NJ commented 5 years ago

Is there an easy way to detect logic loops?

toggledbits commented 5 years ago

Is there an easy way to detect logic loops?

The best way at this point is to get a comprehensive overview of your configuration and review it--use the "Summary" link on the Reactor master device's control panel. That will generate a logic summary for ALL ReactorSensors, so you can track how they interact.

But I would start with just disabling all RSs, then enabling them in small numbers (maybe even singularly) in a methodical fashion with some time between, and observe your system behavior. If it starts misbehaving, then go back and see what you can turn off to restore good behavior.

EDIT: By the way, I doubt it's a loop. Could be, but I doubt it. A loop would most likely cause rapid ping-ponging that would trip the rate limiting on one of the sensors. More likely, there's an action or set of actions that's running long or causing a deadlock. If it's the latter, that's for Vera to fix. If it's the former, you'd need to restructure your activities. But I think you should first focus on seeing if a single sensor being enabled causes instability. That narrows the problem considerably.

Tarkus-NJ commented 5 years ago

Some of my sensors conditions are based on multiswitch switch "on" states. In some cases reactors activities set the switch back to off (intended). It is possible that the time between on and off states to be only seconds or even less. Could the rapid toggling of switches be an issue? I remember reading something that you posted about throttling back processes to keep things in check.

toggledbits commented 5 years ago

Anything that causes rapid state changes on a ReactorSensor will trip the rate limiting. The default update rate max (the number of times a ReactorSensor will reevaluate per minute) is 30/min, state change rate (the number of times it will toggled between tripped and untripped) is 5/min. These are quite low in computing timescale, so it's unlikely that a rapid toggling or loop would get by these low defaults. But I suppose anything is possible under exactly the right conditions. That would not explain your original problem report, however, as rate-limiting would immediately cause the sensor to go to trouble state and stop updating, leaving the system in a quiescent state for a period. It would not cause a reload.

The most likely causes of a reload, again, are a set of activities that takes too long to execute (but it would have to be like 60 second or more), or an action that is somehow causing a deadlock (Vera's Z-wave lock handling and scene controller handling are, for example, two areas where historically I can make them deadlock just by looking at them crosswise).

Tarkus-NJ commented 5 years ago

The default update rate is more than sufficient for my needs. In testing I tend to cycle through the conditions quickly but in everyday use it would not be that way. I will try to narrow it down, Some of the sensors do rely on group states from another sensor so in some case will need to leave 2 active.

toggledbits commented 5 years ago

Any update on this?

Tarkus-NJ commented 5 years ago

Hey Patrick,

I had some time to play around with this today. I rebuilt one of my sensors I had suspected my be causing problems using some different logic and it seems stable so far. In the process have come across a separate issue in not being able to delete conditions. I will follow up in a separate issue post.