• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Tasker question - Cell Near and battery use

juniperz

Lurker
Feb 16, 2012
6
0
I am not a Tasker expert but have been using it to switch profiles (ringer / notification volume, Bluetooth Y/N etc) buy using widget buttons for Home / Work / Silent, for many years and many phones.
Last night I decided to automate it by setting up Tasker Profiles using Cell Near - these then trigger the existing Tasks for Home and Work. It seems to work, but it must be constantly checking for cells within range and keeping the device awake. BetterBatteryStats is showing Deep Sleep 11%, Awake (Screen Off) 66%. It is burning battery at about 6%/hour when it is usually half that.
I see in Preferences (Tasker) that you can set the scan interval for Bluetooth, Wifi, GPS, but not for Cell Near.

Any ideas please, before I scrap it and go back to using the widget buttons?
Thanks

Galaxy S5 klte - Resurrection Remix 5.6.0-20160107 (Android 6.0.1)
 
I do something similar but not with cell location. I have limited exposure to it and seen to recall that it ate the battery.

When I visit a customer in their office my phone was constantly trying to connect to their Wi-Fi network. When I was in my office/home I was always on my Wi-Fi network.

I run two profiles and if I am within range of my router Wi-Fi is on in my phone. If I am out of range of my router Wi-Fi is off.

... Thom
 
Upvote 0
Thanks Thom.
I have thought about driving it from my customer site Wifi - quiet ring when connected / loud when not, but I have given up using their network for a different reason! On my previous ROM (CM12.1), it would eat battery when on their wifi (and only their wifi). I think it was because it was handing off from WAP to WAP all the time (all with same SSID). Sorry - rambling - I will abandon Cell Near and try using office wifi as the trigger next week.
 
Upvote 0
For me I always use Mobile Data while away from the office.

The profiles, tasks, and scene that I use are below. They include status messages. There was one timing problem that was solved by the wait (recommended from someone else in Android Forums and I still can't determine why it works).

Obviously you will use SSIDs.

Profile: tlaOfficeFar
State: Not Wifi Connected [ SSID:TLANET-2.4GHz/TLANET-5GHz MAC:* IP:* ]
Enter: tlaOfficeFarEnter
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: Variable Split [ Name:%WIFII Splitter: Delete Base:Off ]
A3: Perform Task [ Name:tlaWiFiOff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable

Profile: tlaOfficeNear
State: Wifi Near [ SSID:TLANET-2.4GHz/TLANET-5GHz MAC:* Capabilities:* Min. Activate Signal Level:4 Channel:0 Toggle Wifi:Off ]
Enter: tlaOfficeNearEnter
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: Perform Task [ Name:tlaWiFiOn Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]

tlaWiFiOff
A1: Variable Set [ Name:%work To:WiFi - Off Do Maths:Off Append:On ]
A2: Variable Set [ Name:%work To:WiFi - Still Off Do Maths:Off Append:Off ] If [ %WIFI ~ off ]
A3: WiFi [ Set:Off ]
A4: Perform Task [ Name:tlaExitResult Priority:%priority Parameter 1 (%par1):%work Parameter 2 (%par2): Return Value Variable: Stop:Off ]

tlaWiFiOn
A1: Variable Set [ Name:%work To:WiFi - On Do Maths:Off Append:On ]
A2: Variable Set [ Name:%work To:WiFi - Still On Do Maths:Off Append:Off ] If [ %WIFI ~ on ]
A3: WiFi [ Set:On ]
A4: Perform Task [ Name:tlaExitResult Priority:%priority Parameter 1 (%par1):%work Parameter 2 (%par2): Return Value Variable: Stop:Off ]

Scene: tlaExitResult
P:1024x192 L:1024x192

Orientation: Portrait
Background Colour: #00000000
Action Bar Style: System
Title: tlaPopup
Subtitle:
Icon: null
Tab Labels:

Element: Text1/Text
Geometry:
P:0,0 1024x192 L:0,0 1024x192
Content:
Text: %par1
Text Size: 18
Text Width Scale Percent: 100
Text Colour: #FFFFFFFF
Font:
Position: Centre
Vertical Fit Mode: Reduce Text Size
Text Format: Plain Text
Events:
Click: 203

... Thom
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones