Help with room lighting

Hopefully you can help me, I am not getting RM to work to my needs.

This is my use case:

  • Switch on when sensor detects motion and illuminance is below 5000.
  • Switch off when sensor stays inactive for 1 minute

This is working as expected, no problems here.

The problem is when the light is activated from the wall switch so the room lightning app is not activated and lights will never (automatically) switch off.

Is there an option I am missing to make it switch off whenever motion is inactive? I am using an extra rule with the 'Simple Automation Rules' app, but it seems weird I have to complement the power room lighting app with the simple automation rules app

It seems I found a solution, posting it here so maybe other can verify and use:

When switched on manually, the rule does not activate because the illuminance is above threshold, but the timer starts counting anyway, and it turns off the lights even whent the app is not active.

1 Like

Yeah thats what I was going to suggest, I have a similar setup for my Bathroom motion setup.

You shouldn't need to include the Laundry Lights as a switch to turn on within the activation section, the main table settings should take care of that.

I also expect you will need to look at the de-activation separately to your condition for activation, if that makes sense...

I actually do this on a few of mine as well. The reason for doing that is to make sure the RL instance becomes "Active" which then will allow the means to turn off to work. Otherwise the RL may never become active.

1 Like

Could you please ellaborate on this? I don't understand what you mean

My original point was that you include that same switch in the main table where you define the list of devices and their states when activated.

I can understand @jtp10181 's point that there can be times where adjustments to the same switch from outside the RL setup may be times where you want to see the RL setup come back to life. For me, I like to have a separate virtual device to drive this re-activation or re-enabling of the RL rule, so a virtual switch that is also turned on/off by a separate rule that might be a button controller, etc.

E.g.:

Hi @sburke781 , thanks a lot for the detailed explanation, really appreciate it.

1 Like

I'm running into a similar problem, this is an interesting solution. So every time motion is detected, that 2 minute timer is reset and then when it hits 0 it turns the lights off? I may try that... problem I guess is if motion is detected continuously for the full 2 minutes, it'll turn off even with you there? If I am understanding it correctly?

The timer is set up to start from the last activation event, so evert time motion is detected the timer will reset. Hope it helps, I am on my mobile and can't post any screenshots.

Yeah, but if motion is continuously detected so it never changes to not detected, it could run out with motion detected I think?

There is a solution to this, you made me realize I forgot to add it in the one I posted above. So I have fixed mine and here is what you add. This will prevent the RL from turning off due to the timer if motion is still active. Then once the motion becomes inactive it will still start the 10 minute motion timer I have set and then turn off.

2 Likes

Ah interesting. I do wonder if at that point it's just more effective to use rule machine, but I like the idea. I will probably set it up and see how it works!

Thanks

My example above is pretty complicated with various triggers and exceptions, I cannot even imagine what that would look like in RM, would be a giant complicated mess IMO. Would possibly even need multiple RM instances that work together to get that done.

1 Like

Ha, yes! My bathroom motion RL is even more convoluted, but it somehow seems to work great... Every time I get an itch to tweak / refine it, it takes me a while to noodle my way through why I did what I did, and I usually end up just leaving it as-is.

If it works, it works!

Fair enough. I guess I was more thinking my use case - I can do it in 2 rule machine rules or one more complicated rule machine rule quite easily for what I am trying to do. Everyone's use case is different but I the more I think about it, I think my best option is actually rule machine as long as it doesn't take additional resources on the hub.

Also I think the reason mine is changing brightness even if the lights are already on is because it's a group of lights from Hue and I think room lighting just doesn't seem to like it for some reason. Works in RM though

Here's another similar pattern:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.