Required Expression false in Red

This sounds like maybe a known issue, but I wanted to ask the group if they felt how I've put this together works. I'm moving my things one by one over to a newer hub and am converting my rule machine apps over to the new 5.x. It's been a learning curve for me as most of my work has been on 2.5 and 3.0.

What this action is to do is increase the Lamp Post when there is motion on the front porch. Of course I only want this to occur when the lamp post is turned on which is basically between sunset and sunrise. This what what I came up with. Should I be concerned about the "Required Expression false" at the top. It actually seems to work as of last night.

At what time (in relation to sunset/sunrise) was that screen cap taken? If not during the Required Expression time interval, that message is normal.

1 Like

Okay, that makes sense then. It was just taken so outside of that range. When I see red I think I've made an error in the logic.

Chalk this one up to ignorance and learning.

Thanks for the response.

Brad

1 Like

@bsb.stuff a comment on your rule. You made Dim: Lamp Post 40 cancelable but there isn't an action to actually cancel it. I would suggest that you add Cancel Delayed Actions as your first action or first IF-THEN action. There's also an option to use Wait for event instead of Cancel. I can help if you want or there are plenty of examples already posted that you should be able to find.

I think there is actually a known issue with this, that I believe they have stated will be fixed in the next release. Sometimes it will show a rule with a required expression false, but if you click the rule then hit the back button in your browser, you don't have to actually save the rule, it will get cleared if it really should not be false. The rule is working it's just a UI thing.

Okay, if I recall this part was added to the previous rile (V3.5 I think) so that if the state changed from no motion to motion again during the 5 minute delay it would re-trigger and keep the higher intensity (99) and start that 5 minute delay all over again.

In 3.5 I think it was the following: (condition being time span and motion)
Action for true
Dim Lamp Post 99
Action for False
Dim Lamp Post 35 after 5 minute delay with cancel on truth change

So how is what I currently have different? And I am always open for help, that how I was able to create the old rules that have run forever.

Thanks,

Brad

This is true for a wait command not a delay. If you have a delay you have to have a Cancel delay to stop it. At least that is my understanding.

@bsb.stuff I don't remember how v3.5 worked with regards to re-triggers but v5.1 requires that cancelable action have a discrete action to cancel them. Re-triggering the rule without a Cancel Delayed Actions will schedule multiple off actions.

Looks like I need to do some testing tonight to see what's going on. The motion sensor latches for 1 minute, so I can lower my delay to 2 minutes to help in testing.

Just FYI, the idea is that when I take the dogs out it triggers porch motion and raises the intensity. But sometimes we're out in the yard and the motion sensor resets. So rather than lower intensity only on the motion stare change I want it to stay on for a while longer and then if the porch motion is active again (when one of us goes back on the porch) cancel the change in intensity.

It seemed to work on the C-5 hub with RM 3.5, but maybe I didn't test it as well as I thought.

Thanks again for your (and everyone's) input.

Brad

Or you could clone the rule and change out the devices for virtual devices and experiment with the rule to understand how the rule reacts with and without a Cancel Delayed Actions.

That would be too much fun. Never tried that before. Sounds like another learning opportunity.

Thank you!!

So, I did the clone activity and you were correct, the cancellign was doing nothing. So I modified the script and tried again. It's still not bouncing out of the set dimmer 40 action.

What do you think?

@bsf.stuff You don't have the Cancel Delayed Actions.

Select Actions to Run

Cancel Delayed Actions
IF (vPorchMotion active) THEN
    Dim: vLamp Post: 100
Else
    Dim: vLamp Post: 40 --> delayed 0:01:00 (cancelable)
END-IF

Ding, ding, ding, ding .....

How about this? By the way, it worked.

Yes, that's it.