tommet Posted February 17, 2014 Posted February 17, 2014 The following program is set so that when I get home and its between sunrise and sunset the rear pole lamp goes on for 3 minutes and then shuts off. However if I arrive home prior to sunset and remain home after sunset the program also triggers. Is there some way to avoid this. I want it to trigger if I arrive home after sunset and not trigger if I arrive home before sunset and remain home. $My_iphone_home is a geo fence variable controlled by Mobilinc on my iphone. If $My_iPhone_home is 1 And From Sunset To Sunrise (next day) Then Send Notification to 'Text Message' content 'My Home' Set Scene 'Scenes / Outside Rear Pole Lamp' On Wait 3 minute Set Scene 'Scenes / Outside Rear Pole Lamp' Off Else
TJF1960 Posted February 17, 2014 Posted February 17, 2014 My first though was to create a second program and integer variable: If From sunset To sunrise Then Set integer variable 1 Else Set integer variable 0 Then replace the from sunset to sunrise in your program with the integer variable: If $myiphone home 1 And integer variable 1 Then .......
oberkc Posted February 17, 2014 Posted February 17, 2014 My assumption is that your program is triggering at sunset. The question, then, is how to set up the program with the same conditions, but does not trigger at the from/to times. This is what I came up with: From Sunset To Sunrise (next day) Then run the programs in this folder In the folder, add a program: If $My_iPhone_home is 1 Then Send Notification to 'Text Message' content 'My Home' Set Scene 'Scenes / Outside Rear Pole Lamp' On Wait 3 minute Set Scene 'Scenes / Outside Rear Pole Lamp' Off TJF1960 version would work as well, I expect. Beware....I expect your program has another hole. What happens if you leave home (or sunrise occurs) during the 3 minute wait? (hint: the light may not turn off.)
Recommended Posts