[NEW APP] Room Lighting

Perfect, thank you for the clarification! I have a couple more questions about rules not behaving the way I want them to, but I’ll post those in a separate thread. Thank you!

1 Like

I may have found a bug… I have “Adjust lights on time period changes” set on another automation, but it ends up turning on the lights at the time period change even though the lights were previously off. This is different than how you mentioned that setting should work. You mentioned it should only adjust them if they were already on, not when they’re off, right? Screenshots attached.



My guess is that the app thought it was active. So the question may be why would it think that. Your screenshots don't show the top border of the app window, where it shows (Active) in green.

I have no way to tell from what you've shown, but I do know that the code only activates on the Time Period change if the app internally has an active state. If the lights were turned off from some other mechanism outside the app after it was Activated, it would still be active. You could add both of those lights to this option, on the Turn Off Options page:

With that, even if something else turns those lights off, that would make the app no longer be active. Try that...

Sorry for cutting that off, but you’re right, it did say active. Not quite sure how it was activated, but I added both of those lights to that option like you mentioned. I have these lights linked to Alexa, so maybe that’s how they were turned off by someone else. Adding them to this “Select Switches That Determine All Lights are off” option would prevent this from happening again in the future if they were turned off manually or by another means, correct?

Here's the app:

1 Like

There is a known reported bug with Elapsed from Last Activation Event, see

This will be fixed in the next release.

2 Likes

Could you please clarify how this timer should work? Use case:

Consider contact opening has been set as the means to activate and timer set to 2 hours after last activation event has been set as means to turn off. The app is not active.

The contact opens and the lights turn on. The app is now active and the timer is set to turn off the lights after 2 hours.

The contact is opened and closed several times during these 2 hours while the app is still active and the lights are still on.

In that case, would it be expected that the lights will turn off after the first contact open event since that is the event that activated the app, or is it expected that the lights will turn off 2 hours after the last time the contact was opened, even though that contact open event wasn’t technically an activation event since the app was already active?

This is correct. There is a bug for this.

3 Likes

Thank you for clarifying :slight_smile:

1 Like

Fixed in last release earlier today.

4 Likes

Does anyone know how I manage lights when mode changes.

I have modes setup and my 'sunset' mode has all lights come on (1-8)
sleeping mode where half the lights come on (5&6)
Sunrise mode where no lights come on

When the lights are on and mode changes from sunset to sleeping, the lights 1,2,3,4,7 and 8 stay on and have to be turned off manually as they are no longer "active" as part of the mode

Have you configured those lights with “off” for sleeping mode (and “act” removed)?

If you cannot get it to work, while not being ideal, I’d suggest set up two RL apps - One app for lights 5 and 6 and the other rule for the others

This is what you need. The new room app is not the old motion app it more the scene app. So you are calling scenes or "presets" so you need to think really what you want it to look like in each mode. Rather than what you want to happen to some extent.

