Elvis Posted February 24, 2023 Share Posted February 24, 2023 Seems like I remember putting a Delay in code in Composer is a bad idea. Like a Delay of 15 minutes -- going to freeze up the controller? Was considering using this in a motion event to delay turning the lights off. If I should avoid the Delay in code, what's the approved solution? Quote Link to comment Share on other sites More sharing options...
DLite Posted February 24, 2023 Share Posted February 24, 2023 1 minute ago, Elvis said: Seems like I remember putting a Delay in code in Composer is a bad idea. Like a Delay of 15 minutes -- going to freeze up the controller? Was considering using this in a motion event to delay turning the lights off. If I should avoid the Delay in code, what's the approved solution? The alternative is to start (or restart) a 15-minute timer and then turn the lights off when the timer expires. Quote Link to comment Share on other sites More sharing options...
msgreenf Posted February 24, 2023 Share Posted February 24, 2023 use an ALS...and delay the actions? Quote Link to comment Share on other sites More sharing options...
brucecampbell Posted February 24, 2023 Share Posted February 24, 2023 4 hours ago, DLite said: The alternative is to start (or restart) a 15-minute timer and then turn the lights off when the timer expires. Plus one for the timer option Dueport 1 Quote Link to comment Share on other sites More sharing options...
Elvis Posted February 24, 2023 Author Share Posted February 24, 2023 Where is the timer? Quote Link to comment Share on other sites More sharing options...
chopedogg88 Posted February 24, 2023 Share Posted February 24, 2023 Agents Quote Link to comment Share on other sites More sharing options...
Elvis Posted February 24, 2023 Author Share Posted February 24, 2023 17 minutes ago, chopedogg88 said: Agents Thanks. I forgot not all Agents show up by default. Added the Timer. Quote Link to comment Share on other sites More sharing options...
Neo1738 Posted March 12, 2023 Share Posted March 12, 2023 I have used small delays like 1 sec or even 1 or 2 min for some programming. Never had issues. I can see why you don't want a bunch of delays (like 20 motion sensors) as you walk through the house as multiple could hang it up. Quote Link to comment Share on other sites More sharing options...
chopedogg88 Posted March 13, 2023 Share Posted March 13, 2023 yes you really only should use delays for small increments such as 1-5 seconds. I always use the Timer agent for anything longer than that because it happens asynchronously. Quote Link to comment Share on other sites More sharing options...
Cyknight Posted March 13, 2023 Share Posted March 13, 2023 Another problem with a long delay like 15 seconds is also that it'll delay EVERYTHING behind it in programming whether you want it to or not. A 15 minute delay isn't going to lock up a controller as such - but it may 'hold' programming that is triggered after the delay is triggered. Honestly, delays are there really just to purposely slow a system down (ie add a 250ms delay between turning on multiple TV/zones to ensure the system doesn't get ahead of itself (it's physical output controllers) before moving on to change inputs on all of these and set channels etc). The only time I sue anything more than the MS setting is on the occasional room off for projectors (if I can't edit the driver to do this). Quote Link to comment Share on other sites More sharing options...
RyanE Posted March 13, 2023 Share Posted March 13, 2023 2 hours ago, Cyknight said: A 15 minute delay isn't going to lock up a controller as such - but it may 'hold' programming that is triggered after the delay is triggered. It will only hold up programming in the same event. If the event triggers again, I don't recall what happens, whether all the programming waits on the first delay or if it all executes up to the delay a second time. I don't particularly want to test it... If you do a 15 minute trigger on a particular event (let's say a motion sensor sensed motion), and you have other programming on a different event (say, a custom button triggered by a remote, or a *different* motion sensor sensing motion, etc.), it will execute normally. RyanE Neo1738 1 Quote Link to comment Share on other sites More sharing options...
Matt Lowe Posted March 13, 2023 Share Posted March 13, 2023 There is also the security light driver made to do just what you need. RyanE 1 Quote Link to comment Share on other sites More sharing options...
Cyknight Posted March 14, 2023 Share Posted March 14, 2023 7 hours ago, RyanE said: It will only hold up programming in the same event. Yes that is what I meant - I've 'cleaned up' a lot of programming where things were along the line of turn light on delay 15 seconds turn light off select cable box in room Where it was NOT the intend to wait 15 seconds for the cable box to turn on And yes I'm aware this is a matter of order of programming Quote Link to comment Share on other sites More sharing options...
RyanE Posted March 14, 2023 Share Posted March 14, 2023 11 hours ago, Cyknight said: And yes I'm aware this is a matter of order of programming I was not responding for you... I was clarifying for those who would not understand. I assumed you already knew how it worked... The blanket statement could have been read as it delaying all ComposerPro programming, although this, of course, would make delays virtually useless. Thanks. RyanE Quote Link to comment Share on other sites More sharing options...
Matt Lowe Posted March 14, 2023 Share Posted March 14, 2023 I also don't think anyone has stated it but delays should not be used for motion automation. They will not achieve the correct results you should use a timer or the appropriate driver. Neo1738 and RyanE 2 Quote Link to comment Share on other sites More sharing options...
Cyknight Posted March 14, 2023 Share Posted March 14, 2023 3 hours ago, RyanE said: I was not responding for you... I was clarifying.... Yes, I phrased it poorly and can see where it could be read that way for sure. Quote Link to comment Share on other sites More sharing options...
Neo1738 Posted March 16, 2023 Share Posted March 16, 2023 On 3/14/2023 at 12:07 PM, Matt Lowe said: I also don't think anyone has stated it but delays should not be used for motion automation. They will not achieve the correct results you should use a timer or the appropriate driver. Agreed, can't restart it if continues to sense motion with a delay. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.