location on and off

Skip to first unread message

sourav majee

Aug 31, 2022, 12:14:11 PMAug 31
to Tasker
How to set location on when not connected to home wifi and to set location off when connected to home wif

Dale Smith

Sep 1, 2022, 3:03:57 PMSep 1
to Tasker
I use Event context Logcat Entry to determine that I have disconnected from my home wifi.  
Component is: GnssNetworkConnectivityHandler
Filter is: ~R *connected=false,*

For the connect I use another Logcat Entry Event context.
Component is : WifiConnectivityMonitor.WCMCallbacks
Fillter is: ~R *"what ever the name of your wifi is":true*

Both of these work flawlessly except that you can have temporary home wifi dropouts that can be annoying.
You might want to add a denounce routine to your disconnect task. I got these components and filters on a Samsung S9
but when I upgraded to a new Motorola they still worked. Still not guaranteed to work for all phones. 

Hope this helps.

Dale Smith

Sep 1, 2022, 3:06:24 PMSep 1
to Tasker
Oops debounce not denounce.


Sep 2, 2022, 4:32:35 PMSep 2
to Tasker
I simply use a profile that is triggered when I am connected to my home wifi. Yes, the ssid is hidden and cannot be used as the profile trigger when location services are off, but the profile can use a specific IP address as the trigger. So I use the IP Reservation feature of my router to assign a specific IP address to my phone, and use that IP address as the profile trigger.  I suppose there is a very small chance that I could get assigned that IP address on some other network, but it is a very very small chance.
Reply all
Reply to author
0 new messages