Moving some lighting rules to the RL app. Question about using a variable to override a time schedule

I'm only just starting to fool around with RL. Is there a way to set it to follow a schedule, but then have the schedule overridden if a certain variable is set? For example, maybe a variable for sleeping that gets set by a goodnight routine that also turns off all the lights. So it's be maybe morning, day, night with schedules that start and end at certain times, but then if the isSleeping variable is true it has it's own settings completely independent of the schedule?

Another one I am trying to setup is a similar thing but a variable that indicates ones of the kids has gotten out of bed to pee. I want to override the normal schedule to set the lights a certain way.

I'm thinking maybe the best way to do it is have 2 instances of RL for the same room. I see there is an option to limit activation of a variable is true or false. That means I would have to setup a RL instance for every room I want to control where the lighting levels would be different if the isSleeping variable is true.

This is what I am trying to recreate. I currently use a private boolean. One reason I want to move to RL is that sometimes the PB gets stuck to true and I'll get a text from my wife in the middle of the day saying the bathroom lights stopped coming on. Oh, I should mention that the exhaust fan has a nightlight built in and it works better for the kids than just dimming the main lights. That's why I want to override the schedule.

Also, bonus question, how do I recreate the effect of having the light slowly starting to dim as the time runs out and then if movement is detected, going back to the brightness it was before. Right now I take advantage that every time movement is registered, the event triggers the rule.

Yep, there is no other way to do this.

1 Like

Okay, I thought that might be the case. After thinking about it, the 2 bathrooms are really the only rooms I think I might want to override. So having duplicate RL instances for them isn't really a big deal.

I'm trying to figure out how to replicate the section in my rule where movement has been inactive for a while and the light slowly dims down to 18% over a 10 second period, then waits an additional 20 seconds and if there has been no movement the light turns off.

I think I have it basically figured out. I went to turn off light options and under alternate turn off methods set it to use a preset. I went to the periods section and set it to 18% to match my rule.

I thought the answer was going to be enter 10 for the transition time and then 20 for the grace period, but if I enter a number into the transition time it pops up another text box for a "transition step interval"

I'm a little confused as to what will actually happen here. What are the 2 different times doing and how do they interact?

Total time and time per step. with 10 and 5, it would make 2 steps. With 10 and 1, it would make 10 steps.

Got it. I think. So if it were going from 100% to 20% and the settings were 10 and 5... It would drop to 60% after 5 seconds and then 20% 5 seconds later and then wait 20 seconds and turn off. Presumably motion would jump it back up to 100%.

Are there performance reasons to keep the number of steps low? Like, is each step a command sent to the device? Or does it send a single command that says "Dim to 20% over the next 10 seconds"

It all depends on what you have going on. Generally, doing something once a second is no big deal. But, also, you probably can get by with every few seconds for a short transition, and even longer for a long transition. RM does send a command to the device to dim over the interval time, but not all devices implement that. It will send a setLevel command for each step. Turn on action logging, and see what it does in the logs, and see what it does with the light.

1 Like

Alright. Thanks for the help.

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