How can I check if a profile is activated?

3,729 views
Skip to first unread message

Geralt

unread,
Dec 22, 2011, 6:14:29 PM12/22/11
to Tasker
Hi,

to group multiple actions, for example when I'm at home, into a single
profile. To do this I check for some condition (context) and enable a
profile.

But how can I use the activation/deactivation of a profile to perform
all actions for this profile? Am I missing something?


Thanks.

Geralt

P.S. Is it possible to inspect the content of all available variables?

UncleMike

unread,
Dec 22, 2011, 10:45:21 PM12/22/11
to tas...@googlegroups.com
Profiles consist of one or more contexts, and one or more tasks.  Tasks consist of one or more actions.  When the contexts for a given profile are all "true", the profile is activated.  When a profile is activated, the Enter Task is run - all actions within the Enter Task are run.  When one or more of the contexts is no longer true, the profile is deactivated, and the Exit Task is run - all actions within the Exit Task are run.

Geralt

unread,
Dec 23, 2011, 4:55:08 AM12/23/11
to Tasker
Thanks, for your fast reply. The profile is was taking about is the
thing you can activate in "Tasker-> Profile Status".

I assumed that I can use this task to mark the activation of a
profile, for example that I'm at home. Then I could define multiple
profiles with conditions (contexts) when I'm at home. And have a
single profile that contains all tasks I want to execute when I'm at
home. And the context for this profile would be the activation of the
"I'm home" profile set/under via the "Tasker-> Profile Status" task
from my "conditional profiles". Does this make sense?

UncleMike

unread,
Dec 23, 2011, 7:40:04 PM12/23/11
to tas...@googlegroups.com
I'm not understanding what you're trying to do.  The Tasker > Profile Status action is used to enable or disable profiles.  A status of "enabled" is not the same as a profile being "active".  If a profile is enabled it will become active only if the contexts for that profile are satisfied.  If a profile is disabled, it cannot become active.

If you're looking for a way to manually tell Tasker that you're home (as opposed to letting Tasker figure that out by itself using a Location, Cell or Wifi Near context), you can create a widget that sets or clears a variable, like this:

If %HOME Isn't Set
Variable Set %HOME = 1
Else
Variable Clear %HOME
End If

Then use a "Variable Value %HOME Is Set" as a context in your profiles that you only want active when you're home.

Under normal conditions (you're not experimenting with profiles), all your profiles would be enabled, and would become active (or not) based on their contexts, allowing Tasker to do things for you, without you having to think about it.

If that didn't help, you'll need to find a different way to explain what you're trying to do, because I'm not understanding.

Morten Haughom

unread,
Dec 23, 2011, 7:50:28 PM12/23/11
to Tasker
Hi Geralt!
I think perhaps you are overthinking it, making your question
complicated and hard to follow. BUT I might wrong! Perhaps I'm missing
your point! Anyways, I'll try to give you my understanding of what you
are trying to accomplish

On 23 Des, 10:55, Geralt <usr.gen...@googlemail.com> wrote:
> Thanks, for your fast reply. The profile is was taking about is the
> thing you can activate in "Tasker-> Profile Status".
>
> I assumed that I can use this task to mark the activation of a
> profile, for example that I'm at home.

Correct

> Then I could define multiple
> profiles with conditions (contexts) when I'm at home.

This is one possible misconception: Why would you want multiple
profiles for a single condition that you already have defined in your
initial profile (that you are home)? If this is the only context you
want check against, then put all your Tasks (with their actions) in
that profile. So when you are "at home", Tasker will run them.

>And have a single profile that contains all tasks I want to execute when I'm at
> home.

Yes, and this single profile will be the one mentioned above.

>And the context for this profile would be the activation of the
> "I'm home" profile set/under via the "Tasker-> Profile Status" task
> from my "conditional profiles". Does this make sense?

This is where it gets real murky: "And the context for this profile
would be the activation..."
It sounds like you want the context of the profile to check for the
activation of itself???

So assuming that is not what you want (as it would not make any
sense). Perhaps you want Tasker to determine if you are home or not?
There are several ways to do that, and without going into any detail.
You can use Location context. Or you can use Wifi Near to determine if
you are close to your own wireless router.

The "Profile Status" action in Tasker is not meant to activate tasks
under certain conditions determined by a chosen context. The concept
of context is at the very core of Tasker. It does exactly what I think
you are trying accomplish. Which is: If Tasker can, with an
appropriate context, determine that you are at home. and run the tasks
you assigned to that profile.

To give you some perspective, I use the Profile Status action to
deactivate a profile I call "Nightmode". My nightmode profile has a
"time context" which is set for 01:00 to 07:00. It means that Tasker
will set my phone in "Nightmode" between those hours of the night.

But sometimes I don't want the my phone to into Nightmode. For one,
Nightmode sets the phone into silent mode.
So I have Widget toggling the profile status of "Nightmode" to off
when I don't want it to activate itself at 01:00 hours.

Make any sense?

Morten

Geralt

unread,
Dec 24, 2011, 10:16:07 AM12/24/11
to Tasker
Thanks, you both answered many (unspoken) questions of mine.

Concerning, my question in this topic, I know that it is hard to
follow, because I'm overloading the vocabulary of tasker. My question
may not be as relevant as my goal: I want to group multiple tasks, so
that I can activate them all from one or more tasker profiles. Why?
Because in a tasker profile multiple contexts are ANDed and there is
no way to OR them together

Jake

unread,
Feb 20, 2012, 6:38:13 PM2/20/12
to Tasker
I think what the OP is asking is this: can I check if a profile is
active and then use that logic as a context for a different profile?
As an example, I give my phone power in 3 places: home, work, and in
the car. Home and work both have location contexts, but I cannot set
up a location context for the car because I could be anywhere.
However, one easy way to tell if I am in the car is if the phone is
plugged in and I am NOT at home OR at work. But currently it does not
appear that I can use the status (active/not active) of a profile as a
context for a different profile. Or am I missing something?

(Side note, a similar check can be done fairly easily by setting up
variables such as %AtHome and %AtWork that are set/cleared on entry/
exit of the home and work profiles. However, I am having a problem
where my exit tasks are not running for profiles based on wifi near.
Regardless, it would be cleaner to just reference whether the profile
is active, since Tasker already knows that, rather than creating my
own variable to tell me that.)

On Dec 24 2011, 8:16 am, Geralt <usr.gen...@googlemail.com> wrote:
> Thanks, you both answered many (unspoken) questions of mine.
>
> Concerning, my question in this topic, I know that it is hard to
> follow, because I'm overloading the vocabulary of tasker. My question
> may not be as relevant as my goal: I want to group multiple tasks, so
> that I can activate them all from one or more tasker profiles. Why?
> Because in a taskerprofilemultiple contexts are ANDed and there is

BossMan

unread,
Mar 2, 2012, 9:22:55 AM3/2/12
to tas...@googlegroups.com


plugged in and I am NOT at home OR at work.  But currently it does not
appear that I can use the status (active/not active) of a profile as a
context for a different profile.  Or am I missing something?
Sure you can. There's a variable %PACTIVE that has a list of profiles that are currently active (delimited with ; ). 

So, you can do something like %PACTIVE ~ *profile1*/*profile2*/*profile3* -> this condition will be met if any of those 3 profiles will be active.

BR,
A. 
Reply all
Reply to author
Forward
0 new messages