Timed Action Stops Firing

I have a very simple app that locks a lock that remains unlocked for 15 minutes. It was installed last year and has worked reliably up until now.

When I realized it stopped working I added the required expression and enabled cancel pending actions with the hope that that would cancel any previous invocation that may have hung up.

I am wonder if anyone else has suffered the same problem and how it was resolved?

Have you tried turning on all logging on the rule to see what happens?

What platform version are you on?

Using a C-8 running 2.4.1.151
I turned tracing on only after the Required Expression was added.

This is the log of the app. At 5:33:21 the lock is unlocked and the 15 minute timer is started. The action that locks the lock does not fire at 5:48 as it should.
I wound up locking it later at 5:52 using a dashboard.

I don't really use Rule Machine, but why do you need the required expression? Can't you just have a trigger for when lock reports unlocked and then stays that way for 15 min? The required expression is really for checking other device states or conditions, not the trigger device itself. My guess is that the lock is locked before it is unlocked, so that is already false at the time the trigger runs.

Again, I use Webcore, so I may be missing something, but that is what it looks like to me.

You can open the gear icon on the rule page and see if it is scheduling the job or not at the bottom of the page, you don't have to just wait to see what happens.

Can you share a screenshot of your event subscriptions (that could give a hint to those that know what it’s supposed to be what the problem is…) You get this from one of the tables once you click on the (i) icon on the top right of the screen.

In this case, the required expression should not be required, so can be removed.

Some changes in Rule Machine were made with 2.4.1.151. After you posted the event subscriptions screenshot, try clicking the « update rule » button. That could fix it.

Event subscriptions

As for the addition of the regular expression, the options that are included with it (cancel pending actions and evaluate expresssion on startup) seemed useful. The former suggests (may have this wrong) that it could stop race conditions that may happen if the rule is invoked a second time before the action could complete. Double invocation of actions could lead to a timing problem that could result in a hang.

I will remove the expression.

@user2574, I could not locate the gear. Where else might I find it?

1 Like

Good thinking but not in this case as you have only one trigger and the stays timer will be cancelled as soon as an unlocked event happens and the actions will not run.

In any case the logic of your required expression is reversed: the trigger event can only happen when the lock is locked, so the required expression as set up will prevent any triggers.

You did not show a log confirming the start of the timer in your screenshot above. Did you turn on all three rule logging options, including "triggers" ? It would look something like this:

The circled i icon used to be a gear icon.

1 Like

All three selected
image

Right. Remove the required expression, press 'Update Rule' or 'Done' and show the logs of the rule running thereafter.

1 Like

It started working again.

1 Like