For Location Trigger tips & tricks visit our new website at this link.
One of the most popular triggers provided by AutomateIt is the Location Trigger.
Let’s start with a quick overview of the different controls on the location trigger configuration screen:
- Arrive at location – Notice that the location trigger defines âInside or Enteringâ or âOutside or Exitingâ a proximity region around a location. if you are inside the proximity region and defining a rule of “Inside or Entering” a proximity region, it will trigger immediately (dependent on other parameters as explained below). Same goes for defining a rule of “Outside or Exiting” a proximity region when you are already outside of that region.
- Allow Coarse Accuracy/Use GPS – Select the appropriate location providers for your needs. if just a general location is required, it’s safe to allow coarse accuracy. If a more accurate fix is required, uncheck this setting and only use the GPS. The level of accuracy for different providers varies significantly depending on available cells in your area, moving speed etc.
Tip:Â I use the following guidelines for location provider accuracy (values are based on my personal experience while developing this application):- Network location provider (using cell location) accuracy varies from 200 meters to 2000 meters
- When connected to Wifi network location estimated accuracy is ~100 meters
- GPS accuracy can be estimated as 3 meters to ~50 meters (especially when you are moving fast)
- For more details on location providers and fix accuracy, click here.
- Location Sampling Rate -Â Sampling rate is the time interval the application wakes up to check the device location.
Tip: Use short interval to be more responsive at the expense of activating the location provider(s) more frequently, thus, exhausting your battery (especially when there is no GPS reception) or longer intervals to balance your battery usage. - Proximity Radius – By default, this is taken from the application settings (see below). make sure you select an appropriate radius as recommended for the selected location providers (as defined for “Allow Coarse Accuracy“).
New Feature on version 1.16.0 – Since version 1.16.0 each rule stores its history so you can keep track of events related to your rules (for more details on this feature click here). Rules with location triggers have a more detailed history log:
This log shows the recent events for the rule “Turn on wifi at home”. You can see that all GPS related events are shown in cyan and all network location events are shown in white.
By looking at this log we see that the location trigger requested location update on 20:45:49 from both GPS and network (two bottom events), received location from network provider 2 seconds later and triggered the rule. At 20:46:19, which is exactly 30 seconds after the first event, the GPS timed-out since we didn’t receive any location update (I was indoors when creating this demo).
To better understand the “Is Inside Target Region” response which might be Yes, No or Unknown, take a look at the following diagram (click on the image to enlarge):
One Interesting feature is that once a location is received, you can click on the hyperlink (the coordinates on the screenshot are smudged) and show it on Maps application or using the Browser:
This log can be very useful to better understand and fine-tune your location triggers since it shows you each location received, level of accuracy and the distance to your defined location. Here is a list of all events related to location triggers that you might see on your rule history log:
- Start waiting for location (provider=GPS/Network, timeout=XX)
- Location received (provider: GPS/Network) – Includes location details
- Location provider timeout. no location received (provider=GPS/Network)
- Location provider enabled/disabled (provider=GPS/Network)
AutomateIt Location Trigger - Tips and Tricks