Has anyone figured a way to control the charge limit via Input Power Control module or the app Battery Charge Limit? I've stuck out with both unfortunately.
Set a custom control file for Battery Charge Limit...
Path Data: /sys/class/power_supply/charger/charge_disable
Enable Value: 0
Disabled Value: 1
The phone will still say that it is charging, but the battery level will have stopped where you set it to.
Anyone found a solution for Android 11? I used the above settings fine on 10 with battery charge limit app, but on 11 it will intermittently charge to 100% overnight.
Edit-Advanced Charging Controller magisk module seems to be working so far.
The app battery charge limit was working with the post no 2 settings until i updated to android 11.
Will try the magical.module and report back. A bit difficult to setup. Hard to read via terminal.
Sent from my Nexus 5 using Tapatalk
Battery Charge Limit still works for me with Sept/Oct updates.
On android 11?
Care to share your settings?
Sent from my Nexus 5 using Tapatalk
Sorry, but it never stopped working for me... so I'm using the same settings I posted above.
On android 11?
Sent from my Nexus 5 using Tapatalk
What else would September and October updates be?
I am using same setting with Tasker to limit my charging to 80% on overnight charging.. It still works now on Android 11.
jljtgr said:
Set a custom control file for Battery Charge Limit...
Path Data: /sys/class/power_supply/charger/charge_disable
Enable Value: 0
Disabled Value: 1
The phone will still say that it is charging, but the battery level will have stopped where you set it to.
Click to expand...
Click to collapse
This is working for me on a Pixel 4 XL with the latest Android 11.
EDIT: Got it working perfectly with these additional settings:
Enforce charge limit: disabled
Always Write CFTRL File: enabled
------------------------------------------
so to put it all together, for the Pixel 4 XL:
Manually enter Configure Control Data ->
Path Data: /sys/class/power_supply/charger/charge_disable
Enable Value: 0
Disabled Value: 1
Advanced settings ->
Enforce charge limit: disabled
Always Write CFTRL File: enabled
Since Battery Charge Limit is somewhat abandoned and might get disrupted more by successive Android versions... I started looking into replacing this functionality with Tasker... since Tasker is supported, it should keep running despite new battery optimizations.
I've attached the full Tasker project at the end. Download it to your phone, open Tasker, long-press the Home icon at the lower-left, select Import Project and select the XML file attached. Lastly, manually run the "Charge Limited" task. This will set up the QuickTile and %BATTLIMIT variable.
Here are some description exports of what the project does.
Code:
Profile: Check Battery To Enable (92)
Restore: no
State: Battery Level [ From:0 To:55 ]
State: Power [ Source:Any ]
Enter: Enable Charger (88)
A1: Read Line [ File:/sys/class/power_supply/charger/charge_disable Line:1 To Var:%bdisable Structure Output (JSON, etc):Off ]
A2: If [ %bdisable ~ 1 ]
A3: Flash [ Text:Enable: %BATT% Long:Off ]
A4: Run Shell [ Command:echo '0' > /sys/class/power_supply/charger/charge_disable Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A5: End If
Code:
Profile: Check Battery To Disable (93)
Restore: no
State: Battery Level [ From:60 To:100 ]
State: Power [ Source:Any ]
Time: Every 2m
Enter: Disable Charger (87)
A1: Read Line [ File:/sys/class/power_supply/charger/charge_disable Line:1 To Var:%bdisable Structure Output (JSON, etc):Off ]
A2: If [ %bdisable ~ 0 & %BATTLIMIT ~ 1 ]
A3: Flash [ Text:Disable: %BATT% Long:Off ]
A4: Run Shell [ Command:echo '1' > /sys/class/power_supply/charger/charge_disable Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ]
A5: End If
There are two other tasks that configure the AutoNotifications tile and a task that accepts commands from the tile.
This obviously requires root. I will not answer any questions about not requiring root.
For QuickTile functionality, you will need AutoNotifications. If you don't have AutoNotifications, you will have to go into Tasker to toggle the functionality manually. For me, this uses AutoNotifications tile #2, you may need to configure the AutoNotifications task config to use other tile #'s. This was made for a Pixel 4 XL. It probably works for the Pixel 4. It might work for other Pixel phones, but I have no idea.
Edit: I redid my phone and noticed that Tasker can no longer ReadLine on rooted paths... so I had to replace it with a root shell command. (unfortunately this means a toast will appear for root usage every couple minutes, which I personally disabled in Magisk)
Related
Basicly what i want is, when i launch an app;
- if brightness is manual(say 50) i want brightness to get max(100) and when i close the app , brightness goes back to 50.
-if brightness is auto, i want auto brightness disabled, set Brightness to 100,and when I close the app, i want brightness back to auto.
I am only able to: disable auto brightness >set it 100>set back to auto when i close. But if it is manual to be start with, i end up having auto brightness when I close the app.
I hope i explained the problem clear enough. Thanks in advance
Profile: Brightness (220)
Application: Chrome
Enter: Anon (227)
A1: Variable Set [ Name:%Bright To:%BRIGHT Do Mathsff Appendff ]
A2: Display Brightness [ Level:255 Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
Exit: Anon (228)
A1: Display Brightness [ Level:%Bright Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
A2: Variable Clear [ Name:%Bright Pattern Matchingff ]
Hope this helps.
Sent from my SM-N920C using Tapatalk
What does the numbers mean in the parenthesis(as in "Brightness (220)). Sorry but the noob question
Lorrid13 said:
What does the numbers mean in the parenthesis(as in "Brightness (220)). Sorry but the noob question
Click to expand...
Click to collapse
I have the same question. Would somebody please clarify?
Lorrid13 said:
What does the numbers mean in the parenthesis(as in "Brightness (220)). Sorry but the noob question
Click to expand...
Click to collapse
You can ignore that. It's just the format of the XML file they copy/pasted.
MishaalRahman said:
You can ignore that. It's just the format of the XML file they copy/pasted.
Click to expand...
Click to collapse
Thanks a bunch, mate!
ashfaaa said:
Profile: Brightness (220)
Application: Chrome
Enter: Anon (227)
A1: Variable Set [ Name:%Bright To:%BRIGHT Do Mathsff Appendff ]
A2: Display Brightness [ Level:255 Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
Exit: Anon (228)
A1: Display Brightness [ Level:%Bright Disable Safeguardff Ignore Current Levelff Immediate Effectff ]
A2: Variable Clear [ Name:%Bright Pattern Matchingff ]
Hope this helps.
Sent from my SM-N920C using Tapatalk
Click to expand...
Click to collapse
It works as it should when auto brightness is off. When auto brightness is on, it sets brightness to 100, but only a visual change in notification shade, brightness doesn't change on screen. I think the problem is, it doesn't disable auto brightness before it changes brightness value if auto brightness is on.
I just fixed it by adding "auto brightness: off" action in first task, between "variable set" and "display brightness: 255".working perfectly now. Thank you very much.
Hi,
It doesn't seems to practical to have the phone on an inside the task to learn a new cell tower are. I found this post
https://groups.google.com/forum/#!topic/tasker/UXVXY3gYwqw
in which there is a profile and a task that record recent Cells ID to a predefined variable.
The profile and task are:
Profile: Record Cells (181)
Event: Variable Set [ Variable:%CELLID Value:* ]
Enter: RecordCells (182)
A1: Variable Set [ Name:%CELL_List To:%CELLID
Do Mathsff Appendn ] If [ %CELL_List !~ *%CELLID* ]
This is launched from a button with the following actions:
Action 1: Perform Task : Record Cells (this is to capture the current cell as the above only kicks in when the cell changes):
RecordCells (182)
A1: Variable Set [ Name:%CELL_List To:%CELLID
Do Mathsff Appendn ] If [ %CELL_List !~ *%CELLID* ]
Action 2: Set Profile Status (Record Cells) On
Its necessary to create a button on a scene. (I've attached the files)
It works but i would like to know the following:
1.- To stop the cell tower recording, for when i leave the area. There its been said that clearing the %CELLgatherswitch variable should work, but when i see the variable values, it is always empty, so nothing to clear...
2.- To learn different areas: copying the task and change the variable name do the trick i think, but for now i have no way to stop it.
3.- Is really a difference between executing the RecordCell task manually and trough an scene?
Any help will be appreciated!
Not sure if this is the right forum for this question, sorry if it isn't.
I'm trying to calculate a time in the future, by adding some value to %TIMES. I'm adding 24 hours max. For some reason, the variable I'm storing the result in, ends up like this: 1.515....E9. Normally, this wouldn't be an issue, but for some reason, not a single application in Tasker seems to be able to handle this scientific notation, so I'm stuck with a useless number. Is there a way I can prevent Tasker from writing this number in this notation, or is there a way to convert it to a regular number?
Tim
The %TIMES variable is the current time in seconds since January 1, 1970. A very big number.
Typically time values are manipulated by doing a "variable convert" action.
Could you post your task DESCRIPTION here? Long press the task to select it -> 3-dot menu -> export -> description to clipboard.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
I'm currently doing this through Variable Set. It's been a long time since I used tasker (set once and forget, right), so it's probably something dumb I'm doing wrong.
Here's the description (and thank you for providing instructions on how to do it):
Update Times (25)
A1: AutoAlarm [ Configuration:No configuration needed Timeout (Seconds):5 ]
A2: Variable Set [ Name:%minsBefore To:20 Recurse Variablesff Do Mathsff Appendff ]
A3: Variable Set [ Name:%preAlarmTime To:%TIMES+%seconds-(%minsBefore*60) Recurse Variablesff Do Mathsn Appendff ]
A4: Variable Set [ Name:%dismissNotification_preAlarmTime To:%TIMES+%seconds-(120*60) Recurse Variablesff Do Mathsn Appendff ]
A5: Variable Convert [ Name:%preAlarmTime Function:Seconds to Date Time Store Result In:%readable_preAlarmTime ]
Click to expand...
Click to collapse
Some notes:
I know A2 is weird and useless currently, it's a placeholder for something I'm gonna add later.
Action A4 is also irrelevant at the moment, again a placeholder for later.
Action A5 throws an error, due to %minsBefore being stored in scientific notation (I'm assuming, see error below)
15.17.29/Variables doreplresult: |%preAlarmTime| -> |1.51539179987E9|
15.17.29/E Variable Convert: %preAlarmTime -> %preAlarmTime
15.17.29/E Variable Convert: %readable_preAlarmTime -> %readable_preAlarmTime
15.17.29/E Variable Convert: %preAlarmTime: failed.
15.17.29/E result: stop task (error)
15.17.29/Variables doreplresult: |%preAlarmTime| -> |1.51539179987E9|
15.17.29/Variables doreplresult: |%readable_preAlarmTime| -> |08:15|
15.17.29/E Error: 1
15.17.29/MacroEdit action finished exeID 1 action no 4 code 596 status: Err next 4
Click to expand...
Click to collapse
In A3, try using the round function on the seconds variable;
%TIMES+round(%seconds)-(%minsBefore*60)
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
In A3, try using the round function on the seconds variable;
%TIMES+round(%seconds)-(%minsBefore*60)
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
I'm almost beyond belief.. That fixed it instantly, brilliant catch, thank you!
A tiny addition, for anyone else who might face this later:
Using round on just %seconds gave me an incorrect time later on, in conversions (one minute too early). I fixed this by using round on (%seconds-(%minsBefore*60)), which fixed it.
The other, probably better, solution would be to go into the AutoAlarm settings and set the decimal point setting to 0. The round() was my quick way to get to that [emoji56]
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
The other, probably better, solution would be to go into the AutoAlarm settings and set the decimal point setting to 0. The round() was my quick way to get to that [emoji56]
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
That indeed also fixes it. I did notice the extra numbers, making for milliseconds, I should've realized that such a setting would be available in this kind of app, lol. Thanks again!
Hi,
I have an issue with Tasker on my Oreo car stereo.
With Tasker I am not able to adjust the screen brightness:
Code:
Profile: Night (7)
State: Twilight [ Configuration:From CIVIL DUSK to CIVIL DAWN at Device location. ]
Enter: Dimmer ON (5)
Stay Awake
A1: Display Brightness [ Level:0 Disable Safeguard:eek:n Ignore Current Level:eek:ff Immediate Effect:eek:ff ]
A2: Set Tasker Icon [ Icon:mw_action_bookmark_border ]
Exit: Dimmer OFF (6)
A1: Display Brightness [ Level:255 Disable Safeguard:eek:n Ignore Current Level:eek:ff Immediate Effect:eek:ff ]
A2: Set Tasker Icon [ Icon:mw_action_bookmark ]
Even the manual executing of the task it doesn´t change the brightness.
Any hints how to get this working?
I used exactly this task on earlier radio with Android 7 and it is still working fine on my Phone with Android 7.
I think the behavior is related to Andoid 8, could that be possible?
Is adaptive brightness turned off?
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
Is adaptive brightness turned off?
Click to expand...
Click to collapse
Yes it is turned off in the Android settings, to not use the head lights.
Even if I switch off adaptive brightness in the task it doesn´t do anything.
The unit itself has no light sensor, so I need something which dims the screen brightness independant of the head lights.
rigattoni said:
Hi,
I have an issue with Tasker on my Oreo car stereo.
With Tasker I am not able to adjust the screen brightness:
Code:
Profile: Night (7)
State: Twilight [ Configuration:From CIVIL DUSK to CIVIL DAWN at Device location. ]
Enter: Dimmer ON (5)
Stay Awake
A1: Display Brightness [ Level:0 Disable Safeguard:eek:n Ignore Current Level:eek:ff Immediate Effect:eek:ff ]
A2: Set Tasker Icon [ Icon:mw_action_bookmark_border ]
Exit: Dimmer OFF (6)
A1: Display Brightness [ Level:255 Disable Safeguard:eek:n Ignore Current Level:eek:ff Immediate Effect:eek:ff ]
A2: Set Tasker Icon [ Icon:mw_action_bookmark ]
Even the manual executing of the task it doesn´t change the brightness.
Any hints how to get this working?
I used exactly this task on earlier radio with Android 7 and it is still working fine on my Phone with Android 7.
I think the behavior is related to Andoid 8, could that be possible?
Click to expand...
Click to collapse
Hi Mate.
I have exactly the same problem. Did you get a solution?
I have a Xtrons Android 8 unit and brightness does not work , exactly like you explained.
Did you get a solution?
Hi,
there will be no solution until they use the Adroid_API as it should be.
Tasker uses the API, but the dev of our version seems to use different folder structures.
If I have a look at the traces I find the following entry:
Code:
05-07 13:45:54.415 292 292 E Lights Hal: write_int failed to open /sys/class/backlight/rk28_bl/brightness
/sys/class/backlight/rk28_bl/brightness would be the correct folder used by the API.
The reason for this issue is, that the folder rk28_bl does not exist. The file "brightness" is stored in folder:
/sys/class/backlight/backlight/brightness
I´m thinking about a method to get a workaround for this issue, but I don´t have the needed time to do it in the moment.
Hello,
I have the same issue. Did you find how to fix this?
alek_05 said:
Hello,
I have the same issue. Did you find how to fix this?
Click to expand...
Click to collapse
I got a new firmware for my Pumpkin and use FCC car launcher, which is able to do it.
rigattoni said:
Hi,
there will be no solution until they use the Adroid_API as it should be.
Tasker uses the API, but the dev of our version seems to use different folder structures.
If I have a look at the traces I find the following entry:
/sys/class/backlight/rk28_bl/brightness would be the correct folder used by the API.
The reason for this issue is, that the folder rk28_bl does not exist. The file "brightness" is stored in folder:
/sys/class/backlight/backlight/brightness
I´m thinking about a method to get a workaround for this issue, but I don´t have the needed time to do it in the moment.
Click to expand...
Click to collapse
Try this, run shell with tasker :
settings put system screen_brightness=216
value : 0 to 216
philippe734 said:
Try this, run shell with tasker :
settings put system screen_brightness=216
value : 0 to 216
Click to expand...
Click to collapse
No that can not work... and it does not work with OREO head units... at least not with mine.
Hi guys! I am new to tasker and trying to setup some profiles that needs some help finishing, plz help me with this:
1. I am creating to launch an app from clicking a widget and i achieved it, but the problem is when i click that widget it launches default application for that widget, hence both apps are launched. I want to replace the default action with my custom action.(I tried killing the default app without and with root permission, without root permission the problem was same, with root permission the app and its widget wasn't functioning further, plz suggest any help.
2. So i read many articles on web to locate phone but none of them use google maps live location feature, please suggest any way of using the live location feature or a valid replacement.
3. Next i am creating a profile to answer call when i take proximity sensor close to me, but the error in this is calls might be answered in pocket mode, plz suggest any way to detect pocket mode. Also i am trying to extend its functionality by activating loud speaker when i distance the phone and deactivate loud speaker when i bring the phone closer to my ear, plz help me with this.
Thanks for your patience in reading all these and thanks for your help.
Any Luck With Those Profiles? I'm Particularly Interested In The Proximity Answer, Facing The Problems Mentioned In Your Post
Proximity problem
Maybe add Display on as condition? Or phone unlocked? Would make a good pocket detection.
So, basically you need two profiles:
One would be this:
Profile: Proximity Status (70)
State: Proximity Sensor
Enter: Proximity on (71)
A1: Variable Set [ Name:%Proximity To:1 Recurse Variablesff Do Mathsff Appendff ]
Exit: Proximity off (72)
A1: Variable Set [ Name:%Proximity To:0 Recurse Variablesff Do Mathsff Appendff ]
And one would be with an Incoming call, a turned on display and an unlocked phone as condition. As task you would chose take call if %Proximity ~ 1. That should do the trick. You can obviously change the name of %Proximity in the tasks to whatever you like, I just quickly created an example to show you what I meant. What system version are you on? Marshmallow, Nougat, Oreo, Pie? Taking the call might be tricky, though, if you're not on Oreo or above.