Did custom command go away in RM4?

Was attempting to convert this simple rule to RM4 to get my feet wet:

image

But I've been unable to find the "Run custom commands" option. What am I missing?

Its replaced by Custom Action.

1 Like

Instead of pre-defining "custom commands", as was done before, you just put the custom action to run right into the actions for a rule.

1 Like

Thanks. Can you also have an if statement that sets a switch that would trigger the same RM action to run again?

For instance, if I turn Disable Alarm when Away ON, it turns Disable Indoor Motion Alerts ON which would then trigger the same RM rule to run again, but call a different function. My concern is that RM rules calling the same rule again would result in some infinite loop.

Thanks, trying to get a hold of RM4 - the GUI and display is MUCH better than the experience was in early RM4 (at least as I recall when I tried it).

Well, I suppose. But you run the risk of an infinite loop if you don't do it right. It's also possible to create a bad situation with simultaneous instances of a rule. Embedded delays can cause this with multiple triggers. So you have to be careful.

Cardinal rule for good automations: KISS

1 Like

Now I'm trying to consolidate my if X person leaves and nobody at home, do X and notify them that actions are taking place.

If I have the trigger being either presence of A or B changes, is there a way to know which person changed? If A left long ago and someone was left at home, nothing happened. If B just left, I want to do X and notify person B.

If I have a conditional that says:
if (A not present and B not present), turn on alarm, but how do I know which one just left so I can only notify the one that just left.

I have Arrive working fine, but don't see a way to do it in 1 rule for Leaving if I only want to notify the last person who left. Perhaps the answer is "you need two rules" :slight_smile:

Thanks!

THREE layers here. :smiley:

First, I have an individual virtual presence for each person, and then separate rules triggered on the presence of each of their mobile apps changing; those rules set their virtual presence to "present" or "not present", depending.

Second, there's a separate rule for each person that triggers on the change of their virtual presence, tells them "Goodbye!" or "Welcome home!", and sets a global boolean variable "LEFT" or "ARRIVED", depending.

Finally, two other rules trigger on changes in "LEFT and "ARRIVED" to do everything else (like turning on outside lights at the arrival point, and turning off inside lights that were on to make it look like somebody was home) using a final global boolean "AWAY".

Sounds too complicated, and probably is, but it's working well for us.

1 Like