Canonical way to test for idleness / idle timeouts?


#1

Hi there,

I find there to be multiple ways to test for idleness, and having been plunged into darkness while showering on a couple of occasions, I’m developing the idea that I might have picked the wrong one. Which of these should work, and which do you recommend?

  1. Wait, then turn off

This is the latest thing I’ve tried and seems to work, ie. it restarts the timer if motion is detected in the meantime.

  1. Stays inactive for…

I found that with this option, once a timer was set up, any future motion would not unset it, or rather what seems to happen is that a pair of becomes-active, becomes-inactive events while the timer was running would result in a timer running from the original start time, not the revised start time, so the on-time was not extended.

  1. Does not change for…

This was my first attempt when I didn’t really know what I was doing (well, I still don’t!), and it didn’t seem to trigger at all. I wonder if maybe it’s because it’s only checking states, not an event?


#2

I use the first one mostly because I also don’t know what I’m doing :grin: and didn’t even know there were other ways to do it. We have a motion sensor in the kitchen and it seems to work. The light does not shut off while we’re in there.


#3

First way is the way I do it and always recommend.


#4

Out of curiosity why is there a specific “stays inactive for” condition if it’s not the preferred way of doing this? Is it intended for a different use case?


#5

With webcore there are many many ways to accomplish the same thing. Functionally they are pretty well the same.

If you could post up the green snapshot of your first variation with stays. Might be able to diagnose why it wasn’t working


#6

I had a similar issue and with the differences in motion sensors available I found that using the occupancy sensor smartapp and its room status for pistons if statements.

I have ended up on select rooms - like bathrooms with showers to add a contact sensor to the door along with the motion sensor to the room settings to eliminate the premature lights out moments.
i.e. if room “occupied” (just motion turns on) then any motion event restarts 300 second countdown to “vacant”(tiurns off)

i.e. if room “engaged” (motion and door closed turns on) then lights stay on until door is reopened “vacant” (turns off).

Bangali’s – Rooms Manager Smartapp

Just a option to look into if you are wanting something different it is still in development but very active with updates and loving it so far.