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

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

I will update soon and let you know.

I am running Hubitat Elevation® Platform Version 2.2.9.140 Hardware Version Rev C-7. I am having this issue with predicate based on a global Boolean variable. When I set the variable so that predicate is false, the rule does not recognize it.

Before start-stop

If I stop the rule and then restart it, the rule does pick up the predicate state:

This is not just missing text, the rule does not recognize the correct state.

Here is the log:

app:5242021-10-25 08:18:06.739 infoMaster Bedroom Lights event: Predicate Rule now false
----> Stopped and Started Rule
app:5242021-10-25 08:17:51.998 infoMaster Bedroom Lights event: (location) / (Hubitat Name) variable:gbMasterBedMSOn false
----> Set Boolean to false through dashboard

I don't think the actual rule matters as this is all predicate, and the variable change is just not triggering the predicate, but I'll post more if you want.

The red text is perhaps not being updated, but that's just a UI indicator. Look at the Application State in the App Status page for the rule (cog icon). There is a state variable called 'stPrimed'. See if it is false. That's what the rule uses.

I'll check about the UI issue. Sometimes, the red text will not be updated until there is a page refresh, but there could be an update that is missing somewhere.

The stPrimed confirms no change upon variable change. When variable set false:

When Predicate False

After stopping and starting the rule:

After restart

Please show logs of the rule, when you set the variable. This one works for me.

There was a reported bug about this, which has been fixed, but probably not released. Coming today.

1 Like

Great, I'll update when I see the notification.

This issue if fixed in Release 2.2.9.141.

2 Likes

I was having problems with simple predicate conditions working and displaying correctly;
Updated hub to 2.2.9.142 today, but had to "Update Rule" for every 5.1 rule with a predicate for it to now show the correct condition for each predicate. Fingers crossed they work.

It looks like they are working for me now with 2.2.9.143. Thanks!

Edit: spoke too soon. The red text now reflects the predicate variable change (that fooled me), but the hasPredicate still does not get updated until I stop/start the rule. I'm now on 2.2.9.144.

I'm having a similar issue with the Rule Machine predicate condition. I normally have my outside lights operate on a schedule with RM. These have been working fine with Rule-4.0. With the new predicate feature, I removed the old rule and re-created it as a 5.1 rule with the predicate of it not being October 31. The rule worked fine by not running on the 31st, but it also didn't run today, the 1st of November. Looking at the app listing, it said the predicate was still false, but once I went into the rule, it showed as true. I manually turned on the lights, and hopefully the rule will now run properly, at least until next year.

I will look into it. I'm pretty sure I know why it failed. It would work if you turn it around, and do Between November 1 and October 30. It treats the same day in Between Two Dates as a special case, one that I missed when creating the schedules for the Predicate rule to turn off on the second 'date'.

2 Likes

This will be fixed in the next release.

2 Likes