Rule Machine - Get peer assistance here with setting up rules

[quote=“bamarayne, post:707, topic:29577, full:true”]
…if you piss the switch…[/quote]

Is that like when one rule fires incorrectly and #(^%$ up another rule?

only kidding, of course. I’m just grasping at the wind; trying to find humor in all of this in order to keep from spiraling down into the same darkness that my HA system is in these days lol :slight_smile:

You have to be super nice to the system… Or it gets pissed and starting doing all kinds of stupid stuff!

[quote=“bamarayne, post:709, topic:29577, full:true”]
You have to be super nice to the system… Or it gets pissed and starting doing all kinds of stupid stuff![/quote]

I am ALWAYS super-nice to my HA system, but because of the current SmartThings melt-down, it’s still doing all kinds of stupid stuff…

If the select actions for true does not evaluate to true, does it skip the “Select Actions for False”?

So if the select true action is, if there is motion AND something else, to turn on a light, if it skips turning on the light, will it skip turning off the light?

So in this case, that is what I would want. If it did not turn on the light, do not turn off the light.

There must be a rule truth change. All conditions must be met for it to evaluate. So, if only one condition is met, tv on, then the rule does nothing.

But if the tv is on and the motion sensor goes active, it will turn on the light, even if the light is already on.

And then, when either the tv out motion stops, the rule will change from true to false and it will evaluate. It will find a false value and turn off the light.

Also, in your rule you have pending off: 0 minutes.

I recommend that you change it from pending to just turn off.

Thanks, not sure what pending means.

Pending means this…

Motion active —> light turns on
Motion inactive —> lighting goes off after X minutes pending cancellation.

It sets a timer for when to turn of the light. If the motion sensor goes active again (rule becomes true) then the timer is cancelled and the light stays on.

The light will stay on as long as the motion sensor sees motion. It will go off after there has been no motion detected for longer than the timer on the light.

1 Like

So I need help with this rule/trigger. I have a contact sensor on my Storm door and another on the front door (same entry point to the house). Because my original door bell is not reliable and I do not have a bell upstairs or in the basement (I will invest in a doorbell later), I am thinking the following rule to notify me with a sms or push that someone is here.

If the front door is closed but the Storm door is opened, notify me that someone is here (or a package has arrived).

If the front door is open and then the storm door is opened next, do nothing (signifying that I am answer the door because the person rang the bell or knocked and I heard it, but they did not open the storm door)

I am thinking that having a presence sensor for me and/or my wife is home would be beneficial as well (whether we are looking at the presence sensor or the mode home or night)

What else am I missing that would be useful? Kids running in and out at a party, but don’t want to put a time delay on it because of we have a party when people are arriving I want to know as well.

Thanks for any help.

This is pretty easy… I’ll write something up in a bit. Few hours.

Will the delay off option switch off the light after the set time for the delay even if new motion detected?

With Rule Machine how are others tackling manual light switch on (light stays on) and vice versa with a normally motion on / off setup?

Would 2 virtual switches be needed? (for each - manual on / off) and the motion sensor then triggers the virtual switches to actuate the light switch (GE) with a “or” scenario for the true / false?..or is there a Boolean setup and 1 additional virtual switch?

I’ve hunted all over for this to no avail.

The delay option turns off the light at the end of the set time. Any new motion after that time turns the lights back on.

The pending delay keeps the lights on until motion stops for longer than the set time.

So, if you are using the pending delay on your living room lights they will stay on as long as you keep moving. Using the delay option just turns them off.

I set this up using two rules and no virtual switches.

Rule #1 - Lights on/off
Conditions - motion active, private Boolean false
Rule - motion active AND private Boolean false
Actions for true - turn on light
Actions for false - pending delay off: x minutes

Rule #2 - manual override on
Trigger - manual press of light switch on
Actions - set private Boolean of Rule #1 to true

Rule #3 - manual override off
Trigger - manual press of light switch off or light off (I do both just in case the manual press fails cause it sucks)
Actions - set private Boolean of Rule #1 to false

This works best if the lights switch is not in the motion sensors detection zone. If it is, you have to physically turn the lights off, wait a few seconds and then physically turn them back on.

Manual press? Is that “Physical Switch”?[quote=“bamarayne, post:721, topic:29577, full:true”]

I set this up using two rules and no virtual switches.

Rule #1 - Lights on/off
Conditions - motion active, private Boolean false
Rule - motion active AND private Boolean false
Actions for true - turn on light
Actions for false - pending delay off: x minutes

Rule #2 - manual override on
Trigger - manual press of light switch on
Actions - set private Boolean of Rule #1 to true

Rule #3 - manual override off
Trigger - manual press of light switch off or light off (I do both just in case the manual press fails cause it sucks)
Actions - set private Boolean of Rule #1 to false

This works best if the lights switch is not in the motion sensors detection zone. If it is, you have to physically turn the lights off, wait a few seconds and then physically turn them back on.
[/quote]

A short answer, yes

Thank you…I’ll give it a spin. So far I cannot get it to stay on but I’ll test a little more.

Just an fyi, physical press is a pia because it’s flakey.

What kind of switch are you using?

G.E. which leads me to believe I’m S.O.L.

Nah! I use GE switches… It works for me… Most of the time.

I set up a rule using the custom command “refresh()”. I use every motion sensor in my house to run the rule. With 6 people, a dog and 4 cats my motion sensors are always active. So, the rule refreshes all of my hue bulbs, no neutral dimmer switches and the GE switches I use physical press on. The rules causes an almost instant and real time status of all of the related items.

It works like a charm!