AutoLocation Get Previous GeoFence

Discussion in 'AutoApps' started by The_Fonz, Oct 12, 2018.

  1. The_Fonz

    The_Fonz Member

    Joined:
    Sep 21, 2016
    Messages:
    37
    Likes Received:
    0
    Is it possible to get a previous GeoFence without populating a variable?
    Hoping to be able to see if I was at home in the last 5 minutes so that when I'm driving AWAY from home it doesn't open the garage door, and only works if I've been in an unknown location in the last 5 minutes.

    (Issue is that the Monitor Location Tasker profile activates via AutoLocation GeoFence when driving away from the house, which then enables 'AutoLocation Activies' monitoring which will sometimes trigger the Garage Door Open Tasker profile and subsequent tasks. I only want these to trigger on the way home.)

    Cheers
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi! Can you please clarify what you mean by "get a previous GeoFence"? Do you mean get the previous status of a geofence? Like a log?
     
  3. The_Fonz

    The_Fonz Member

    Joined:
    Sep 21, 2016
    Messages:
    37
    Likes Received:
    0
    Yeah, so:
    If I'm home the geofence & Tasker Variable will be HOME
    If I'm somewhere unknown none of the geofences are on, so my Tasker location variable is UNKNOWN
    If I've just left home and am driving away my Open Garage door profile will activate because I'm driving through the profiles to activate it, but i dont need my garage door to open as I'm leaving, only when I'm driving towards my house.

    There for:
    If Previous location (in last 5 minutes) was HOME do NOTHING
    If Previous location (in last 5 minutes) wasn't HOME do OPEN GATE.

    Does that make sense?
    It sounds like it would be too hard as I would need to read logs?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi again.
    Can you please export your profile's description (not xml) so I can take a look? Long-click the profile in Tasker->export description Thanks in advance
     
  5. The_Fonz

    The_Fonz Member

    Joined:
    Sep 21, 2016
    Messages:
    37
    Likes Received:
    0
    Profile: Gate: Open: At <StreetName>(69)
    Priority: 43
    State: AutoLocation Geofences [ Configuration:Geofence Name: <StreetName> Open Gate
    Status: Inside ]
    State: AutoLocation Activities [ Configuration:In Vehicle: true
    Min Confidence: 25
    Ignore On Foot: true
    Ignore Walking: true
    Ignore Tilting: true
    Ignore Unknown: true ]
    Enter: Open Gate (75)
    A1: AutoRemote Message [ Configuration:Recipient: FonzStore
    Message: opengate Timeout (Seconds):200 ]
    A2: AutoTools Toast [ Configuration:Text: Opening Gate
    Text Size: 20
    Background Color: #000000
    Offset Y: 0
    Offset X: 0
    Gravity: Top
    Icon Size: 30
    Long: true Timeout (Seconds):60 ]
    A3: Say [ Text:Opening Gate Engine:Voice:default:default Stream:1 Pitch:5 Speed:5 Respect Audio Focus:Off Network:Off Continue Task Immediately:Off ] If [ %HEADSETPLUGGED eq True | %BTDEVICE Set ]

    Hope this helps
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Oh I see.
    Maybe you can have 2 profiles:
    • Profile 1 only has the AutoLocation Geofences state and sets %Home to %TIMES (this will set the %Home variable to the current time in seconds)
    • Profile 2 is the one you have and only opens the garage door if %TIMES - %Home is smaller than, say, 300 (300 seconds = 5 minutes)
    This way the garage door will only open if you're in Home geofence for less than 5 minutes :)

    Let me know what you think.
     
  7. The_Fonz

    The_Fonz Member

    Joined:
    Sep 21, 2016
    Messages:
    37
    Likes Received:
    0
    This should put me on the right path! thanks for that :D
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Glad to help! :)
     

Share This Page