Help with Presence and Motion sensors


#1

1) Give a description of the problem
I want to change the LocationMode to Away when both of these are true:

  1. All presence detectors are out of the house
  2. There has been no motion in the house for 30 minutes

I have 4 presence detectors and 4 motion sensors but may add more. My first instinct is to trigger on “all motion sensors see no motion for 30 minutes” and then check the state of presence detectors. Is there an efficient way to loop through all the Motion Sensors to avoid a giant if statement?

2) What is the expected behavior?
LocationMode changes to Away when:

  1. All presence detectors are out of the house
  2. There has been no motion in the house for 30 minutes

LocationMode changes to home when one of these happens:

  1. Someone arrives home (Presence Sensor)
  2. Motion from one of the sensors is active

#2

Hi there,
The motion sensor part is easy but I have to say, I wouldn’t depend on presence detection for any of the pistons… The timing is not 100% reliable…
After not seeing proper results i tried a simple test for my presense sensors:

IF presense sensor changes to AWAY 
Send SMS "Presense sensor just left"
IF presense sensor changes to HOME 
Send SMS "Presense sensor is back"

I was surprised how late my presense sensors could register…(50% of the time)
I would come home, get changed etc… 3 minutes later I would get a notification…

Is there any way that you can do this without presense sensors?? Maybe a spesific motion sensor around the main door etc???


#3

I’ve been taking this piecemeal and finally have my presence sensors working they way I’d like. This is what I have so far:

I’m not sure if this works yet. I know I still have to change back to Home when motion is detected or Presence comes home. I guess I can just add those as triggers in a new if statement?


#4

Ok - here’s the finished piston. Is there an easy way to test this?


#5

You can create a simulated presense sensor… But for motion sensor I don’t know if there is simulated motion sensor?? (check you ST IDE i think i have seen something)


#6

You can drop your time limit down to 5 minutes and either cover or point the motion detectors into a corner temporarily. Maybe just use one for testing. The simulated presence sensor works great sinc you can actually control the presence in the ST app.