Simple, low power automated tracking of your device location using Tasker
Warning - Before Use
Use of your own location Profiles (which may include similar contexts) will confuse or cause undesirable results. Please backup disable/delete any similar contextual Profiles/Projects of your own during use… including previous versions of this project.
Development Update, December 30th 2016
Added: Network Location v6 beta 4 (see below)
I have received many requests via email and on the support thread from people using the Network Location project. For anyone new here that does not visit the Tasker forum - we are currently at Network Location version 6 beta stage. I will do my best to refresh this page with the most up to date information but my time is limited. Anyone wishing to get a history of the project should visit the support thread and read through.
Network Location - automated tracking of your device location using Tasker
Network Location provides simple, low power tracking of your device location using Tasker.
Automatically gathering and maintaining a current and updated database of network and mobile cell interactions required to enable you to quickly and easily automate your devices while connected to or within range of your many network locations.
You can track connectable networks or even nearby networks that you would never connect to. The project has the ability to seamlessly manage multiple overlapping networks switching between connections while always knowing where you are all automatically with no interaction.
The project automates the process of knowing your devices location allowing you to concentrate on the actions to be taken while arriving or departing each of your known network locations.
- Supports an unlimited number of WiFi networks.
- Provides an interface to add or remove known networks.
- Automates network hopping between several access points at the same location.
- User configurable settings such as debug logging and network detection parameters.
- Useful notifications when entering or exiting a known network (optional).
- Kid App ready, include your network tasks and export as a standalone network automation app.
- Create your own actions, set variables, define locations, toggle settings within a single task.
Easy to use
Once downloaded import the 'Network Location' Project into Tasker. Using the back key exit Tasker to save your changes. The project will now automatically begin tracking your networks with no further interaction required.
You can create project compatible 'mywifi' task(s) and perform your own custom actions when entering or exiting each of your respective networks. See 'Understanding your 'mywifi' Task Structure'.
Network Location Updates
Updating from an older version of the Network Location project?
To update - open Tasker, delete the current Network Location project (do not exit) next import the new update and finally exit Tasker using the back key. Updating this way will retain your data.
Network Location - v6b4
Highlights: Auto WiFi Connect, Network Hopping and Scheduling of network scans (experimental).
Network Location - Requirements
Minimally Android Version 4.3 is required by the Network Location project. This is due to the lack of required features in older firmware versions.
Advanced WI-FI settings "Keep WiFi On During Sleep" should be set to "Always".
Detection of nearby networks requires WiFi "Scanning Always Available" to be enabled.
Users should conform to Taskers guidelines on "Power Management" from within Taskers user guide.
Requires location services minimally "Battery Saving" to be enabled in order to determine available WiFi networks.
As of Android 6.0+ the project may fail to recover nearby networks when the device is in Aeroplane mode while Wi-Fi is enabled - likely due to the new dependency on location services. This means features such as non-connectable network detection, network hopping and auto connect may fail to work while the device is residing in Aeroplane mode.
Understanding your 'mywifi' Task Structure
A 'mywifi' task is a Network Location compatible task that the project can recognise. These tasks hold your own custom actions for your individual network locations and are performed on arrival (enter) or departure (exit) of your known networks.
Your 'mywifi' Task names must follow certain rules and conform to a formal structure for the project to recognise and perform these tasks correctly.
Your 'mywifi' Tasks and Formatting
The following examples presume the advent of the example WiFi network SSIDs below.
Example WiFi SSIDs: 'Hotspot_01' & 'Hotspot _02'
Note: Hidden WiFi networks will use the access points MAC Address instead of the SSID.
You can create individual tasks for your 'mywifi' networks. These tasks will be performed when entering or exiting the corresponding WiFi network.
The following task name examples are valid.
Task name: 'Hotspot_01'
Task name: 'Hotspot_02'
You can group together WiFi networks within a single task. This allows you to perform the same task for different WiFi networks.
The following task name examples are valid.
Task name: 'Hotspot_01/Hotspot_02'
Tasks labelled with a category are useful for either grouping common network locations or where a single location has multiple WiFi networks that overlap one another.
In a situation where your grouped WiFi networks overlap, tasks labelled with a category will be treated as a singular Network Location. As your device passes between these grouped WiFi networks when detected the enter task for each WiFi network will always be performed. However the exit task will only be performed once all of the grouped WiFi networks within the task name are no longer available.
The following task name examples are valid.
Task name: '[Hotspots]/Hotspot_01/Hotspot_02'
Tip: You can also group networks using several different tasks simply by naming each task with the same category. See the following examples.
Task name: '[Hotspots]/Hotspot_01'
Task name: '[Hotspots]/Hotspot_02'
Network Location - Project Data
The Network Location project will create a directory within your device storage.
This directory will hold a number of files and sub directories pertaining to the Network Location project. The following files/directories will be available.
'nl.cfg' is a file stored within the Network Location folder. This file holds all the configuration settings for the project. See 'Configuration Definitions' for more information.
'nllog.txt' is a file stored within the Network Location folder. This file holds the project log.
The 'database' folder contains a number of files which store important network related data.
Network Location - Project Interface
The Network Location project has included a somewhat basic user interface. You can access this interface by creating a shortcut on your launchers home screen linked to the 'Network - Launch ' Task. You can also use the buttons provided on some of the 'Network Location' notifications.
Input Special Commands
The Network Location interface will accept some special commands in order to help you manage your setup. The following commands are currently supported.
'nl:config' returns a list of the current configuration settings stored within the 'nl.cfg' file.
'nl:backup' this will backup your current network location project data to a file stored within the '/NetworkLocation/database/' directory.
'nl:restore' restores your previously created backup. Note that any new data added since the last created backup will be overwritten and therefore lost.
Creating Your Own User Interface
It is very easy to create a functional user interface for the Network Location project. All data pertaining to the project is stored within the '/Network Location/' directory. This data is used to dynamically populate and control the Network Location project. By building an interface to read or modify this data you can control all aspects of the Network Location project.
Network Location supports Taskers App Factory. You can create a stand alone app from this project to install and use across all of your devices. This is useful for people with various devices who want to automate them all in the same way but do not wish to configure the project on each device.
To export as an app you will need App Factory installed (please refer to Taskers user guide for more information). You can export the project as an app without the need to add any additional content, however to automate your network locations you must include your own 'mywifi' Tasks within the project while exporting as an app.
After export the app will function in the same way the project does within Tasker. To add additional automation at a new network location you must always recreate the app with your new 'mywifi' Task(s) included.
Advanced Calibration of Network Parameters
Advanced use of network parameters allows a user to calibrate the entry/exit timing and boundaries of a known network. They also allow for specific customisation of detection accuracy and control over power usage.
The following configuration settings can be adjusted for calibration.
Network exit buffer=30
This is the time taken while evaluating the departure of a known network. Setting this value too low could cause the departure to be missed where as higher values could cause slower detection of network departures. The default value is '30' seconds.
Network green zone (-xxdbm)=70
The 'green zone' is a theoretical area dictated by the signal from the currently detected known network. Where enabled this zone is protected from network hopping (see 'Configuration Definitions' for more information). The 'green zone' is also used when evaluating new overlapping nearby networks and for prevention of adding networks which overlap too closely.
Network boundary (-xxdbm)=90
The 'Network boundary' acts a a signal perimeter of a known network location. If you are outside of this signal boundary the known network will be ignored even when seen. If the known network is a connectable network holding a valid connection, connection and disconnection events will take priority over this boundary. The network boundary is useful for determining the range of your networks on entering and on exiting.
Network scan (sec)=600
Modify the scan intervals of the Network Location project. Higher values will be more battery efficient where as lower values will increase accuracy.
Network boundary (-xxdbm)=99
The minimum acceptable signal quality for detection of a known network.
Network green zone (-xxdbm)=60
The protected zone of a known network.
Within this zone the active known network will be persistent.
Network exit buffer=30
The time taken while evaluating the departure of a known network. A value too low could cause the departure to be missed where as higher values will cause slower detection of network departures. Default is '30' seconds.
Auto WiFi connect=true
When Enabled Auto WiFi Connect will monitor your nearby networks for all previously known connections. When a suitable know network is found Network Location will attempt to automatically make a connection to this network. This is useful for users who prefer to disable their device WiFi when not in use but still want their device to automatically connect when nearby a previously connected and trusted WiFi network.
Auto WiFi timeout=30
Timeout setting for 'Auto WiFI' the project should wait at least this amount of time before disabling the WiFi radio. If a connection is established before the timeout period elapsed then the WiFi radio will be left enabled. A value of 10 - 60 (seconds) is recommend.
Network hopping allows the Network Location project to automatically switch the device WI-FI connection to an overlapping network that holds a stronger signal. For the stronger network to become eligible it must hold a signal of at least 10% greater than the currently connected network. The network will not hop if the device is transferring data, this is to avoid disruption to any current processes. Network hopping requires scheduled checks of the devices network environment.
Logging provides information pertaining to the actions Network Location is preforming. You will find the log at, 'NetworkLocation/nllog.txt'. The log contains basic HTML tags - useful when viewing the log within a Tasker scene.
Network perform tasks=true
When set to 'false' during arrival or departure Network Location will not preform your 'mywifi' network Task(s). All other aspects of the project will continue to function as usual. This is useful for users who do not wish to create grouped or singular (project compatible) tasks and instead may prefer to handle any Task(s) themselves by for example monitoring the 'NL_NDCE' variable.
Store global data=true
When set to true all global data is stored inside 'NetworkLocation/database/.data' The data stored within this file will be the primary source of data for the project. Values held by global variables will be a duplicate of this data.
Wake on scan=true
When set to true the device screen will turn on while attempting to scan for networks. This can be useful for devices that struggle to return network data while asleep. Note: this feature will consume more battery power than usual and should be used only where absolutely necessary.
Network scan (sec)=600
The time to wait between scheduling network checks. The accepted values are 180 - 1800 (seconds). Lower values will be battery intensive where as high values will mean the Network Location project will be slower to respond.
When set to '0' scheduling will be disabled.
Notify network events=true
Notification of events regarding networks.
Notification when erroneous actions occur.
Hold important notifications within Androids notification area.