Code: Select all
ENTERING:
1) "Geofence Service Boundary" Trigger - Location: entering Home (r: 1500)
a) Execute Flow: “Location Scan” Trigger: Periodic Location Update / High Accuracy / Frequency: 5s
2a) "Geofence Arrival Boundary" Trigger - Location: entering Home (r: 120)
a) Stop Flow: “Location Scan”
b) Script: global_me_home = true
2b) “Home WiFi Connect” Trigger: WiFi Connected (your home WiFi SSIDs)
a) Stop Flow: “Location Scan”
b) Script: global_me_home = true
EXITING:
1) “Home WiFi Disconnect” Trigger: WiFi Disconnected (your home WiFi SSIDs)
a) Execute Flow: “Location Scan” Trigger: Periodic Location Update / High Accuracy / Frequency: 5s
2) “Geofence Departure Boundary” Trigger - Location: exiting Home (r: 400)
a) If WiFi NOT Connected (your home WiFi SSIDs)
(1) Script: global_me_home = false
3) "Geofence Service Boundary" Trigger - Location: exiting Home (r: 1500)
a) Stop Flow: “Location Scan”
When leaving, I start the Periodic Location Update when my WiFi disconnects. Then when I leave a 400m radius, I set myself to NOT HOME, and at 1500m I stop the Periodic Location Update.
My biggest question is, am I getting the benefit from the Periodic Location Update that I think I am? As I understand it, the Location trigger only updates roughly every 4 minutes. My assumption is that, by running the Periodic Location Update with a 5s frequency, I'm force-feeding the Location trigger updates, and therefore the Location triggers should fire within a few seconds of me crossing their border, rather than within a few minutes of doing so.
My intent is to use this to control some of my home automation (SmartThings based) stuff based on arriving and leaving home, which is why I want the more precise geofencing here. Am I understanding this behavior correctly? Does anyone have a better approach for this?