Location trigger tips & tricks

One of the most popular triggers provided by AutomateIt is the Location Trigger.

Although defining such triggers is very intuitive, still there might be some tips and tricks that can make it even better.

This chapter will walk you through the basic settings of a common location trigger, emphasizing some features that could help you get the best out of this trigger.

Location Trigger Configuration

The trigger configuration screen has the following parameters:

Location Definition – Here you configure the desired location settings:

  • Location – Shows you the selected location coordinates and the configured proximity radius. By clicking the Globe icon the Map screen will be displayed allowing you to select location and set the proximity radius (see more details below).
  • Arrive at location – This checkbox allows you to set when location trigger will function – on   “Inside or Entering” or on “Outside or Exiting”, a proximity region around a location.

To better understand the “Is Inside Target Region” response which might be Yes, No or Unknown, take a look at the following diagram:

Now after this explanation we can write down few definitions that will conclude the subject:

  • Inside Region – When monitored location with accuracy radius is fully inside the target location with its proximity radius (green example above).
  • Outside Region – When monitored location with accuracy radius is fully outside the target location with its proximity radius (red example above).
  • Entering Location – When changing from “Outside Region” to “Inside Region”.
  • Exiting Location – When changing from “Inside Region” to “Outside Region”.

Note: When using the location trigger alone it will monitor Entering/Exiting the location. When using it in a composite trigger with another trigger (for example incoming call at home location) it will monitor Inside/Outside the location.

Location Providers – These settings allows you to define which location provider to use. Only enabled location provider on your device will be used.

  • Use GPS – Allows AutomateIt to use your GPS (if it is enabled on your device) for checking location and match with configured proximity region.
  • Allow Coarse Accuracy – Check location by using the network provider. 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: We recommend the following guidelines for location provider accuracy:

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

Sampling Rate – Location 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.

Map Screen – AutomateIt uses the standard Google Maps allowing you to set your desired location. You can operate this map screen as usually with Google Maps with zoom icons (appears when touch the map gently) and fingers (slide to move the map or pinch to zoom in/out).

  • Map Menu – This menu/toolbar allows you to Search locations, toggle to Satellite View or jump to Last Known Location.
  • Proximity Radius – This parameter sets the proximity region circling the selected location. Default value sets in 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“).

Tip: Define a proximity radius that is the maximum reasonable for your needs (I use 1500m for most rules using coarse location).

Note: When defining different parameters for this trigger keep in mind that it will be activated once it can be determined with 100% certainty that you are inside/outside the defined region, considering the accuracy level of the fix. For instance, let’s say the proximity radius is defined as 10 meters and the fix accuracy is 40 meters – in such case even if the fix location is exactly the center of the defined region, the trigger will not be activated since it can’t be guaranteed that you are indeed inside/outside the defined region.

Location Trigger Settings

Some of the default values for settings described above can be set from the settings screen:

Location Provider Timeout – Defines an upper bound for trying to get a fix for location provider. In case the location provider does not get a fix after this time has passed, it will stop trying to get a fix until the next time defined by “Location Sampling Rate“.

On the other hand, once a location provider gets a fix, it will not keep waiting until the defined timeout but it will stop immediately.

This setting is mainly used to conserve battery so feel free to adjust this setting to your needs.

Tip: Don’t push this setting too high (could drain your battery) or too low (could be too short to get a fix).

Use Coarse Location – Default value for “Allow Coarse Accuracy” when defining new location trigger. This does not affect existing rules.

Use GPS Location – Default value for “Use GPS” when defining new location trigger. This does not affect existing rules.

Proximity Radius – Default value for “Proximity Radius” when defining new location trigger. This does not affect existing rules.

Sampling Rate – Default value for “Location Sampling Rate” when defining new location trigger. This does not affect existing rules.

Last Tip: Avoid setting a “Location Sampling Rate” that is shorter than the “Location Provider Timeout“. This will cause the location trigger to constantly request location updates.

Location Trigger History

Rules with location triggers have a more detailed history log than all other triggers:

This log shows the recent events for the rule “Turn on wifi at home”. You can see that for each received location we log the provider type (network or GPS), the accuracy of the provider fix, the distance from target location and if it is inside target region (Yes, No or Unknown). We can also see the timeout between sampling (in this example, 30 seconds).

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