Multiple motion sensors to trigger light(s)


#1

Does anyone have a piston already built for this setup?

I have a couple porch lights that I currently trigger off a single motion sensor. When motion starts, turn those lights on and off xx minutes after motion stops. But only operating between sunset and sunrise.

But to further complicate things, I want to use a second motion sensor or possibly even presence sensor to turn them on as well.

I assume we’ll need some variable to say which sensor turned them on, or if they were already on. But I don’t have the fainest idea where to begin. :slight_smile:


#2

This is my hallway lighting piston. Uses a motion sensor at the bottom of the stairs, and one in the hallway upstairs. Works well, it’s a very simple piston.


#3

I think that might be exactly what I need. I suppose I could add a “wait x minutes” before turning the lights off.

I’m also thinking how I could incorporate presence. Turn the porch light on for xx minutes after one of us arrives. Over complicating things now. :slight_smile:


#4

I’m also thinking how I could incorporate presence. Turn the porch light on for xx minutes after one of us arrives. Over complicating things now. :slight_smile:

Just a different IF

If presense sensor X status changes to HOME
WAIT x minutes (NEVER CANCEL TASK)
Do turn ON lights

This part is very simple but complication starts with light is turning off most likely immidiately because motion sensors motion IS INACTIVE… You see, that part of the piston or seperate piston will control the light…

It’s very simple to change the settings on the go without manually doing anything BUT you gonna need to get your hands dirty and start playing with VARIABLES :)))))

For instance in my house,
You walk into a room lights ON
You walk out (no motion) light OFF
but what if you want to sit down??? You can’t constantly be triggering your motion sensors… Unless you stick one on your forehead LOL

This is where the variables are your biggest help…

Let me know when you want to dive in to variables… I’ll share my example piston no problem…


#5

Just my two cents:
Keep the “Welcome Home” piston separate, since you’ll eventually want more than just a porch light to happen when one of you arrives home.


#6

Here is one I use. I suppose it is over complicated and could probably be optimized, but it works flawlessly right now.


#7

Exactly. I figure there’s got to be some logic using variables so multiple sensors can keep the lights on for however long.

I also assume each sensor would be in a seperate if statement and look to see if the light is already on, and possibly for a variable to indicate what turned it on. ie, if someone manually turned them on then just leave them on.

If you want to share your example, I’d greatly appreciate it. That’s how I learn best, by tinkering with something that already works and modifying it for my use.


#8

Thanks! I’ll play with this one this weekend as a starting point!


#9

Here is how I handle multiple sensors in my garage. Works fine.