New to Tasker - Help with Conflicting Profiles that Enable / Disable Pattern Lock

767 views
Skip to first unread message

tiger100

unread,
Jan 27, 2014, 3:28:29 PM1/27/14
to tas...@googlegroups.com
I have a rooted phone and I am using the Secure Settings Plugin to enable and disable pattern lock.  I have three profiles set up (see images below). 

1) Disables pattern lock when connected to my home wifi network and enable it on the exit task
2) Disables pattern lock when connected to my bluetooth headset and enable it on the exit task
3) Disables pattern lock when connected to my plugged-in headset (I know - not very secure) and enable it on the exit task

The problem arises when two profiles are active at the same time.  For example when pattern unlock is disabled by wifi and bluetooth.  When I stop using the bluetooth headset and only the wifi profile is active the pattern lock changes to enabled (as it should because this is what my exit task is telling it to do).

The profiles work fine when using them independent of one another.

Any ideas that would address this issue?

Thanks in advance.






Matt R

unread,
Jan 27, 2014, 3:41:37 PM1/27/14
to tas...@googlegroups.com
Set all three profiles to only have one action in the enter task: Stop.  Remove the exit task, too.  Then make a fourth profile and use context State -> Tasker -> Profile Active and choose the three profiles you mentioned.  Put the lock/unlock actions in this new profile.

Matt

tiger100

unread,
Jan 27, 2014, 3:58:53 PM1/27/14
to tas...@googlegroups.com
Thanks Matt - that did the trick.  You guys are fast on this forum.  I really appreciate the help.  Tasker is great, but the learning curve is steep.

All the best,

David

Jared Isch

unread,
Jan 28, 2014, 9:48:53 AM1/28/14
to tas...@googlegroups.com
This is an interesting idea, What I had been doing with not much success, was every profile called a controller task.  The first thing the controller task did was stop if a lock was set.  The second thing it would do was set the lock.  Then it would do all the wifi/bt/audio settings in accordance with the active profile.  My problem is profiles still end up being active at the same time (the second just doesnt make changes) but this still causes issues with things not being set correctly.  And with only 3 possible states, I have difficulty for sure making only 1 profile active at a time.  I wonder if this is basically doing the same thing and would be a waste of time for me to reconfigure everything....

I think my problems stem more from profile activation than task management.....

For example a profile near my house identified as "cell near + wifi not connected to home" a profile for car identified as "bt connected to specific device", very easy for both of those to be active.  So now I add a 3rd context to near home that says also not connected to "bt specific device", next thing you know something else comes up and i've got 10 different conditions placed on a profile....lol.

Rich D

unread,
Jan 28, 2014, 4:37:24 PM1/28/14
to tas...@googlegroups.com

 I wonder if this is basically doing the same thing and would be a waste of time for me to reconfigure everything....

Search this group for this title.  It has a good discussion on this very topic.

Mode switching priority variable across multiple tasks (suggestion needed on my routines)

Jared Isch

unread,
Jan 29, 2014, 2:30:21 PM1/29/14
to tas...@googlegroups.com
Thanks for that resource, read through it.  I've also read through the state machine thread quite extensively, and to be honest, I think it leaves me more confused each time I look through it.  Right now my setup is example.  Profile "home" becomes active it runs a profile controller task, that task calls controllers for wifi, display, keyguard, bt, etc.  those individual task look at the profile and make changes based on it.  I.E. if profile is near home/near work, turn on wifi. The only real problems I have is when 2 profiles go active together (I try to avoid this by making the profiles as specific as possible) and then sometimes it gets messed up when things switch too quickly, which i really don't understand....the logic is 

1. stop if profile lock set
2. set profile lock
3. set variable to profile name
4. wifi task
5. security task
6. bt task
etc.

then an exit task that clears profile_lock.   I just don't know how to keep it from going from car to near home to home so quick that it half the profile ran as near home and the 2nd half ran as home as an example.  Most of the time I can't really even understand why it broke.  I usually end up with something like my screen lock enabled at home, profile variable is home, pactive is home, but my security task didnt run the unlock, so i run it again and it runs fine.  There's clearly a disconnect in my line of thinking and whats going on.  Even when I've put a wait in the past before I run all the tasks, it didn't seem to help.

Rich D

unread,
Jan 29, 2014, 9:19:43 PM1/29/14
to tas...@googlegroups.com

The concept of a 'controller' task is a good one and should work. Try it this way.

Profile: Car
Context: car dock
Enter Task:
1. Wait until ; %TRUN !~ *,Control,*  500ms
2. Perform task; Control

Exit Task:
1. Wait until ; %TRUN !~ *,Control,*  500ms
2. Perform task; Control

Profile: Home
Context: cell near
Enter Task:
1. Wait until ; %TRUN !~ *,Control,*  500ms
2. Perform task; Control

Exit Task:
1. Wait until ; %TRUN !~ *,Control,*  500ms
2. Perform task; Control

Task: Control
1. If %PACTIVE ~ *,Car,*
2.     Do car stuff
3.     Stop
3. End if
4. if %PACTIVE ~ *,Home,*
5.    Do Home stuff
6.    Stop
7. End if

So, any time one of your location profiles goes active or inactive it will run the control task (after waiting for it to stop)  then the control task will figure out what is active and what settings to run.  Notice I put the car "if" first in the control task, so when I drive home it will stay in car mode until I get out of the car then it will go to home mode..

%TRUN is a tasker variable with a comma separated list of currently running tasks...

Reply all
Reply to author
Forward
0 new messages