[1.0.6] Bug? GPS on exit task

17 views
Skip to first unread message

SHADOW-XIII

unread,
Aug 6, 2010, 1:15:34 PM8/6/10
to Tasker
I got 1.0.6 and I have to context that Add +1 to a Variable on task
enter and -1 on exit
My variable got 2 (from 0 earlier) that means both tasks were executed
First tasks is GPS-triggered and second is WiFi-triggered. WiFi one
also switches off GPS in my mobile (therefore first task should
execute Exit but the task is off now while the value is still 2, that
means it did not execute Exit).
(Or variable somehow got added 2 but the task is set to "abort new
task" so each task cannot be executed more than once).

BossMan

unread,
Aug 6, 2010, 3:40:08 PM8/6/10
to Tasker
Grab a log, you'll then be able to see what went wrong. My only idea
is a phone or Taskers reboot - in such case exit tasks are not run, so
variables keep their values.

BR,
A.

SHADOW-XIII

unread,
Aug 6, 2010, 4:52:27 PM8/6/10
to Tasker
There was no reboot, I was listening to the music all time so would
notice ... anyway
how to grab the log? (I've remember seeing link to instruction but
cannot find it now :P )

BossMan

unread,
Aug 6, 2010, 5:29:50 PM8/6/10
to Tasker

SHADOW-XIII

unread,
Aug 6, 2010, 6:10:53 PM8/6/10
to Tasker
Done,
I make it happens the same now by clearing variables, switching right
after that tasker off and then after making tasker running again I
send whole log what's going on after tasker gets on - at the end of
that my %HOME variable is 2 by only 1 context is running.

I also notice that this happens:
- Location: Home (over WiFi) kicks in, then switches off
- No GSM: kicks in
- Location: Home (over GPS) on (No GSM switches off)
- Location: Home (over WiFi) on (Location: Home over GPS switches off)

Now to explain context:
Location: Home (WiFi):
Wifi Connected, on enter: Variable Add %HOME value 1, on exit:
Variable Substract %HOME value 1
Location: Home (GPS):
GPS Position+Mobile Network (All types selected), on enter: Variable
Add %HOME value 1, on exit: Variable Substract %HOME value 1
No GSM:
Mobile Network (All types selected, Invert selected)+Not Wifi
Connected(All empty=any), on enter: GPS Off, on exit GPS On

Probably I made a mess somewhere with the tasks but still variable
home at the end should be only equal to 1 as only one Location: Home
is on

BossMan

unread,
Aug 6, 2010, 6:20:29 PM8/6/10
to Tasker
Ok, couple of things:
- I hope you know I am not the one you sent your log to :-) as logs
goes to Pent's address (he's the author of Tasker),
- I am more than sure (and I hope so too! :)) he is not checking logs
he receives to find logic issues in someone's config and spends time
on things like implementing new features etc. I suggested this
(grabbing a log) so that _you_ could go through the log and see what's
going on,
- last thing, on to the subject itself :-) : are you sure the HOME
variable was 0/unset before you started? Variable values are
persistent, i.e. unless you explicitely clear them, they'll keep their
values.

BR,
A.

SHADOW-XIII

unread,
Aug 6, 2010, 6:42:13 PM8/6/10
to Tasker
Yes, I tested it around 10 times, I have cleared (Variable Clear, made
a pressable widget for that) just before switching Tasker off
Even if when tasker switches off it would substract from non existing
variable (it is using 0 in that case) going to negative value (but I
have another context that is keeping %HOME variable in between 0 and
2, if less than 0 change to 0, if more than 2 change to 2)
Testing it so many times and testing it after starting Tasker I am
positive that %HOME variable was set to 0 (or non existing) when
starting tasker

BossMan

unread,
Aug 6, 2010, 7:04:52 PM8/6/10
to Tasker
So there's another profile that changes that HOME variable? So far you
listed two...

Try disabling that "safeguard" task that keeps HOME between 0 and 2 -
it may be messing things up as well.

Also, if you're able to reproduce this scenario easily, try adding
Flash actions (or Notifications) in every place this variable is
changed, marking the place and value - maybe you'll notice something
incorrect.

BR,
A.

SHADOW-XIII

unread,
Aug 6, 2010, 7:20:47 PM8/6/10
to Tasker
The point is those Variable limiting are way to simple and event
based:
- Variable Set %HOME any value, set %HOME 2 if %HOME > 2, set %HOME 0
if %HOME < 0

I have no idea how that could mess it, my %HOME value should be 1 but
is 2(or more in that case) but still same problem - it is not 1
I will try making a proper log file using File->Write File(Append ...)
to see what's going on but it will take some time so probably
tomorrow :)

BossMan

unread,
Aug 6, 2010, 7:52:25 PM8/6/10
to Tasker
It's strange, but still the best way is to look in the log (e.g. the
one you have) and grep/search for HOME. There has to be a place where
it is either incremented by two or called unintentionally and you
should be able to track that place.

BR,
A.

SHADOW-XIII

unread,
Aug 7, 2010, 12:00:29 PM8/7/10
to Tasker
Ok, found it it was just total mess doing in my stuff. Running
something twice and/or not recording its exit tasks. I reviewed my
tasks, add some more conditions. I think the main problem was when
Home GPS was quitting it was substracting variable (thus switching
wifi off, gps on) before the other context was kicking in (adding
variable thus wifi on, gps off) .... strange, it turned out that I
just having 2 function to do the same (add/substract variable that
leads to mutual on/off) does not work very well. I restricted my GPS
scan not to run when WiFi is already connected and that made the deal

RogueSpear

unread,
Aug 7, 2010, 2:14:12 PM8/7/10
to Tasker
My Tasker config got to be so complex that I finally spent a couple of
hours documenting the entire thing in a Google Docs spreadsheet. It
was a complete PITA but I found some problems in my config that looked
very obvious and amateurish. The problem is that with our tiny
screens we can only see so much at one time on the phone. Having the
entire thing laid out in a spreadsheet will also give you some ideas
for optimizing or new ideas you had not thought of.

SHADOW-XIII

unread,
Aug 7, 2010, 3:20:14 PM8/7/10
to Tasker
to each task (exit/enter) I add
Write File (tasker.log, Append), .... some text like Variable HOME
Changed +/-1 (now %HOME), if (%DEBUG = 1)
so when I want track what is going on with my tasks now I will have to
only make variable DEBUG with value 1 (or clear it otherwise) to
enabled debugging my tasks to /sdcard/tasker.log .... very useful

BossMan

unread,
Aug 7, 2010, 3:37:03 PM8/7/10
to Tasker
> My Tasker config got to be so complex that I finally spent a couple of
> hours documenting the entire thing in a Google Docs spreadsheet.
This is exactly how I ended up with my config too :) It did not take
hours, but definitely it was easier to have everything on one page to
see dependencies.

@Shadow-XIII - exit tasks are run before entry tasks of other profiles
(they have higher priority) so this is why I at first suspected your
"safeguard" profile (I thought it may happen that your variable goes
out of range and this profile limit it incorrectly). However, after
you gave details (range 0-2 inclusive) it seemed fine.
Anyway, log files are keys to solving all issues - good you are aware
of that now :-).

BR,
A.

SHADOW-XIII

unread,
Aug 7, 2010, 4:33:09 PM8/7/10
to Tasker
Yes, logs are now important but I would love to see better built-in
logfile option (maybe similar to mine I created manually)
That would report:
time(hh:mm:ss:ms) - task entery, parameters
time(hh:mm:ss:ms) - task exit, parameters
when debug option is enabled, and telling people to enable just debug
option and post a file would be much better solving-problem technique
than using aLogcat at the moment

and I would love to see variables management from the tasker (while
it's off, so I can clear them, edit them, etc)

Pent

unread,
Aug 8, 2010, 3:55:28 AM8/8/10
to Tasker
Hi, sorry to be slow responding.
Location contexts only exit as a result of:

1) get a fix that is outside the radius (after a bit of massaging)
2) are disabled
3) monitor is turned off

Turning off GPS means the context will never exit due to (1).

I havn't read all the way through, but sounds like you want to disable
the profile (see action Tasker / Profile Status).

Pent

p.s. (1) has plusses and minuses I know

SHADOW-XIII

unread,
Aug 8, 2010, 6:58:26 AM8/8/10
to Tasker
T

SHADOW-XIII

unread,
Aug 8, 2010, 7:01:44 AM8/8/10
to Tasker
Doh, wrong post earlier :/

Thanks a lot! That clarifies a lot. So the key is not to disable GPS
but to disable the profile.
But the problem is once the profile is disabled I have to switch it on
in future.
How about new Tasker Actions:
- Force Profile to Exit
or
- Disable Profile for X seconds/minutes
This way I would force profile to exit, however I don't have a clue
how that would work, since it might have to kick in again seconds
after if the condition is still true :/
(similar could be then: Force Profile to Enter)


On Aug 8, 8:55 am, Pent <tas...@dinglisch.net> wrote:

Pent

unread,
Aug 8, 2010, 11:49:04 AM8/8/10
to Tasker
> Thanks a lot! That clarifies a lot. So the key is not to disable GPS
> but to disable the profile.
> But the problem is once the profile is disabled I have to switch it on
> in future.

Well, you had the same problem with GPS didn't you ?

> How about new Tasker Actions:
> - Force Profile to Exit
> or
> - Disable Profile for X seconds/minutes

I think it's going to start confusing.

Pent
Reply all
Reply to author
Forward
0 new messages