Simple Room Lighting Question

I have a simple Room Lighting setup for one of the rooms in my house

The light is turned on by a physical switch on the wall, connected to HUE and integrated into HE via the Coco Hue integration

The motion sensor is a Sonoff

The rule works fine when someone walks into the room, triggers the motion sensor to become active as the light is turned on. In this situation the count down for 20 mins begins once the motion is inactive and if no further motion takes place the light turns off - all good.

However, in situations when the light is turned on via Hue or if the light is turned on at the switch without ever activating the motion sensor (the switch is around a corner) then the 20 min countdown never begins (from motion inactive) and no command will ever turn off the light.

I can see a setting in RL to turn off the light after x time, but I dont want to use this as it will undermine the functionality of the motion sensor 20 min time out.

How does one configure RL to turn off the light if it was turned on and 20 mins have passed and to check that during that time motion NEVER occurred?

Try enabling the "Turn Off even if already partially off" option under "Means to Turn Off Lights," which will make it perform your Turn Off actions even if it doesn't think the RL instance is currently "Activated," which is otherwise the app's assumption.

Thanks for your reply.

My understanding is that the setting you are referring to would 'force' the off command even if the state of the device is already off.

In my scenario the device state is not the issue and is always (to my knowledge) correct in RL. The issue is that I am trying to overcome is the generation of the off command itself, not an issue of it failing to work because it thinks the device is already off?

Apologies if I have misunderstood your message or the functionality behind what you have proposed?

This understanding is not correct, although that is a subset of what it would do. It:

i.e., even if RL is not what performed your "Activate" (turn on) actions, such as when you turn it on manually from the Hue app. RL, by default, thinks it's in control, but you have options like these to adjust that behavior.

From your other post, it's still not clear to me if you want it to turn off after 20 minutes no matter what (e.g., even with no motion). In that case, I think you can still find additional options that will do what you want, though I'll have to think a bit about that...

Thank you - I will give this a go

I'm trying to create a scenario where if the light is turned on, either by the switch being turned on or via HUE but the motion never detects motion - how do I still have the light turn off after 20 mins but, if the motion sensor detects motion it remains on (until inactive for 20 mins).

Thinking about this more, if you enable the similar "Activate even if already partially activated" option, this should make motion re-start the timer, so the option you mention wouldn't end up being a problem in this case.

Do note that this will reset your settings to whatever is in your activation table ... which looking at yours really seems to just be turning a switch on (as opposed to setting a bunch of bulbs to certain states), so I'm guessing that won't be a problem?

Thanks for your suggestion - will give it a go

I wonder if there is an opportunity in the future for another 'Means to Turn Off' option which takes into account both time and motion inactive. So it asks for both a time value and to pick one or more motion sensors. Then assesses if the time has passed without any motion since it was activated and then turns off?

You want Elapsed Time as a Means to Turn Off and that value to be 20 minutes. Basically, your Means would look like:

On
Switch
Motion Sensor Active

Off
Switch
Motion Sensor Inactive and stays 20 minutes (this isn't really necessary anymore, but I included it since your original has it)
Elapsed Time of 20 minutes from Last Activation Event

As long as you have the option of "Activate even if partially activated" selected, this will work as you desire. When you turn on the light via the Hue App, Room Lighting will turn on and the 20 minute countdown will start. If the motion sensor never becomes activated, the light will turn off after 20 minutes. If the motion sensor becomes activated, it will reset the 20 minute counter. Every time the motion sensor is activated, the counter resets.

2 Likes

Possible case to account for: if the motion sensor activates once and never becomes inactive even for 20+ minutes. 1) The motion sensor becoming inactive needs to stay a means to turn off, 2) the option to not turn off if motion sensor is active needs to be chosen in Off Condition Limits,

Another potential case: when one wants the timer for the switch to be shorter than for the motion sensor off then 'Stays Off Pending' should be chosen in the off limit condition list.

1 Like

Those are both good possible cases to account for depending on the motion sensor and desired behavior.