Predicate condition is true but system think's it's false

For some reason, randomly this rule fails to trigger because of the predicate condition. As you can see in the screenshot, the defined condition is TRUE but in the rule title, it states it is false (red text "predicate condition is false" is cutoff but that's what it says)

If I check the device page for the dimmer it is checking, I can verify that its state is up to date and correct and the predicate condition should be true.

The log also stops at predicate condition is false check.

Any ideas on why rule machine might be confused about if the dimmer is off or on?

No, unless you might have events happening in quick succession (e.g., the dimmer just turned off right before the rule was supposed to trigger but the event hadn't been committed yet, or your triggering sensor is sending "double events" or something).

What I would do: hit "Done" or "Update Rule" here (just to reinitialize everything--these buttons do the same, except the former also closes the rule). Then see if it happens again. Also keep in mind that this page doesn't dynamically update, so you'll need to reload it in your browser to see whether the rule title says that the predicate is true or false, though it's odd that it doesn't match the evaluation in your screenshot (and from what you described, it never ran), so I doubt that this is the problem.

I think @bertabcd1234 probably has the right idea, these devices, I assume, are in close proximity to each other and the turning on or off of the dimmer and the active state of the sensor could be happening almost simultaneously. That predicate might be better as a condition in the rule.

I'll try some of the suggestions. The primary reason for the predicate condition is to avoid retriggering the rule but it is having unintended consequences.

I am somewhat convinced though that's it's some sort of bug or glitch within rule machine given than it reports both true and false at the same time as seen in the screenshot.

Bumping this thread.

Still having this issue. Thought I'd post the rest of the rule in case there's something in there causing the false negative on the predicate condition

It might be helpful to post a screen shot of the logs when the rule is run.

I don't know how it effects it, but you change the predicate condition inside the rule. I am not sure how that would work. As I understand predicates they are only tested at change, or when you save or update the rule. Not sure how it handles the predicate being changed by the rule while it is running. Still think it would be better to just add a If dimmer is on, exit rule right at the beginning.

Also in your if ELSE statements. You have if sensor is open then else. Inside the else you look to see if the sensor is closed. That is not really necessary as it would only be in the else if the sensor is closed since it was not open.

That is a nitpicking thing as it really shouldn't effect anything just thought I would mention it.

2 Likes

That hurts my brain to even look at that rule. Why are you doing this instead of using Motion Lighting? It is hard to do everything ML can do with a RM rule, even a complex one like what you have there.

1 Like

How about posting the entire rule, and the logs (turn on Events, Triggers and Action logging).

1 Like

Lol, does that support different dimmer levels based on time of day?

Also I found that linking the off trigger to door contact sensor just makes it nicer. Turns on when you enter, turns off when you open door to exit.

Yes, if you use modes. Modes themselves can, and usually do, represent periods of the day. Those are set by Mode Manager.

1 Like

I am also having this issue. Semi recently updated to the latest version and created a test rule with predicate conditions. It states false (and has never triggered) on the app screen, but true in the actual rule itself:

image

watched the logs and nothing shows up at all (today at 12:50pm and 12:55pm)

I created a new rule with the same type or predicate condition. However, instead of saying "Predicate False" it now says "Not Installed"

image

The odd thing is that the action was actually triggered successfully:


image

Although the actions to run aren't exactly the same, the concept was still the same. I am going to try add the "No School Switch" to the actions on the new rule that I just created that says not installed and test again.

It does not appear to have triggered at 9:40 AM. I suppose I can't have an OR in the trigger or action list?

Not Installed means that you haven't hit Done in the rule yet. It won't work right until you do that.

Not saying you are wrong, but it worked with it still saying "not installed", but only on its first slated time. (I had updated it to reflect the no school switch action and updated the times).

It currently (as of 11:56am) says not installed, yet the logs indicate that it triggered successfully at 10:15am.

Oh wait... I see what you are saying. If I click into the rule, then back to the apps section, it displays "not installed"

This must be what I had done after the rule had run... as I was just looking at stuff. I have a habit of doing it (maybe because it never really displayed anything when I did it to rule machine rules prior to 5.0).

Carry on :slight_smile:

Today I noticed it says Predicate False for both rules, but the presence of the phone is actually true (as seen in screenshot above).

I went into the device (Robert's Phone) and selected Departed then Arrived.

Watched the logs and it looks like it is throwing a java error for it (I assume it is trying to change the predicate to true):

Still having this issue. We have at least one other person with this behavior

Was this fixed in the new release? I don't see it in the release notes.

As far as I know, yes. Let me know if you have a problem.

1 Like