Rule Machine - Get peer assistance here with setting up rules

rulemachinelogic

(ocpd+adhd+alz+md+hfa+fms+lol=me :)) #671

[quote=“mrmrmrmr, post:657, topic:29577, full:true”]
…weather forecast application…[/quote]

@mrmrmrmr
Which app is that? Is this a SmartApp that you’re talking about?
If so, any chance you could post a link to it?


#672

Wow, I dont think I would ever have figured that one out. Thank you very much. I believe Ive got everything setup, took me awhile until I figured out I needed to update rule machine. I couldn’t figure out the Boolean thing for the life of me until then.


(Jason "The Enabler" as deemed so by @Smart) #673

You can test it by removing the time settings in the rule.

Let me know how it works out for you.


#674

I am running into a problem where the lights immediately turn back on to 10% after they are turned off manually with the dimmer. For some reason they seem to stay off if I turn them off from the app. It almost seems as if it’s detecting motion to fast or something. Other than that everything seems to be working really well.
Here it is in case I missed something



(Jason "The Enabler" as deemed so by @Smart) #675

Ok, I think I know what’s going on.

Is the light switch in the detection range of the motion sensor?

If yes, that is the problem. You turn the lights off and then the motion sensor is detecting you.
It refreshes the dimmer, sees that it is off, and then sets them to 10%

One thing that can be done is to add a “Turn off these switches after a delay, pending cancellation”

I think the best thing to do is to add in a turn off command to the rule. This will allow you to walk out of the room and the lights will turn themselves off.

In Rule #1 (master bath 1) do this:

Goto "Actions for true --> Control Switches, Capture/Restore --> Turn on or off these switches after a dely, pending cancellation.

Choose the bathroom dimmer, tap done.
Look right below that section and you will see a red line below "Minutes of delay"
I would give it a 2.

Tap done, done, done… or how ever many times.

Then test it.

I’m going to work on this some more, but this workaround should do what you need for now.

Please confirm if the dimmer is the sensors detection zone.

Thanks.


(ilker Aktuna) #676

it is the one from ule :


(Ule) #677

Hi,the wewather app is


(ocpd+adhd+alz+md+hfa+fms+lol=me :)) #678

Thanks! :slight_smile:


(Alex) #679

(Reposting from above in case it got lost)

Hi, Everyone. Hoping someone can help me out with this one:

I used to use routines for my arrivals/departures, but I’m trying to
switch to Rule Machine since it seems so much more reliable and robust.
However, my presence sensors are also flaky, so I like to use the delay
function in the routines so it doesn’t run until everyone is gone for
10 minutes. My “Goodbye” rule that I cloned off the routine is as
follows, and it seems to work fine:

Conditions: x, y all not present [TRUE]
Actions: True - Delay by 10 minutes, Cancel, x, y actions

However, I’m having difficulty programming the arrival rule. In
routines, I’m able to program that a presence sensor can’t be used to
run the routine unless it has been away for X minutes. This really
helps me out as I use virtual presence sensors that combine multiple
presence sensors, and I don’t want a temporary disconnect/reconnect of
the wifi network (one of my presence sensors) to cause my entire arrival
rule to run again.

Anyone know how I could implement this? Having a 10 minutes delay in
the Goodbye rule is just fine since I don’t care if it takes 10 minutes
to close the garage door and such, but I need the arrival rule to run
immediately after arrival assuming that presence sensor has been "away"
for at least X minutes. Any help?


(Bruce) #680

Along with everything else you do after 10 minutes now, add setting the private Boolean of another rule. That rule would be your arrival rule, and it would only run if the private Boolean is set correctly. One of its actions would be to flip the private Boolean the other way, so this rule is only “enabled” after 10 minutes until someone returns.


#681

Thanks, I adjusted the rule but won’t be able to test till later. But yes the sensor is within view of the dimmer switch


(Jason "The Enabler" as deemed so by @Smart) #682

Yeah, with the sensor seeing the switch there are pretty much two options…

  1. have the lights turn off automatically
  2. move the switch

(Alex) #683

Thank you, I’ll try this.


(Ross) #684

Reposting someone bamarayne :slight_smile: might be up for figuring this out.

Turn on a light switch at sunset and keep it on until 10pm. If the TV is drawing power at 10pm leave the light switch on, otherwise turn it off. If the light switch stays on after 10pm, because the TV is drawing power, turn off the light switch 10 minutes after the TV stops drawing power. I think what bravenel provided will cover this, although I must have missed something because the light only came on if the TV was on.

If the same light switch is off after 10pm and a motion sensor detects motion turn the light switch on for 10 minutes. If during that 10 minutes the TV starts to draw power then leave the light on until the TV stops drawing power and then turn the light switch off 10 minutes later.


(Jason "The Enabler" as deemed so by @Smart) #685

Yeah, I’ll work this up for you, but it is going to be more than one rule. Not a problem.

Give some time, I’m in the middle of a project… I’ll post it here later tonight.


(Ross) #686

sweet! Thank you! I’m really looking forward to having this in place.


#687

How do you update rule machine? I’m probably running the initial source code. I just copied and pasted something someone steered me to. Do I need to manually update the code anytime bravenel updates it? Do I update rule machine or do I update the rule trigger?


(ocpd+adhd+alz+md+hfa+fms+lol=me :)) #688

@Rooster9376
It’s in the OP of the main Rule Machine thread.
I think it’s called, “[Release] Rule Machine”

Here ya go…

Specifically, these two sections…
How to Install or Update Rule Machine
and
GitHub Integration

:slight_smile:


(Bruce) #689

Would you please get the latest source from Github for both Rule Machine and Rule.

Rule Machine github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule-machine.src/rule-machine.groovy. Save and Publish for me.

Rule github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.


(Jason "The Enabler" as deemed so by @Smart) #690

Ross,
I’ve got this worked up for you. It should work. I got stumped on for a bit cause I was approaching it wrong… but this should absolutely work.

If it does, please let me know. If it doesn’t, most definitely let me know.

You will need to make 3 separate rules.

Rule #1 -
Conditions - sunset-10pm, private Boolean of this rule false
Rule - sunset-10pm OR private Boolean false
Actions for true - turn on switch
Actions for false - turn off switch
edit restrictions - only between sunset and sunrise

Rule #2 -
Conditions - tv on
Rule - tv on
Actions for true - private Boolean of rules #1 & #3 set to false
Actions for false - delay 10 min: private Boolean of Rule #1 & #3 to true

Rule #3 -
Conditions - 10pm-sunrise, Morin active, private Boolean of this rule true
Rule - 10pm-sunrise AND motion active AND private Boolean true
Actions for true - private Boolean of Rule #1 to false
Actions for false - pending delay 10 min: private Boolean of Rule #1 to true