Jump to content

Geo Fence Light Control


tommet

Recommended Posts

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

Link to comment

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

.......

Link to comment

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.)

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...