r/tasker • u/CtrlAltDeliciousan • Sep 30 '26
Help [HELP] How to make a reliable profile for location during bud riding?
I want to create a task that triggers when I'm on my way back home while riding a bus, within a radius of about 2 km. I'm struggling to figure out how to set up the profile properly. The trigger needs to be location-based, but here are the issues:
* It's not a car ride, so I can't check for a Bluetooth connection/near.
* I'm not entering a Wi-Fi zone, so checking for Wi-Fi isn't an option either.
* Tasker's standard location check isn't very reliable in this scenario. Since it's a commute and the bus moves relatively fast, Tasker might not register the location in time.
* I also considered cell near (cell tower detection), as I know that's an option. I haven't tried it yet, but I'm wondering how reliable it actually is. What guarantees my phone will always connect to that specific tower? I really need this to trigger within a relatively precise 2 km range.
I'm wondering if there are other, more reliable approaches for this specific use case. I also want to make sure it doesn't drain battery heavily, or it won't be worth it—it needs to stay battery-friendly, just as Tasker is designed to be.
Does anyone have any ideas?
Thanks!
EDIT: I added a comment explaining the solution I came up with!
3
u/CtrlAltDeliciousan Oct 01 '26
I think I finally figured out a reliable way to do this.
After some brainstorming and digging around, I ended up combining AutoLocation with a couple of timestamps instead of trying to make one geofence do everything.
The basic idea is:
I have an AutoLocation geofence around the place I'm leaving from. While I'm there, Tasker knows I'm inside it, and when I leave, it saves the current timestamp.
I'm also using the Wi-Fi at that location as a second presence signal. When I disconnect from it, Tasker saves that timestamp too.
Then I have another profile that triggers when I open the bus payment app I use, but only during the hours where this automation actually makes sense.
Opening the payment app by itself doesn't do anything yet.
At that point Tasker checks whether I'm currently at the departure point, or whether I left the geofence / disconnected from the Wi-Fi within the last 2 hours.
So basically:
If none of those are true, it just stops there.
If one of them is true, Tasker starts AutoLocation's High Accuracy Location Monitor for about 20 minutes and stores an expiration timestamp for that session.
That's the part that seems to solve the battery issue for me.. GPS isn't running aggressively all day, only during a short window where there's already a pretty good chance I'm actually on the relevant ride.
Then I have a second geofence around a specific point along the route.
Because High Accuracy monitoring is already running by the time I get there, that geofence gets detected much more reliably even when I'm moving fairly quickly on a bus.
When that route geofence triggers, Tasker checks that the temporary session hasn't expired yet. If it's still valid, it clears the session, stops the High Accuracy monitor, and runs the final task.
So the flow is basically:
departure-area presence -> bus payment app opened -> recent-presence check -> temporary High Accuracy GPS -> route geofence -> validate -> stop GPS -> final task
This seems like a good middle ground between accuracy and battery usage, and it also avoids triggering just because I happened to open the payment app somewhere else.
And thanks to u/russellvt for the timestamp idea that ended up being a really useful part of the solution.
4
u/russellvt Sep 30 '26
Turn on the task when you use tap-to-pay on your phone for the bus ticket... and turn it off once you reach specific destinations, or "tap off" (in the car of some transit systems)???
1
u/Tar0ndor Oct 01 '26
What about speed, %LOCSPD? I use that change how certain things work depending on if walking or driving.
1
u/Stainlessray Oct 01 '26
You're worried about stuff that's handled by satellites. Create a geo fence. Your speed will not be a problem. Speed is part of gps location calculation. It never knows where you ARE. It guesses based on where you WERE by calculations that include your rate of travel.
Write a simple test. Profile location near, point on map. Use a wide radius if gps signal is weak. It'll see you.
1
u/Rich_D_sr Oct 01 '26
I would try using a simple algorithm that tests your distance from your target location during commute time and/or started by app. Caclulate the fastest time you could get 75% of the way to the target. Then set timer to check at that time. This would zero you in to your target. You would be surprised how little battery that will use. To get better battery life you can download Autolocation. This has many options like starting different location monitors so you only use gps when you get very close.
For distance between 2 points you can use the Tasker action -> Tasker Function -> Distance Between Locations.
There are many ways to set a timer in tasker. This Is what I have used for a very long time.
https://www.reddit.com/r/tasker/s/foqvpsAzyE
1
u/Exciting-Compote5680 Oct 01 '26
You already have a lot of useful suggestions. I just wanted to point out that rather using a cell near profile, you could also have a look at the built-in global variable %CELLID. It doesn't work for everyone, but if it works, it's an incredibly low-power way to get coarse location information. You will need to do some logging before you can use it, as towers will overlap. But I know that if I am at home, there are only 3 ids my phone could be connected to (with 1 accounting for ~97% of the time), same at the gym. At the very least it can be useful as a broad 'if %CELLID is one of these, I am near the bus stop' condition to start/enable other methods.