Rule Machine - Get peer assistance here with setting up rules

I’m attempting to setup a custom command in rule machine for my ecobee3 sleep routine and am seeing this:

This is how I got it to work:

Thank you for your help!

Hey all,

My question is regarding RM integration into the alarm section of ST. Now that I have a few rules/triggers, I get the text notifications when I expect to, no issues, however I no longer see the Intrusion Detected on the ST Dashboard like I do when I setup the rules in ST directly.

I have tried setting the Mode and Alarm System Status and when an event triggers, all I get is the text

So my questions are as follows:
Does the dashboard basically become useless with RM?
What is the purpose of setting both Mode and Alarm System Status in RM when setting Mode does the job of notification?
Maybe I don’t fully understand the difference between Mode and Alarm System Status other than Routines can set both while Alarm System Status won’t set the mode

What am I missing?
Thanks in advance

1 Like

Did you get this set up?

I am using Virtual Switch approach today. I was curious why you thought the PB might be preferable? I am not sure what I am missing.

I prefer the PB method over the VS in sins cases, but not all.

I will use PB when making complex groups of rules. It acts as a switch. When one rule goes true/false it can either change its own PB or that of others. It essentially turns rules on and off.

Using PB also eliminates an unnecessary step in the system and one device. Rule one sends a signal directly to rule two. With a virtual switch, rule one sends a signal to the VS, which then sends it to rule two (for example only). More steps equals more failure potential.

I will use a VS when I want to have manual control over a rule, our it is a rule that is turned on/off at random intervals with no set schedule.

I also use them as back up control devices. Such as with my rules to change the system mode. If a mouse chance does not occur properly, on time or fails completely, I can use the VS to manually change the mode when I want. It’s also good for testing and making changes.

The VS also gives me a visual aide to know the exact status of a rule.

So, it is really personal preference and case use.

If anyone is interested, I left this rule installed and it has been working perfectly. The lights come on right at the to of the hour.

dalec and bamarayne,

I’m rethinking this and it looks like the Virtual Switch may be the most convenient approach for the way I am using RM.

Here is an example:
I have a garage door rule.
If the door/window switch reports that the door has been open for 20 minutes, the garage door relay trips to close the door.
This is for those times when we drive off, or come into the house and forget to close it.

On those occasions in which my wife or I may want the door to stay open longer, I have a VS in my “Things” list that I can use to temporarily stop the rule from running.

When I want to do this, I pull out my phone, open ST app, click on the VS, done. Do it again when I want to re-activate the rule.

Is there another approach, using PB or anything else, that is more convenient?

For situations like this I also use a VS.

I’m hitting a mental wall here. I have a Conditional Trigger that turns on a light in my kitchen so I’m not in the dark as I enter. The trigger is my presence and its conditions are between sunset and sunrise the is light currently off. After 10 minute delay, it turns the light back off. The flaw in this approach is that at certain hours, the light may be on but only as a dim night-light and therefore not bright enough for ‘entering the home’ activities.

So, I’m now looking at changing (rewriting) the rule to remove the requirement that the light be off and replace it with capturing the current state, setting it to 100% and after 10 minutes returning the light to its former state (off or on and dimness). I have not used capture/restore before and keep getting hung up on the restore part. I don’t necessarily need an example (although that’d be great too), but just some logical flow/ discussion, etc would be great.



To use capture and restore, you going to want to put the capture in Actions for true, and the restore in Actions for false.

Your rule could be like this:

Conditions: presence present, motion, time between sunset and sunrise
Rule: presence present AND motion AND time between sunset and sunrise
Actions for true: capture light, light to 100%
Actions for false: delay these actions for 10 minutes, restore

You could make the delay in Actions for false cancellable if you want the light to stay on as long as there is motion, and then restore x minutes after motion stops. Without the cancel, it would restore in 10 minutes no matter what.

Thank you for your response. Your description helps me understand. But…

In your example, you are using a motion sensor. I am not. Just my arrival. With a motion sensor I can easily see how I’d get to using False Actions - and I’d have a place to put the recovery of the light and its original settings. I think that’s where I’m getting hung up. My arrival is a trigger only and without a rule state change mechanism (motion in your description), the state doesn’t change as far as I can tell. I was trying to just use a 10-minute delay but (if I’m right) I cant use recover unless it’s in the FALSE actions (after using capture in the TRUE actions).


Conditions: presence present, time between sunset and sunrise, private Boolean true
Rule: presence present AND time between sunset and sunrise AND private Boolean true
Actions for true: capture light, light to 100%, set private Boolean to false delay 10 minutes
Actions for false: restore, set private Boolean true

You could change the circumstances from this regarding when or why you reset the private Boolean to true, which might make the rule true again.

What I don’t understand about your use case it this: Since you are present when home, what really is it that you want to cause the light to come on? Is this only supposed to happen once after you arrive? I’m missing something from your description for this to make much sense.

Thank you again. I’ll have to also look at the private Booleans as a way to change truth states.

My use case: This kitchen light (and some outside one’s too) come on due to my iPhone’s arrival (i.e., I’m home!) I turn on/brighten them for getting mail and checking for UPS deliveries at the front door (outside) and once I get inside, so I can see what I’m doing in the kitchen. I will possibly have my hands full of mail, packages, coats and boots. Also, the kitchen door from the garage is armed. and I need to disarm my now triggered (separate) FrontPoint Security System. Without RM/ST triggering my lights as described above, they wouldn’t always be bright enough - or even on. So, this rule turning on/brightening the lights speeds up the arrival and disarming process and makes it safer for my wife and I. Is that clearer?

Yep, so what you really want is an arrival process that happens once when you arrive home, but not again after that, correct?

This conditional trigger should work:

Trigger Event: presence arrives
Condition: private Boolean true
Actions for true: set private Boolean false, capture lights, lights to 100%, evaluate this rule delay 10 minutes
Actions for false: restore

You’d also need a separate trigger to reset this when you leave:

Trigger Event: presence leaves
Action: set first trigger’s private Boolean to true

Having worked that out, this would be a heck of a lot easier if RM could delay restore. Then it would be a simple trigger like this:

Trigger event: presence arrives
Actions: capture lights, lights to 100%, delay restore

I’m going to look at adding that delay option for restore!


Exactly! It’s a run once and done.

Having the ability to delay a restore would be excellent! Thank you for considering it.

Thanks for the detailed explanation. I am just getting started on Rules Machine and the PB feature I am still trying to wrap my arms around.

1 Like

I like a Virtual Switch here as well. @btcompute I like what you did with the garage door autoclose! I am going to be duplicating that function but with a physical hardware override button in the garage instead of the virtual switch. The cheapest button interface I could find to do this was this key fob and programming one of the buttons to be the garage door autoclose override using the @kevintierney device handler and Rule Machine.

1 Like



I have been considering just mounting a simple switch in the garage, probably a small toggle switch that will be wired in line with one of the output wires from the relay.
If my wife or I am in the garage and want to keep the door open for a while, flipping this switch will deactivate the relay until the switch is flipped again.
This might be more convenient for my wife, making the automation more acceptable to her.

Anyone out there to help?

I know these seem basic but they are important to me :slightly_smiling: if I am going to figure this out