Turn off lights using motion sensor like a toggle?

I have a smart things motion sensor to turn my lights on in my office when I walk in. The issue is when I leave. I turn the lights off manually with the wall light switch when I leave. However, the motion sensor then detects my movement and turns the lights back on. I’ve tried to set the smart app to turn the lights off when there is no motion for x minutes, but sitting at my computer doesn’t create enough motion when I’m actually in my office and my lights turn off.

Question: Is there a way to create a webcore piston to do the following:

  1. Detect motion, turn lights on if they are currently off
  2. Detect motion, turn lights off if they are currently on

If so, can you point me in the direction of how to do this in webcore?

Thank you in advance.

I’d just up the time after motion. With what you propose after motion stops and it picks you up it would turn the lights of even if your not going out. Try repositioning sensor so your movements are accross it. And turn up the sensitivity. I turned my bathroom sensors blind time up as well

1 Like

Here’s what I’ve tried:

  1. Built piston1: If lights off and motion changed < 1 minute, turn lights on
  2. Built piston2: If lights on and motion changed < 1 minute, turn lights off

The problem is the same motion detector is used for both pistons and it goes into an infinite loop with the lights turning on/off. I fully understand why it’s doing this.

I’m trying to figure out a way to have the lights turn on/off based on motion.

You are using the wrong trigger. You want the absence of motion to turn off the lights. why would you want to turn off the lights when motion is active. Your trigger shouldn’t just be motion changing…it should be motion changing to Active or Inactive.

The motion sensor is on the outside of my office door. As I walk towards my office, the motion turns on the lights in the office. If I have it set to turn the lights off due to inactivity, the lights would turn off while I’m in my office because the motion detector is outside of the office. This is a home office and I’m the only one that triggers motion.

I tried moving the detector inside the office and do as you suggested. However, when I’m at my computer or talking on the phone, there isn’t enough motion and the lights turn off due to inactivity.

Here’s what I need, I think, with the motion sensor outside of the office door:

  1. If lights off and motion detected and lights have been off for more than 1 minute, turn lights on
  2. If lights on and motion detected and lights have been on for more than 1 minute, turn lights off

It’s the “and lights have been on/off for more than 1 minute” that I can’t figure out how to do in CORE.

Thanks in advance.

This won’t really work. Because if you walk into your office and then someone else does, the lights will turn off. Also, if you walk in and back out before the sensor has had time to reset to inactive the lights will stay on. The next time your walk into your office, the lights will turn off. Also, if you walk up to your office door but don’t go in cause you forgot your coffee cup, the lights will still go on. Now when you come back they will turn off as you walk into your office. Do you see what I mean? Using timers is just going to make the situation worse, not better.

I have a motion sensor in my office, and i have the delay to turn the lights off at inactivity for 10 minutes. There isn’t a period of time that I’m not moving around within 10 minutes. I also have the motion sensor so it can see me at my desk and not my back. The motion of my hands on the keyboard is enough to trigger the sensor. You might want to think about an array of two motion sensors. The lights only turn off when both are inactive for x minutes. That way you could have better coverage.

Ryan,
Thanks for the great suggestions! I had thought about doing the 2 motion sensors and have done as you suggested. I moved one so it would see me from the front and this seems to pick up my motions a lot better than from the back.

So, here’s the setup. One motion sensor is positioned so the office lights will turn on when I walk in the office. The other one is set up in front of me and turns off the lights after no motion for 10 minutes. I had to go this route with the 2 senors because of the office layout…ie, the motion sensor in front of me is not in a position to turn on the lights when I come in the office due to the layout of my office door and desk placement.

Thanks again!

1 Like

Slight tangent, could you use a zwave button to toggle a light? Ie press to turn on the press to turn off?

Yes, you can.