So if you in mode A want light 1 and 2 on you need to do a ON to 1 and 2 (plus's levels) but also light 3, 4 and 5 you need to turn off.

Personally and professionally I don't like the "scenes" direction, I can do it and understand it but it confuses customers and can be very confusing to anything more than basic control. It's very time consuming to do anything special, where as groups are much easier.

Example
You have a corridor with lights and PIRs along it.
You want lights in a turn on infront of you as the detector's are triggered either direction you walk in. This requires really complicated scenes and loads of them where as groups are really easy to do as each detector is just assigned to its local group plus the next either side of it.

1 Like
  1. Make sure the "activation" setting for the lights is set to "off" for the mode.
  2. Be sure to enable the "adjust lights on mode changes" option.

Is there potential to make this timer optionally irrespective of the activation event type? So regardless if it's motion, sunset, contact open, the timer can be used as a means to turn off after 'first' or 'last' [re]activation? A companion option could be/may have to be "honor original activation type" (for the 'first' case), so if it was originally a contact that activated, the 'from first/last event' would only pay attention to a contact? Seems this would eliminate the need to have multiple types of timers. I have a reasonable use case, which I'll detail below, that I just can't seem to find the combo of settings that work. Thanks in advance.

I sort of detailed this above, but I'll try to consolidate my thoughts. I have several contacts for my garage entrance: two people doors, two vehicle doors. I also have a motion.

Primary activation should be contacts - as not all contacts/entrances into the garage will trigger motion (wife opens the door to peek out to see if I'm out there, for example).

I often keep the side door or garage doors open when working in the garage. Thus I can't use the 'contact closes and remains'.

The other issue with this is the contact will turn on lights, but regardless if there's motion or not, the lights will turn off due to contacts being closed. I have to wait for motion to go inactive, then move, then lights will come back on.

Basically I'm looking for a way for lights to come on with contact open or motion, and turn of 10 min from last motion, or 10min from opening, in the case no motion was ever detected.


As I understand it, “elapsed time” is what you want as means to turn off. It will use whatever you have configured as “means to turn on” and start the elapsed time timer from either the first activation event, or the last depending on how you configure the timer. It doesn’t matter if it is motion or contact or switch or something else, it will work with any of them.

I use a combination of timers in some of my RL apps. If there is a motion sensor in the room I will use the “motion stays inactive” as one timer, but also adding the “elapsed time” to the mix for those instances where, like you mentioned, only a contact or a switch is activated but no one went in far enough to trigger the motion sensor. I set the elapsed time to a longer time than the motion sensor would use so that it is the normal motion sensor timeouts that would turn off the lights if motion was triggered.

1 Like

At first blush this is a bit complex, and not doable at present. However, I think there is a simple fix.

What's missing is a Condition to Limit Turning Off if there is a pending Stays Turn Off, such as waiting after motion as gone inactive. This would work for your case as follows:

Means to Turn On: Contact Open or Motion Active
Means to Turn Off: Motion Stays Inactive for 10 Minutes, or 10 Minutes Elapsed from first Activation Event
Conditions to Limit Turning Off: Motion Active, or Pending Stays for Off.

The possible cases:
Contact opens, and someone enters garage: Lights turn on, and motion goes active; lights will turn off 10 minutes after motions stops, but not 10 minutes after contact opened.

Contact opens, but no one enters garage: Lights turn on, and turn off 10 minutes later.

Door was left open, and the lights went out, then someone enters garage: Lights turn on, and turn off 10 minutes after motion stops.

I think that covers it. I think I can add the extra Condition to Limit Off for the next release.

3 Likes

This will be the third of fourth time I have started writing up what I thought was an error in room lighting and each time as I wrote it out and thought about it it got me to go back and look at options and realize why things were not working. I think this one might be a problem.

I can't seem to find a option that turns the rule off. Once activated It seems to stay active and it will not work again until I go in and manually turn it off. In the screen shot below it is still active even though two switches, Shop Alarm and the Shop lights are off. I added those to try and make sure that something would de-activate the rule. I have another rule, that I activate via Siri and a cloud endpoint that closes the shop. This turns off the lights and turns on the alarm switch. So I figured that should take care of a case where I don't activate the motion sensors. I thought maybe that was why it wasn't setting the rule not active and the lights would not turn back on. I am getting some errors, however, see below. I am on firmware 2.3.3.134, which I believe is the latest.

The room lighting rule:

The errors:

A couple of things:

Do not use the controlled devices (e.g. Shop Floor Lights) as either a Means to Turn On or a Means to Turn Off. This is circular logic and certain to fail. On my to-do list is to prevent that selection.

If you have lights that are turned off outside of RL, and that leave RL thinking its Active when it's not, there are two things you can do: One is to use the Turning Off Lights Option of "Switches that Determine All Lights Are Off":

Or you can use the Turning Off Lights Option of "Turn Off even is already partially off":

As for the error, it appears to possibly be related to something you removed from the app, that didn't get cleared out properly when removed. Specifically, this would have been a Condition to Limit Activation or Condition to Limit Turning Off. I would suggest that you hit Update in the app, and if the errors still persist after that, to remove the app and redo it.

1 Like