[NEW APP] Room Lighting

See the update to my prior post. I don't think this is doable to get what you want in Room Lights.

What's the difference, then, between "don't activate if turned off manually" — which is available — and "don't activate if turned on manually"? Both, it seems to me, say to RL ignore the state if I override it manually.

And that's what I want. I want RL to automate the state as I've specified it, unless I override that state by doing the opposite manually.

What about changing "don't activate if turned off manually" to "don't activate if overridden manually" which would handle both?

I'm doing something very similar and glad I was able to find this post. A couple of comments:

  1. "Stays Off Pending" (as is the phrase in the current app) is not particularly descriptive IMO. I think something like "Off Timer Pending" or "Elapsed Time to Off Pending" is easier to tie to the "Elapsed time" selection for Means to Turn Off. Unless "Stays Off Pending" applies to other means?
  2. The combination of Means to Turn Off and Conditions to Limit Turning Off essentially turns the multiple means into an "All Off" condition for all the timers (similar to the All selection for motion and contact sensors). Which is exactly what I was looking for but was not able to easily figure out. I suggest this behavior/information to be added to the documentation, that I realize is a WIP.

All in all I'm very pleased with this app. This was the last of my lighting RM rules to port over to RL.

These options apply to the entire automation, while you want it to apply only to a single device. That's a problem. You don't want the automation NOT to activate at all, you only want it not to turn off that one device. As if you had an option (which there isn't) to 'Don't turn off devices upon Activation if already turned on'.

OK. I see that. Let's assume there's only this one device in a RL app, and it's set up like my ceiling light... on during day with motion, off during evening/asleep. Is there a way to override that single device so that if I manually turn it on in the evening, it stays on until I manually turn it off?

Yes this is what I do. You can have a hub variable used to limit or disable turning off.

Then in RM when the trigger switch is controlled you turn on the light and set the HV to true. Then have a wait for event off then set the HV to false and set the variable to false if you flip the switch the other way.

Thanks. I use to have this set up in RM and I know how to do it there.

I'm specifically asking if it can be done in Room Lighting without help from Rule Machine.

@bravenel thanks again for your patience, Bruce. I think I've figured out a way to do what I'm trying to do.

If I set RL up like this for Evening:

The ceiling lights are not turned off if I turn them on via the switch. But they are turned off, along with the side lamps, when motion stops. So that will work for my "I need more light" use case.

It also means that the ceiling lights will not turn off when the mode changes, and that's a little annoying. But I can add that into my mode change rules in RM so that use case can be handled also.

It's not ideal but it's going to work, I think, and I'm good with that.

Thanks again.

2 Likes

Room lighting is really awesome but I think I found something that doesn't make sense. I have modes defined for one room (day and evening) and preset-off (but I didn't have modes specified for the preset-off which may be the issue)

Mostly this is to stop my cats activating the lights all night (during night mode). At 2am, the motion sensor was activated and the app correctly noticed there was no mode so it didn't turn on the lights, but then when the motion sensor stopped, it set the lights to the preset-off. Unfortunately, 30 seconds later (for my delayed off) it didn't turn the lights off because the mode was wrong.

I think if I define preset-off per mode this might fix it but I feel that it should check for the mode on all 3 operations (on, preset off and off) and maybe that check isn't in the code path for preset off?

2022-11-12 02:15:34.755 AM info Office Lights not Active
2022-11-12 02:01:04.906 AM info Office Lights not Active
2022-11-12 02:01:01.769 AM info Grace period before off: 30 seconds
2022-11-12 02:01:01.752 AM info setLevel: Office Tripod Lamp, level: 50
2022-11-12 02:01:01.714 AM info setLevel: Office Ceiling Lights, level: 10
2022-11-12 02:01:01.636 AM info Activating Preset Off
2022-11-12 02:01:01.623 AM info Turn Off Event: 'Office Presence Sensor' motion inactive
2022-11-12 02:00:32.295 AM info Activation prevented due to wrong mode
2022-11-12 02:00:32.294 AM info Activation Event: 'Office Presence Sensor' motion active
1 Like

A screenshot of the RL setup will likely help...

But to expand on your post, am I right in thinking you don't want an activation during a disabled period to produce an "off" event when the RL setup is enabled....?

During a disabled period I do not want to to activate the preset-off which it is doing currently. It makes no sense for it to activate that preset during a disabled period since it never turned the lights on to begin with because that was a disabled period :slight_smile:

I have been... grappling... with this lately myself.... But I would say it eventually makes sense and is a logical setup....

So.... I would suggest showing a screenshot of your RL app in a disabled period. Admittedly you are likely to need to produce this outside of the normal automations.... But ultimately it will likely tell the story of where the issue is.... Wow... That sounded more complicated than in needed to be....

If you can provide us with a screenshot of the App when the issue occurs, it will make things easier.... :slight_smile:

1 Like

Do you by any chance have the "Turn off even if already partially off" turned on under "Turn Off Lights Options"? If that is on, that will turn off the lights even though they are already off and that will cause your preset-off to activate.
image

1 Like

I have the turn off if already partially off enabled as shown above however I just tried disabling that and it appeared to make no difference. I can work around it by using the pre-set per mode option it seems because then it can't set the preset lights because it doesn't have a preset-off for that mode which solves my problem :slight_smile:

Here is the log from when I turn that option off showing it set the lights to the preset, then wouldn't turn them off. Notice the last (top) line happens after the 30 second delay that seems to be wanting to turn them off but realizes the mode is wrong. It seems to me the same logic should be in the part of the code that activates the preset-off which doesn't seem to check that the lights are not in active mode right now.

2022-11-12 11:05:37.731 PM [info] Office Lights not Active
2022-11-12 11:05:34.029 PM [info] Grace period before off: 30 seconds
2022-11-12 11:05:33.975 PM [info] setLevel: Office Tripod Lamp 💡, level: 50
2022-11-12 11:05:33.852 PM [info] setLevel: Office Ceiling Lights, level: 10
2022-11-12 11:05:33.763 PM [info] Activating Preset Off
2022-11-12 11:05:33.756 PM [info] Turn Off Event: 'Office Lights (Active)'
2022-11-12 11:05:29.196 PM [info] Activating for Night
2022-11-12 11:05:29.189 PM [info] Activate from 'Office Lights'

If I change to using preset per mode, then the log is different, it doesn't manage to turn on any lights (which is good since there isn't a preset for night and this is my workaround)

2022-11-12 11:13:22.431 PM [info] Grace period before off: 30 seconds
2022-11-12 11:13:22.401 PM [info] Activating Preset Off for Night
2022-11-12 11:13:22.394 PM [info] Turn Off Event: 'Office Lights (Active)'
2022-11-12 11:13:19.583 PM [info] Activating for Night
2022-11-12 11:13:19.577 PM [info] Activate from 'Office Lights'

In reproducing this, I don't see it failing. When I try this, if it's in the wrong mode, it won't Activate the lights, and it won't Turn them off from motion inactive, so it doesn't set the Preset Off or run the Grace Period. First mystery is why yours went to turn them off from motion inactive, and one possibility for that is that the app was still Active (even with the lights off). If you're using the same Preset Off for every mode for which it is Activated, you don't need Preset Off Per Mode.

BTW, when you are posting logs, use screenshots, not copy/paste.

In the first set of logs, you show the Grace Period starting at 11:05:34, and the next log entry is 3 seconds later. It's not clear that has to do with the Grace Period, whose 30 seconds haven't run yet at that point. In both logs, we don't know what happened (if anything) 30 seconds later. Hard to show something that doesn't happen, I know. But it leaves a bit of an unknown here.

To figure out what is going on you have to quit trying different things, and stick to just one. You can force these events by manipulating modes manually. You can also force motion events by creating and adding a virtual motion sensor that you can set to active or inactive.

I'm going to add more logging to the app for Grace Period, so it logs when it's over (even if for whatever reason it doesn't actually turn off the lights then).

I set up a test environment and you were right, if the option "Turn off even if partially off" is selected ON then it behaves as I saw with the preset. If I turn that off, then it does as you describe and everything is as expected.

Test 1 (with option selected)

Test 2 (with option not selected)


What's the easiest way to not have my garage lights turn off if my consumption meter is above a certain power level (plug connected to workout bike). I'm trying to add something underneath "Limit turning off under these conditions". Now that summer is over my garage door is usually closed while I workout hence that alone can't be used as a limiter.

Is a simple motion sensor too primitive?

I'd setup a rule in RM or similar app to toggle a switch while the power is elevated, then use the switch in Room Lighting

I am having multiple issues with a group that previously worked . Once I swapped out the bulbs from Wiz to Sengled it became unresponsive to commands.

I'm having issues controlling the group with BC and the actual device page for the group. I can activate and Turn OFF the group using RL. I posted it in another thread, but I believe this is more a RL/BC issue. In the groups device page, it shows the status that it's ON or OFF and also in RL it shows that the bulbs are ON in the capture table. Even in the events logs, it shows the commands were sent. But physically they never switched on or off. Here's a screenshot of my RL setup for the group.

Summary

Also, another strange bug is while I was messing around wit the RL group, I decided to see if I can add button push as an activation method along side the activator device. Accidentally I clicked add button 3x on my wife's button and now the additional button options aren't removeable. Just spins when I click remove. Made a quick GIF of the issue in action. Can't remove buttons