Homey Community Forum

"Dynamic" light on-time based on movement

I have made a basic light activation based on movement and switching off the light when movement is not detected for fixed amount of time.

Have been thinking how to make the fixed amount of time to more “dynamic” or actually making the time to adjust over time based on the movement at the room.

So my plans so far:

  1. The on-time of the light is always increased (for example by 10s) if the light is switched off and turned on again within 30s of the switching the light off by the timer. This meaning that light have been switched off when someone is in the room and has waved and activated the light again.
  2. The question is that how the on-time should be decreased? Or should it be decreased at all…

And I know, if I would make actual room presence detection none of this would not be needed. And all off this is somewhat pointless and not needed, but if you can do it, why not? :wink:

Maybe you could reset your timer for switching off the light every time movement is detected in the room. Look at this countdown timer in the app store.
( https://homey.app/en-us/app/nl.bevlogenheid.countdown/CountDown/ )
So the lights only switch off when the timer finally reaches zero.

Yeah okey I wasn’t too clear about what I meant with the fixed time. I am using the countdown app to make the lights go off when movement is not detected anymore (with the resets and stopping of the timer), but I was thinking to make the countdown timer from fixed time into more dynamic.

At this point I’m testing that the time is increased only according to above mentions, but not decreased. This way I can find out the maximum time to keep the lights on at certain rooms.