Motion lighting Family Room

What am I missing?? Once activated it will not shut off.
I have two motion sensors in my Family room.

  • Hue Motion - Activate lights ( It is set on the table next to when you walk into the room)
  • Motion 2 - keep them on.

I have another RM setup to when my Zooz power monitor is above 100 watts, It disables the Familty motion RM until I turn off the TV & Stereo.

If motion active and light is off then
Light on
Else if Light is on and no motion then
Turn off after delay 10 with cancel
Else
Cancel delay
End if

There's a couple things that you have to address here. First is the cancelation of the delay. You are not going to cancel the delay until after the lights turn off. That is because you have the cancel nested under the PB being True. So, to address this, I would remove the PB and instead have the rule structured like so:

Trigger:  Any motion changed

Action:

If Any motion active
      Cancel Delay Actions
      If all lights are off
          Turn lights on
     End-If
Else-If  All motion inactive
     Delay by 10 minutes with cancel
     Turn lights off
End-If

This will get the lights to only change settings if they are off and also still cancel turning the lights on if motion is still detected within the 10 minutes. For rooms like the family room or Kitchen, where you have long periods where you might not move much, I also have my delays be contingent on what lights are on. For example, in my kitchen, if the dining area light is on it takes 30 minutes for the lights to time out. But if just the overhead is on, it only takes 5. You could do the same if you have your family room lights low for watching TV (when you don't move much, like this:

Trigger:  Any motion changed

Action:

If Any motion active
      Cancel Delay Actions
      If all lights are off
          Turn lights on
     End-If
Else-If  All motion inactive
     If lights on AND dim level < 50
             Delay by 30 minutes with cancel
     Else- If lights on and dim level >= 50 
             Delay by 10 minutes with cancel
      End-If
     Turn lights off
End-If
1 Like

Thanks guys for the info.

Ryan - Wouldn't you have to dim the lights in the watching tv equation?

Ryan780:

Look ok?

I would have the second if to ALL lights are off. That way, it won't continue to change them if you turn either of the lamps on.

Also, I was using shorthand when I said "turn on the lights". You can use whatever command you want: Dim to level or set color temp....whatever you want.

Also you don't want the else-if to be "ANY inactive". You want it to be ALL inactive.

Maybe a little off topic but I have a "newbie" question. How did you get that view that looks like you single stepped through the rule? Is this an RM4 addition?

Lights did not turn off after 10 minutes

Was that directed to me? If you're asking me how I got that view, it's simply using the "format as code" in the forum. This icon:

image

If you don't, it won't put spaces in at the beginning of a line. So, this is how it looks without applying that formatting.

Trigger: Any motion changed

Action:

If Any motion active
Cancel Delay Actions
If all lights are off
Turn lights on
End-If
Else-If All motion inactive
If lights on AND dim level < 50
Delay by 30 minutes with cancel
Else- If lights on and dim level >= 50
Delay by 10 minutes with cancel
End-If
Turn lights off
End-If

See, it left justifies all of the text even though there are spaces in front of those lines in the version in the editor.

1 Like

Are you able to turn the lamps on and off via the edit device page? Trip motion for the sensors again, then let it go into inactive and show the rule properties page (the cog wheel). You should see a scheduled task for the delay.

reactivated the lights.

Checked for scheduled task:

Scheduled Jobs

No Scheduled Jobs are set.

That's not the page I mean. Do you see the cog wheel? That shows the rule properties.

image

yes. that was the scheduled Jobs. The other pic is from the logs

I asked you to post a screenshot.

My apologies

Never mind. I see your problem. Your trigger is incorrect.

If you notice, I said motion CHANGES. Not active. You have to also trigger the rule when the motion becomes inactive. Otherwise the lights won't turn off. Take a closer look at what I posted and make sure that it matches.

Rookie here buddy. Sorry.. Thanks for being so patient..

1 Like
Scheduled Jobs

Handler Next Run Time Prev Run Time Status Schedule

delayedActsCancel 2019-08-11 4:29:02 PM CDT PENDING Once

Working. Thanks Ryan.

2 Likes

YAY!!!! :smiley: