Hi,
The internal variable %WIN does not work with Android 7.1, does it? ( Tasker accesibility setting On)
(Using Tasker 5)
It works fine in 8.1.
Try the following test which will flash the variable every time you switch apps;
Profile: Test WIN Variable
Event: Variable Set [
Variable:%WIN
Value:* User Variables Only: Off ]
Enter: WIN
A1: Flash [
Text:Current WIN: %WIN
Long: On
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Thanks! It worked!
Related
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!
Pretty much like the title says - neither HideScene nor DestroyScene work. I'm using ShowScene to activate it and it's fine but i need to remove it after a 5 second Wait statement and can't figure out how. Any help is appreciated.
It works fine in my device so...
What version tasker?
What device?
What OS?
What does the log say?
Please export and paste here a DESCRIPTION of the task. Long press the task, 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 using version 5.1 of Tasker on my Galaxy S5 running Nemesis Reborn ROM which is android 6.0.1. And here's the task description:
HTML:
AOD On (12)
A1: Java Function [ Return:cr Class Or Object:CONTEXT Function:getContentResolver
{ContentResolver} () Param: Param: Param: Param: Param: Param: Param: ]
A2: Java Function [ Return: Class Or Object:android.provider.Settings$System Function:putInt
{boolean} (ContentResolver, String, int) Param:cr Param:aod_mode Param:1 Param: Param: Param: Param: ]
A3: If [ %LOCKED eq 1 ]
A4: Show Scene [ Name:BlackScene Display As:Activity, No Bar, No Status, No Nav Horizontal Position:100 Vertical Position:100 Animation:System Show Exit Button:eek:ff Show Over Keyguard:eek:n Continue Task Immediately:eek:ff ]
A5: Secure Settings [ Configuration:Screen Bright
1 Second Timeout (Seconds):3 ]
A6: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A7: Hide Scene [ Name:BlackScene Animation:System ]
A8: End If
The %LOCKED variable is set correctly so that's not the problem. The log is attached below.
After ID 12.4 there should be a Wait 5 seconds task and then the HideScene task but there is nothing, yet the moment I unlock my phone those two tasks execute (12.6, 12.7 and 12.8 at the top). At least that's how I understand it. Is it a problem that I want to hide the scene while the screen is locked and off? Honestly I have no idea what could be wrong. There are also no errors in the log.
Is tasker excluded from battery optimization? Have you tried using "Reliable Alarms” in preferences?
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
Is tasker excluded from battery optimization? Have you tried using "Reliable Alarms” in preferences?
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
Yes, it's excluded. I'll tick the reliable alarms option and see now.
@ktmom it's the same with the reliable alarms option set to always. What i notice is that everything after the ShowScene gets paused until i unlock my phone.
Try pausing the requirement for a locked device. I suspect, as you do, that the looked screen is the problem. The handling changed starting in Marshmallow.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
ktmom said:
Try pausing the requirement for a locked device. I suspect, as you do, that the looked screen is the problem. The handling changed starting in Marshmallow.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Click to expand...
Click to collapse
I somehow made it work now. Changed the profile/tasks a bit and does exactly what I want it to (at least for the past 10mins lol). Will observe it today and if all's well will make a new topic here as tutorial as what I did was fix a bug preventing the Always-On Display to appear while the phone is locked and screen is off (normally it needs a screen cycle for changes to take effect). Thanks for your help mate Hopefully it continues to work as intended.
PS: I also shut down Tasker completely after each change and before each test. Maybe it had some old variables stuck before so that's why it didn't work yesterday, who knows?
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.
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)