tracknut Posted March 7, 2014 Share Posted March 7, 2014 I'm trying to put together a program that can be initiated by a KPL button push, to simulate someone being at home (via lights going on and off). Here's what I have so far: If From Sunset To 11:00:00PM (same day) Then Set Scene 'sDave's Desk' On Wait 1 minute Set Scene 'sGwen's Desk' On Wait 2 minutes Set Scene 'sDave's Desk' Off Wait 1 minute Set Scene 'sGwen's Desk' Off Else - No Actions - (To add one, press 'Action') All this is inside a folder that only allows program execution if a variable is set. That variable is set via the KPL. So far so good, but what's happening is that it all works correctly but only if the KPL button is pushed before sunset. If we leave the house after sunset, the program never runs. Any help would be appreciated! Dave Link to comment
LeeG Posted March 7, 2014 Share Posted March 7, 2014 The Program is triggered at Sunset. If Sunset has passed before Folder is True the Program is not triggered. Change the Folder condition to If Status kplbutton is On Add a test for the variable being set ANDed with the current Time range in the Program Link to comment
tracknut Posted March 7, 2014 Author Share Posted March 7, 2014 That help trigger it, thanks. Then the problem becomes how to get the lights timed right. What I'd like to have, as an example, is my den light comes on from 7-9pm, Gwen's den light comes on from 8-10pm. If I knew the program was going to run exactly at sunset, I could do it via "wait" as I've shown. But now when I can trigger the program at 8pm if I leave the house, it would be nice if it jumped in halfway into the sequence with both lights on, rather than starting the sequence then and having the last light turn off around 2am. I hope that makes sense. If there was a "wait until 7pm" or "wait until 3 hours after sunset", that would be what I have in mind. Dave Link to comment
LeeG Posted March 7, 2014 Share Posted March 7, 2014 It will require separate Programs for each area. Same type of trigger, just different times. If totally past the time range nothing happens. If within a time range the variable will start the process and the To time ends it. If before the time range nothing happens until the From time is reached. If $statevar is On And From 7 PM To 9 PM Then Set Scene .... On Else Set Scene .... Off If $statevar is On And From 8 PM To 10 PM Then Set Scene .... On Else Set Scene .... Off Link to comment
jmed999 Posted March 7, 2014 Share Posted March 7, 2014 This is the way I do it... If $s.Random.Lights is 1 Then Set 'Insteon Bulb 1' 50% Wait 10 minutes (Random) Set 'Insteon Bulb 1' Fast Off Wait 10 minutes (Random) Set 'Insteon Bulb 2' 50% Wait 10 minutes (Random) Set 'Insteon Bulb 2' Fast Off Wait 10 minutes (Random) Set 'Upstairs CFL Lamp' 50% Wait 10 minutes (Random) Set 'Upstairs CFL Lamp' Fast Off Wait 10 minutes (Random) Run Program 'Random Lights2' (Then Path) Else - No Actions - (To add one, press 'Action') Random lights changes to 1 when the Elk is armed away and between sunset and sunrise. All those bulbs are LEDs or CFLs. Link to comment
tracknut Posted March 8, 2014 Author Share Posted March 8, 2014 Looks like it's working with your help guys. Thanks much. Link to comment
Recommended Posts