Seems that this should be simple

Getting caught up in the logic with RM. Is there a simple (preferred) way to turn off a light after a specified time if there is no motion sensor activity during that period?

The Simple Automation Rules app can easily do that without the added complexity of Rule Machine...as can the Motion Lighting app.

If you really want to do it in RM, let us know and someone will surely post a RM 4 rule that does so.

4 Likes

no the motion lighting app is what you should use.

2 Likes

Will go with the motion lighting app first. Thanks, Gents.

If you find a need for a way to turn off a light/device after a specified amount of time, not related to motion or contact sensors, ect., then the Auto_Off app is quick and easy, and reliable.

I use it with my whole house fan to ensure someone doesn't leave it on for hours and hours.

2 Likes

Well, may have spoken too soon. I want to be able to turn on one of three lights with their individual Leviton switches and have them stay on as long as there is motion detected in the kitchen. If no motion detected within 30 minutes, all should get turned off.

A quick look at the motion lighting app suggests that it wants to turn the lights on with motion, not the switches. And, I don't see a way to include motion sensing in the simple automation rules. Unless I'm missing something in those two apps, it seems that I'll need to conjure up a RM rule.

Can you elaborate on above statement?

Not sure what you mean by above...you want to turn on some switches w/motion on certain motion sensors, and turn off after x minutes Motion Lighting is exactly the app you should use. You choose the motion sensors that will trigger the event, then choose the dimmers or switches or bulbs you want to turn on. What's missing?

2 Likes

I don't want to turn on the lights with the motion sensors. I want to turn on one, two or three of them with their Leviton wall switches, but I want all the lights to go off if there is no motion in the area for some number of minutes. Make sense?

1 Like

Set up a RM with motion trigger on the changed event from your motion sensor (or motion zone). In the actions the first step is to Cancel Delayed Actions. Add an If-Then to check for motion being inactive. Inside (if motion is inactive), add a step to turn off the switches, with a 30-minute delay, and make it cancellable. End-If.

If motion goes inactive, a 30 minute timer will start counting down. If motion goes active before the timer is up, the rule fires again and cancels the countdown.

1 Like

This sounds exactly like what I was attempting earlier with RM, but didn't quite have the logic right. Will give this a try in the morning. Thanks.

Loving all the flexibility of Hubitat, but still paying the price of newness. Got my brother and son to acquire systems this past week, so I sense that this is going to be a family learning/bonding experience.

Here's how I would set it up... Dining Room MS-1 is one of my motion sensors, FYI

Did it just as you described. Works GREAT! Thanks.

1 Like

OK, yeah, finally got it. :slight_smile:

Glad you got something figured out with RM! But you're correct that this should be simple, and it is with Simple Automation Rules (formerly called Simple Lighting), which like Motion Lighting, works with any switch/dimmer and not just lights specifically:

Simple Automation Rules screenshot with "motion stops" as event that turns off lights

So, maybe this will help someone in the future who searches. :smiley:

3 Likes

Learning more every day. Worked my way down the Simple Automation Rules initially but tried to trigger on the lights being turned on rather than the motion stopping. This is indeed simple, as @ogiwan and others suggested, and works well! Appreciate the help.

4 Likes