Different Rules and Triggers Controlling the Same Outdoor Lights

I'm currently using 3 different Simple Automation Rules for outdoor lighting. I have 3 motion sensors controlling 3 different sets of lights. Motion sensors currently set to clear/reset after 10 seconds but plan on increasing that to 1 minute.

  • RULE 1: Motion Sensor 1 Active = Garage 1 and Porch Lights ON, turn OFF after 5 min
  • RULE 2: Motion Sensor 2 Active = Garage 2 Lights ON, turn OFF after 5 min
  • RULE 3: Motion Sensor 3 Active = Driveway Floodlight ON, turn OFF after 5 min

So far everything above works great. I also have a Driveway Vehicle Sensor and a Smart Mailbox. I plan on creating two additional rules for nighttime:

  • RULE 4: Mailbox Open = All Outdoor Lights ON, turn OFF after 5 min (Porch, Garage 1 & 2, Driveway Floodlight)

  • RULE 5: IF Vehicle Detected AND Porch Light is Off THEN All Outdoor Lights ON, turn OFF after 5 min (Porch, Garage 1 & 2, Driveway Floodlight)

The [Vehicle Detected AND Porch Light Off] condition is my crude way of restricting All Lights On to vehicles entering rather than leaving driveway. When leaving Motion Sensor 1 has turned on Porch Light for 5 minutes. Pre-HE I had this setup in ST and worked well.

I'm using 5 different rules because they each need to operate independently from each other, maybe I'm wrong? What I don't understand is how the 'Off in 5 minutes' is impacted when other rules control the same lights before the original 'Off in 5 minutes' rule completes.

Car enters driveway at night, all outside lights are off, and passes first motion sensor
(1) RULE 3 (motion) turns ON Driveway Floodlight, starts 5 minute countdown to OFF
Same car then passes vehicle sensor (magnetometer)
(2) RULE 5 (vehicle) turns ON All Lights, starts 5 minute countdown to All Lights OFF
Same car then approaches second motion sensor, on garage 1
(3) RULE 1 (motion) turns ON Porch & Garage 1 Lights, starts 5 minute countdown to OFF
Same car enters garage

In above scenario how are the 'Off in 5 minutes' timers impacted when different rules are controlling the same lights? Does the last rule to turn on a light override any 'still running' off timers from another rule? I did some testing and it appears that triggering the SAME motion sensor and rule again before the first 'off in 5 min' timer completes simply resets the timer to 5 minutes which is great, if that's how it's supposed to work. What I don't understand is when a rule turns on the same light another rule has already turned on. I hope this makes sense.

I should mention the motion sensors and associated lighting rules are not vehicle specific. They need to function independently at night for people detection as well. I hope I'm just overthinking a simple scenario, I excel at that lol. I want to understand exactly how this works. Any advice is welcome and greatly appreciated, thank you.

It looks to me that Rules 1, 2, and 3 operate independently. Rule 4 is just 1, 2, and 3 happening at the same time. I think you can add Mailbox Open as a trigger for 1, 2, and 3 and get the same result. Rule 5 is again 1, 2, and 3 but when the Porch Light is Off. I think you can add Vehicle Detection as a trigger for 1, 2, and 3 but check to see if Porch Light is off before taking action.

There is something Cancel Rule Timers that can cancel waits/delays from another rule. That would work for Rules 4 and 5 to cancel 1, 2, and 3 but it won't work in reverse. If Rule 1 Cancel Rule Timers Rule 4 there is nothing to turn off Garage 2 and Driveway Floodlight.

1 Like

Maybe set up a single virtual switch that is a delayed five minute off for all of the rules which is reset when any of those rules starts.

1 Like

Pseudonym, thank you for the reply and advice. Yes, adding the mailbox night tamper trigger to my core outdoor lighting rules 1, 2 and 3 would definitely work, great idea! I think I can essentially do the same thing with the vehicle sensor trigger if I can add a condition for 'Porch Light is Off'. I was using Simple Automation Rules for lighting as I'm fresh to HE, about a month, still learning RM. It doesn't look like I can use multiple triggers in SAR and not sure yet how to set lights/switches to turn off after xx minutes in RM. This is great motivation for me to learn Rule Machine. Thanks again for steering me on a much simpler path! :+1:

Oops, didn't pick up on SAR but I can definitely help with RM.

1 Like

BBrannon, I appreciate your suggestion. I'm already finding great use for virtual switches. Your idea got me thinking I could create a separate rule:

IF Vehicle Detected AND Porch Light is Off THEN Set Virtual Motion Sensor to Active

I could then use that virtual motion sensor as an additional trigger in my core rules 1, 2 and 3, similar to the mailbox fix. The virtual motion sensor auto resets after xx seconds so it's ready to use again. This would be a quick fix until I'm more familiar with RM. Thank you! This is a great community. In the future I hope to help others just like yourself and pseudonym are helping me. Great stuff. :grinning:

CORRECTION: I forgot I can't use multiple triggers in SAR. RM 101 begins now lol.

No worries. I was planning on going through all the tutorials. I've watched some YouTube videos. I was a web designer with my previous company for many years so I have experience with HTML, ASP, Java Script. I'm sure I'll pick up on it quick. I'm really good at learning by example which at times pulls me down some proverbial rabbit holes. lol If I have any questions I'll let you know, thank you.

1 Like

Download the Hubitat app