AnthemAVM Posted January 13, 2019 Posted January 13, 2019 I am looking to create a program or programs and could use some help. My lights on the side of the house come on at sunset and off at 10pm. What I would like is if it is after 10:01pm and the side lights are off, and the gate sensor is on(gate open) that the side lights come on for 5 minutes and shut off. The problem is this doesn't turn the lights off. Using this program to start. Gate On/Off Lights - [ID 0072][Parent 0016] If From 10:01:00PM To Sunrise (next day) And 'SideGate-Opened-Opened' Status is On Then Run Program 'Side Gate On' (If) Else - No Actions - (To add one, press 'Action') Which triggers this program. Side Gate On - [ID 0073][Parent 0016] If 'Exterior Lights / Laundry Room Exterior Light' Status is Off Or 'BBQ Island' Status is Off Then Set 'BBQ Island' On Set 'Exterior Lights / Laundry Room Exterior Light' On Wait 5 minutes Else Set 'Exterior Lights / Laundry Room Exterior Light' Off Set 'BBQ Island' Off
larryllix Posted January 14, 2019 Posted January 14, 2019 Why would your lights already be on after 10:00 PM? Manual switch or is there some other way / program that would turn them on?
AnthemAVM Posted January 14, 2019 Author Posted January 14, 2019 Why would your lights already be on after 10:00 PM? Manual switch or is there some other way / program that would turn them on? It would be that someone turned on manual switch. I don't want them to go off if someone turned on for a reason.Thanks for your help Larry. Sent from my SM-N960U using Tapatalk
larryllix Posted January 14, 2019 Posted January 14, 2019 (edited) Your first (trigger program) looks good. The second one should work like this. Side Gate On - [ID 0073][Parent 0016] If 'Exterior Lights / Laundry Room Exterior Light' Status is Off Or 'BBQ Island' Status is Off Then Set 'BBQ Island' On Set 'Exterior Lights / Laundry Room Exterior Light' On Wait 5 minutes Set 'Exterior Lights / Laundry Room Exterior Light' Off Set 'BBQ Island' Off Else Set 'Exterior Lights / Laundry Room Exterior Light' Off <------ needed for a change in statuses (2) terminating the Then section Set 'BBQ Island' Off Edited January 14, 2019 by larryllix
larryllix Posted January 14, 2019 Posted January 14, 2019 (edited) You may need a third program for the manual switch operation that cancels the time out and perhaps (for the just-in-case situation) provides a long term timer. Automatic lights get left on a lot when turned on manually. If control 'Exterior Lights / Laundry Room Exterior Light' is switched 'On' <---- control detects the paddleAND control 'Exterior Lights / Laundry Room Exterior Light' is not switched 'Off' <--------- Not runs the else Then set program 'Side Gate On' Stop <----- no interference with this program Set 'BBQ Island' On Set 'Exterior Lights / Laundry Room Exterior Light' On Wait 5 hours Set 'Exterior Lights / Laundry Room Exterior Light' Off Set 'BBQ Island' Off Else set program 'Side Gate On' Stop Set 'Exterior Lights / Laundry Room Exterior Light' Off Set 'BBQ Island' Off Edited January 14, 2019 by larryllix
oberkc Posted January 14, 2019 Posted January 14, 2019 (edited) 2 hours ago, AnthemAVM said: What I would like is if it is after 10:01pm and the side lights are off, and the gate sensor is on(gate open) that the side lights come on for 5 minutes and shut off. The problem is this doesn't turn the lights off. What are "side lights"? Is it the laundry room exterior lights? BBQ lights? Both? Either? What if someone manually turns on the BBQ lights but does not turn on the exterior lights, what do you want to happen: timer or no timer? What do you want to happen if the timer is already in progress, THEN someone manually turns on one or both of the lights? Depending on answer to the questions above, I would probably take a different approach than Larryllix. I would probably keep it two programs: If From 10:01:00PM To Sunrise (next day) And 'SideGate-Opened-Opened' Status is On and ( 'Exterior Lights / Laundry Room Exterior Light' Status is Off Or 'BBQ Island' Status is Off <<<<<<<<<<<<<<<<<this may need changed to AND depending on your answer to my first question ) Then Run Program 'Side Gate On' (then) Else - No Actions - (To add one, press 'Action') If nothing Then Set 'BBQ Island' On Set 'Exterior Lights / Laundry Room Exterior Light' On Wait 5 minutes Set 'Exterior Lights / Laundry Room Exterior Light' Off Set 'BBQ Island' Off Else nothing Edited January 14, 2019 by oberkc
larryllix Posted January 14, 2019 Posted January 14, 2019 @oberkc That's what I was eluding to, but I was trying not to complicate things just yet, by combining the logics, and I was hurrying to provide an answer. (excuse, excuse) Then the manual lock on / turn off and cancel comes in. The whole thing looks too complicated now and I don't like that, but comfort comes with familiarity. Being more familiar with the light placements would help understand the logic needed to provide better answers and logic. I have found simpler programs for more lights usually works better down the road when I come back and wonder WTF did I do?
oberkc Posted January 14, 2019 Posted January 14, 2019 8 hours ago, larryllix said: That's what I was eluding to, but I was trying not to complicate things just yet, by combining the logics, and I was hurrying to provide an answer. (excuse, excuse) I have always felt that many underestimate the nuances of these types of automation programs. This is definitely a scenario that is worth thinking about in terms of requirements before programming. I agree with you that better understanding of the lights and requirements is needed to provide better answers. The program I proposed, for example, would not halt itself should someone manually toggle the lights while the timer is running (not sure whether this is important or not). I suspect this program will get more complicated still as AnthemAVM thinks further about what he wants to accomplish. 1
builderb Posted January 16, 2019 Posted January 16, 2019 I’ll offer this as an example of an override I use. Might be helpful in your situation. My porch lights turn on via motion sensor, and after a minute not sensing motion, the ISY turns them off. However, there are times when I want to keep the porch light on (guests coming, etc.). So if someone uses the physical switch to turn on the porch light, I also have the ISY disable the one minute timer program that turns the light off. The motion sensor still sends on commands when it senses motion, but that’s fine, the light is already on. Then, when the switch is physically turned off, the timer program is reactivated. I also have a 6 hour timer on the on/disable command to ensure that even if someone *ahem* forgets to turn the porch light back off, it will restore itself to normal function without intervention. 1
larryllix Posted January 16, 2019 Posted January 16, 2019 11 minutes ago, builderb said: I’ll offer this as an example of an override I use. Might be helpful in your situation. My porch lights turn on via motion sensor, and after a minute not sensing motion, the ISY turns them off. However, there are times when I want to keep the porch light on (guests coming, etc.). So if someone uses the physical switch to turn on the porch light, I also have the ISY disable the one minute timer program that turns the light off. The motion sensor still sends on commands when it senses motion, but that’s fine, the light is already on. Then, when the switch is physically turned off, the timer program is reactivated. I also have a 6 hour timer on the on/disable command to ensure that even if someone *ahem* forgets to turn the porch light back off, it will restore itself to normal function without intervention. Yes those all-else-fails timers are important with HA. People get to expect lights to turn themselves off and forget they turned them on manually. I use that with voice commands also. With the low powered LED bulbs these days it is not so critical though. 1
oberkc Posted January 16, 2019 Posted January 16, 2019 5 hours ago, builderb said: I also have a 6 hour timer on the on/disable command to ensure that even if someone *ahem* forgets to turn the porch light back off, it will restore itself to normal function without intervention. You do the same thing that I do, except here. Mine revert to "normal" function at dawn. 1
oberkc Posted January 16, 2019 Posted January 16, 2019 5 hours ago, larryllix said: People get to expect lights to turn themselves off and forget they turned them on manually. My wife is one of those. She claims not to have to turn off lights because they are automated. The problem is also that she gets concerned also when I use geofencing to determine whether she is home (it is creepy, apparently). Between a rock and a hard place. 1
builderb Posted January 17, 2019 Posted January 17, 2019 15 hours ago, oberkc said: You do the same thing that I do, except here. Mine revert to "normal" function at dawn. Did you use a separate program to reset it at dawn? As I recall, I put it on a timer because it was as easy as adding a couple lines to the "then" statement.
oberkc Posted January 17, 2019 Posted January 17, 2019 Yes. I have a backup program that turns lights off at dawn and, among other thngs, resets the motion programs. 1
AnthemAVM Posted January 30, 2019 Author Posted January 30, 2019 (edited) Hi Guys, Thanks very much for all your help on this. What I am trying to accomplish is if someone opens the gate after the backyard lights go off at 10pm, that they go on and off after a few minutes. Thanks again for your input and excited to see if I can get this to work. I have many more ideas based around this concept, so it was really helpful. Michael Edited January 30, 2019 by AnthemAVM
Recommended Posts