Bug? : %PENABLED not updating when Profile Status changes

114 views
Skip to first unread message

Alexander Graetz

unread,
Aug 15, 2017, 10:02:04 AM8/15/17
to Tasker
I've just encountered a problem with %PENABLED. It's supposed to include only currently enabled profiles except it doesn't. If I disable a profile manually the change isn't always reflected by %PENABLED. Only way to get it to update is disabling and enabling tasker again. I need %PENABLED to be up to date and reliable.

I've got about 20 profiles, that I disable conditionally. From time to time, I have to enable all profiles again. I could just run the profile status action on all of them but this takes very long. Instead I want to enable only those, that aren't in %PENABLED.

Rich D

unread,
Aug 15, 2017, 12:19:38 PM8/15/17
to Tasker Google Groups Post

> I've just encountered a problem with %PENABLED.

This was reported recently by another user and I can confirm it is not working correctly on my device. We will have to wait for pent to get back from vacation then I would bump this post.

Alexander Graetz

unread,
Aug 15, 2017, 12:31:26 PM8/15/17
to Tasker
Ok thank you.

Pent

unread,
Aug 16, 2017, 5:00:52 AM8/16/17
to Tasker
Will check.

Pent

Pent

unread,
Aug 16, 2017, 5:08:50 AM8/16/17
to Tasker
I created a widget to flash %PENABLED and toggled some profiles,
behaved as expected. The UI must be exited before profile changes
take effect, perhaps that's the problem ?

Pent

Alexander Graetz

unread,
Aug 16, 2017, 6:50:29 AM8/16/17
to Tasker
Welcome back!

I've disabled some profiles, exited the UI, opened again and %PENABLED is still not updated. Exited again, opened again and %PENABLED is finally updated.

Something seems to be off there still. It would be great if profile changes would take effect if I apply the changes I. The UI. If I do nothing but change a profile state the apply button shows up giving the impression it would apply profile changes as well.

Alexander Graetz

unread,
Aug 16, 2017, 7:13:04 AM8/16/17
to Tasker
Hm. Seems to work now. Can't reproduce it anymore.

If I chance a profile state from within a scene of an exported app, it will take effect immediately, correct?

Rich D

unread,
Aug 16, 2017, 7:17:44 AM8/16/17
to Tasker Google Groups Post


> I created a widget to flash %PENABLED and toggled some profiles,
> behaved as expected. The UI must be exited before profile changes
> take effect, perhaps that's the problem ?

Hope you had a great vacation and were able to actually relax and enjoy it.. :)

I can test more this evening, but when I was testing this before I simply made a profile to monitor %PENABLED and set a notification on any change to %PENABLED (event/variable set context).  Then after enabling or disabling a profile I backed out of tasker and some times the profile would fire instantly but other times it would take several minutes to fire even though I opened and closed tasker several times.

Filip Van Schoor

unread,
Sep 26, 2017, 8:11:57 AM9/26/17
to Tasker
I've got the same thing happening with %PACTIVE. It's hard to recreate, but it does happen.

If I have to take a hint from what was said though, I'm maybe not closing the UI often enough while working on something. I was living under the assumption that tapping the "save changes" checkmark did the same thing and would also force a re-check of all conditions, but that is definitely not 100% reliably the case.

Basically, tap an active profile that is checking %PACTIVE to unfold the conditions. Tap one of the conditions, make no changes and back out of it. The profile is now deactivated. Save changes and it's a bit of a crapshoot whether a) the condition will be rechecked, b) if the ui will reflect it. Most of the times yes for a and b. Sometimes no for b. Occasionally no for a and b.

I've had it fix itself after exiting the ui or after locking/unlocking the phone, but in even rarer cases, the only option is to kick Tasker out of memory. It happened to me often enough that I do this out of habit now if I want to be sure values are rechecked.

Terry Meyers

unread,
Apr 15, 2018, 11:46:11 PM4/15/18
to Tasker
Necro'ing this post because I'm at war with this bug. Version 5.1m. other than clearing Tasker from memory, any other workarounds out there?

joaomgcd

unread,
Apr 16, 2018, 8:45:28 AM4/16/18
to Tasker
I took a note and will take a look when I can thanks.

Dale Smith

unread,
Apr 16, 2018, 8:50:56 AM4/16/18
to Tasker
I experienced this bug recently also. There's something about it's unpredictability we need to identify. Manual vs programmed changes seems to be different for one thing.

Dale Smith

unread,
Apr 17, 2018, 3:27:48 PM4/17/18
to Tasker
Definitely something wrong with PENABLED dinamic updates. Toggling profiles and tapping apply should but doesn't update PENABLED.

joaomgcd

unread,
Apr 18, 2018, 7:21:21 AM4/18/18
to Tasker
Testing this out. It seems that if I add a wait action of 3 seconds after the "Profile Status" action to toggle a profile that it works correctly. Can you confirm this?

Dale Smith

unread,
Apr 19, 2018, 11:03:34 AM4/19/18
to Tasker
Yes, Profile Status actions do correctly update %PENABLED at least for me. Try this, manually change a Profile's status then flash %PENABLED. I have been testing this with this task.

Profile Enabled? (13)
<Look for the passed named profile in the %PENABLED variable>
A1: Anchor
A2: Variable Set [ Name:%arraype To:%PENABLED Recurse Variables:Off Do Maths:Off Append:Off ]
A3: Variable Set [ Name:%found To:false Recurse Variables:Off Do Maths:Off Append:Off ]
A4: Variable Split [ Name:%arraype Splitter:, Delete Base:Off ]
A5: For [ Variable:%profile Items:%arraype() ]
A6: If [ %profile ~ %par1 ]
A7: Variable Set [ Name:%found To:true Recurse Variables:Off Do Maths:Off Append:Off ]
A8: Flash [ Text:%profile enabled Long:On ]
A9: Goto [ Type:End of Loop Number:0 Label: ]
A10: End If
A11: End For
A12: Flash [ Text:"%par1" not enabled Long:On ] If [ %found ~ false ]

João Dias

unread,
Apr 19, 2018, 2:20:46 PM4/19/18
to tas...@googlegroups.com
It only takes effect after you exit Tasker though. Did you take that into consideration?


--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Rich D

unread,
Apr 20, 2018, 5:14:57 AM4/20/18
to Tasker Google Groups Post
A 1 second wait seems to fix this issue on my device. I have had this test running for 2 days now with no failures. It enables a profile, waits 1 second then checks to see if the profile name is in %PENABLED . Then it disables the profile and waits 1 second and test to see if the name is not in %PENABLED.

If I try it without the wait it will fail everytime.

It would be nice if all posters here could confirm a small wait fixes there issue. If not include a "detailed" account of the exact issue. 

In my opinion this still qualifies as a bug. I believe every tasker action is supposed to complete before the next action starts (unless specifically stated it does not). I would expect tasker to be able to do this with its own actions. However a small wait is no big deal so I would not see this as High priority issue..   


Profile: Timer (222)
Time: From 12:00AM every 10m Till 11:59PM
Enter: Set Profile (223)
A1: [X] Write File [ File:Profile_enbled.txt Text:%DATE   %TIME  test Append:On Add Newline:On ] 
A2: Profile Status [ Name:test Set:On ] 
A3: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ] 
A4: Write File [ File:Profile_enbled.txt Text:%DATE   %TIME  profile enabled ---  %PENABLED Append:On Add Newline:On ] If [ %PENABLED !~ *,test,* ]
A5: Notify [ Title:Profile Test Failed Text: Icon:null Number:0 Permanent:Off Priority:3 ] If [ %PENABLED !~ *,test,* ]
A6: Profile Status [ Name:test Set:Off ] 
A7: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ] 
A8: Write File [ File:Profile_enbled.txt Text:%DATE   %TIME  profile disabled ---  %PENABLED Append:On Add Newline:On ] If [ %PENABLED ~ *,test,* ]
A9: Notify [ Title:Profile Test Failed Text: Icon:null Number:0 Permanent:Off Priority:3 ] If [ %PENABLED ~ *,test,* ]

Dale Smith

unread,
Apr 20, 2018, 10:36:07 AM4/20/18
to Tasker
Just tried this:
1. Manually disabled a profile.
2. Tapped Apply and Exit
3. Reentered Tasker after a few seconds
4. Ran my profile checker task.
5. Profile was not reported as disabled.

Just tried it again. Few minutes later. Checker is now reporting the profile disabled. According to the log there was a Tasker stop Monitor restart and Tasker start between the two task runs.

Rich D

unread,
Apr 20, 2018, 6:39:32 PM4/20/18
to Tasker Google Groups Post
I can confirm this same behavior. 

It appears that this issue is strictly related to "manually" enabling / disabling profiles and exiting the UI and  not having the %PENABLED variable updated and the profile status does not change. 

Just for clarity,  from Pents post on this thread a while back it appears you need to exit the UI for these changes to take affect,  and the 'apply button' is not expected to enable / disable profiles.

The 'monitor restart' is expected to occur whenever change is made to a context and the UI is exited.  It appears this only happening intermittently. So something must have got broken in that process at some point. 

To answer one of the posters questions about how to force this to occur without wiping data or disabling tasker. It appears you can force a monitor restart by changing a context or adding a context to a existing profile then exiting the UI.

Seems like a good opportunity for João to dive into the depths of Tasker's monitoring process... :)   


Dale Smith

unread,
Apr 21, 2018, 10:05:39 AM4/21/18
to Tasker
In my mind "Apply" should update %PENABLED. How hard could it be? In addition to whatever Apply does have it read the context switch status and update %PENABLED.

João Dias

unread,
Apr 23, 2018, 4:34:38 AM4/23/18
to tas...@googlegroups.com
Thanks for the extra info. I'll try fixing that. :)

On Sat, Apr 21, 2018 at 3:05 PM, Dale Smith <dales...@gmail.com> wrote:
In my mind "Apply" should update %PENABLED. How hard could it be?  In addition to whatever Apply does have it read the context switch status and update %PENABLED.

Rich D

unread,
Apr 23, 2018, 5:11:30 AM4/23/18
to Tasker Google Groups Post



In my mind "Apply" should update %PENABLED.

Agreed..


How hard could it be?

Not sure.. However if Pent did not already include it in the "apply" button process there could very well be a good reason for it.. He did not miss much.. :)



Reply all
Reply to author
Forward
0 new messages