RM actions not running unless I hit Run Action [Solved]

Im figuring out how to use my ZEN17 with an simple RM ver5.1. The contact sensor logs fine and so does the relay when states change. I hooked up a switch to the contact sensor input for testing the rule. But I can only get the actions to run if I hit "Run Actions". Something wrong with my trigger?
Im using an IF statement in the actions because I plan to add a bunch more IF AND's later.

When you created the Rule, was the temperature already at 73.6F?

Recall that rule triggers depend on events; so if the temp was already 73.6F when the rule was created, it will trigger only if the temperature changes to another temperature that is > 35F.

I would do this rule differently, as detailed below:

  1. I would use a required expression of "Temperature of SJ LivingRoom > 35.0".
  2. I would make the trigger "Zen17-Relay Sensor 1 contact open"
  3. And the actions would be something like this:

On: Zooz Zen 17 Relay 1
Wait for Event "Zen17-Relay Sensor1 contact closes"
Off: Zooz 17 Relay 1

Yeah that works, thanks. Basic test completed!

Now I need to figure how to make it work in real world with all the other inputs.

if (temp >35 && time > 10:00 && time < 15:00 && contact == open && voltage > 26)
{Relay = true;}
else {Relay = false;}

If it could just loop that with out a trigger

Triggers create event subscriptions. Any time the trigger event happens (unless a required expression is used and is false at that moment), the actions will run. You don't need to "loop" (based on what...time?), and you want to avoid triggers; rather, you want to use them to make the actions run when you want (this is almost always a better idea than time-based repeats).

If what you wrote is exactly what you want to happen, you could trigger on: temperature changes, time is 10:00, time is 15:00, contact changes, and voltage changes (the UI will display "OR" between these triggers to indicate that any of these events will cause your actions to run--that's how triggers work). Then create a conditional action -- an IF (expression) THEN -- that is almost exactly like what you said, except for the second and third things you can use the special "Between two times" capability to create the condition.

Similar structure to what you have above, just a different expression on that IF, and be sure to finish with an END-IF to complete this "block" of actions (though RM will infer it fine if it's the very last thing like it is for you...still a good habit).

2 Likes

Excellent, it works and I understand RM better! Note im using any sensor I got around the house to simulate it. This will be going up to the cabin to control submersible pump later, Will test all inputs more thoroughly later. Thanks!!

You could update all of your triggers to changes, instead < and > and open close. Then have 3 as opposed to 6 triggers. Since that is basically what you are doing now.

By updating to changes you would also trigger at the voltage of 12 and temp of 35.
Your current rule won't trigger at those values. Probably not an issue, but I thought I would mention it.

3 Likes

Yeah, I suggested "changes" for that reason too. Given the pseudo-code, I assumed it was important. Right now, nothing will happen when the temperature goes below 35 on that first device, for example (at least not until another event that does trigger happens, if one does).

EDIT: Sorry, nevermind, I didn't look closely enough at what devices were used in the triggers--it's very nearly already like "changed," but I'd still do it with "changed" (note what would happen if the temperature is 35, for example).

1 Like

Going below 35 will turn off the relay. Anytime it triggers if conditions are not met it turns off relay.

Testing now..