Autolocation geofence and Android device manager location question

215 views
Skip to first unread message

Mike Kramer

unread,
Feb 4, 2015, 4:30:11 AM2/4/15
to joao...@googlegroups.com
The last couple of days I have a problem with my wife leaving the 'home' geofence. The phone triggers 'away' when she just leaves the house, which is well inside the geofence, triggers home more or less straight after, and that happens a few times. By the time she is outside the fence (by quite some distance) it is back on 'home'. When I check where she is via the Android device manager, I can see that she is well outside the fence. Do these have anything to do with each other or are these unrelated to the autolocation geofence ?

João Dias

unread,
Feb 4, 2015, 6:21:20 AM2/4/15
to joao...@googlegroups.com
So it worked before and suddenly stopped working?

On Wed, Feb 4, 2015 at 9:30 AM, Mike Kramer <mkram...@gmail.com> wrote:
The last couple of days I have a problem with my wife leaving the 'home' geofence. The phone triggers 'away' when she just leaves the house, which is well inside the geofence, triggers home more or less straight after, and that happens a few times. By the time she is outside the fence (by quite some distance) it is back on 'home'. When I check where she is via the Android device manager, I can see that she is well outside the fence. Do these have anything to do with each other or are these unrelated to the autolocation geofence ?

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

Mike Kramer

unread,
Feb 4, 2015, 8:41:09 AM2/4/15
to joao...@googlegroups.com
Yes. And it is very similar on my phone. For example, my home geofence is about 700m, and used to trigger 99% reliably on the border coming in or leaving. Lately (and seems to be getting worse), I keeps triggering. I have just seen my wife unlocking the house. Autolocation set the profile 'home'. 4 seconds later, it set it to 'away'. 30 seconds later to 'home' again, 2 seconds later to away and then finally a split second later to home where it stayed. I have the same problem now leaving the house, it sets to away, a few seconds later back to home, and that goes on a few times until (most of the time) it settles with away (as it should as I have left).
I never used to have that many triggers, I think it has been about 2 weeks maybe a little longer. I have not changed my geofences at all.

João Dias

unread,
Feb 4, 2015, 8:44:00 AM2/4/15
to joao...@googlegroups.com
Can you please try this version I just built and see if it works better Thanks and sorry for the trouble.

Mike Kramer

unread,
Feb 4, 2015, 8:54:18 AM2/4/15
to joao...@googlegroups.com
It will not install, no idea why. I clicked install from unknown sources as I always do, but after that I had app not installed

João Dias

unread,
Feb 4, 2015, 8:57:02 AM2/4/15
to joao...@googlegroups.com
Oh, sorry about that. Can you try again please? https://dl.dropboxusercontent.com/u/9787157/apk/AutoLocation.apk

Mike Kramer

unread,
Feb 4, 2015, 9:06:19 AM2/4/15
to joao...@googlegroups.com
This time install on my phone worked, I will install it on my wifes tonight and let you know how I get on
 
Thanks

João Dias

unread,
Feb 4, 2015, 10:11:55 AM2/4/15
to joao...@googlegroups.com
Thanks!

Mike Kramer

unread,
Feb 5, 2015, 3:01:52 AM2/5/15
to joao...@googlegroups.com
I am running your autolocation beta. I have system logs enabled, and have emailed you the logs. At 6:09 it registered me leaving the home geofence, I must have been still inside the fence in my opinion, at 6:10 it registered me inside again, and finally at 6:11 outside again. One other thing, I have a profile 'Away' which is triggered when outside my home geofence. I have attached a notification to it so I can see when that has been triggered, and it has been triggered at 6:09 and 6:11, so it was autolocation triggering. What is strange, the profile is not lit now. I am now at work, about 35 miles away from home (home geofence radius is about 0.5 miles), and the 'Away' profile is not lit, while the 'At Work Location' profile for example, is lit. I don't really understand why the profile triggers when leaving the geofence home, but does not stay true or lit. The home geofence is set up as 'home outside' in autolocation in case that makes a difference

João Dias

unread,
Feb 5, 2015, 5:29:11 AM2/5/15
to joao...@googlegroups.com
Regarding the rapid in and out behaviour, I recommend you try to set Wait Time on that geofence in the main autoLocation App (long-touch the geofence and select "Set Wait Time"). Set it to something like 5 minutes for example.

About your profile, can you please your away from work profile (description, not xml) so I can take a look? thanks!

Mike Kramer

unread,
Feb 5, 2015, 8:02:03 AM2/5/15
to joao...@googlegroups.com
One problem if I set a wait time. If I do that, the light will not come on when I come home, or I have to set a far wider geofence which is not that practical. On the way home for me, My train passes close to the home geofence. If I set that wider, it will activate the fence, then deactivate it again as I go past my house on the way home and to work. Also, when I come home by car, The lights in the house come on the moment I pull into the drive, sometimes a few seconds after. So if I put in a delay, they will not come on in time...
 
Here is my away Profile:
 
I set Mdata to 1 when I have mobile data available, The profile should not execute when I am logged into my home wifi (%PACTIVE Home Wifi)
 

Away (65)

                Run Both Together

                A1: Wait Until [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ] If [ %Mdata ~ 1 ]

                A2: If [ %PACTIVE !~ *,Home Wifi,* ]

                A3: AutoVera Devices [ Configuration:Vera: Vera 3

Device: (*)Mike's phone

Action: Set Target

New Target Value: 0

Service: V Switch Package:com.joaomgcd.autovera Name:AutoVera Devices Timeout (Seconds):30 ]

                A4: Variable Set [ Name:%Home To:0 Do Maths:Off Append:Off ]

João Dias

unread,
Feb 5, 2015, 8:05:28 AM2/5/15
to joao...@googlegroups.com
Thanks. But can you post the full profile and not just the task so I can look at the AutoLocation condition? Thanks

Mike Kramer

unread,
Feb 5, 2015, 8:19:22 AM2/5/15
to joao...@googlegroups.com
Sorry I meant to...
 

Profile: Away (135)

                Event: AutoLocation Geofences [ Configuration:Geofence Name: home

Status: Outside ]

Enter: Away (65)

                Run Both Together

                A1: Wait Until [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ] If [ %Mdata ~ 1 ]

                A2: If [ %PACTIVE !~ *,Home Wifi,* ]

                A3: AutoVera Devices [ Configuration:Vera: Vera 3

Device: (*)Mike's phone

Action: Set Target

New Target Value: 0

Service: V Switch Package:com.joaomgcd.autovera Name:AutoVera Devices Timeout (Seconds):30 ]

                A4: Variable Set [ Name:%Home To:0 Do Maths:Off Append:Off ]

 

Exit: Test Away (121)

                A1: Email Me Pro [ Configuration:To: x...@gmail.com, Subject: Away test, Body: taske... Package:com.caramellabs.emailmepro Name:Email Me Pro Timeout (Seconds):0 ]

                A2: Perform Task [ Name:Leaving Secure Place Priority:%priority Parameter

1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]

 

João Dias

unread,
Feb 5, 2015, 8:43:55 AM2/5/15
to joao...@googlegroups.com
It's not lightng up because you used an event and not a state :)
Use a state and it'll behave like you want.

Hope this helps!

Mike Kramer

unread,
Feb 5, 2015, 8:58:40 AM2/5/15
to joao...@googlegroups.com
Ok I did not notice that, its lit now. Have you got any suggestions (other than the 5 min wait on the geofence) about the false triggers ?

Mike Kramer

unread,
Feb 5, 2015, 5:33:03 PM2/5/15
to joao...@googlegroups.com
Still having problems, the change from event to state did not help with the quick triggers.I came home bar car tonight, and by the time the home geofence triggered I was in my garage. Within 2 seconds, it triggered away, and a minute later home again and a few seconds later away. That happend again another minute later, but the home was within a second of the away, so it did not register with my system and the alarm went off when I opend a door... Looking at my notifications. it was autolocation geofence which triggered this. I am not sure why this is happening after it has worked fairly reliable for months, i I have never had these quick triggers away - home - away before. Could it be something has changed in one of the autovoice updates ? Mine is on autoupdate, so updates with every update automatically

Mike Kramer

unread,
Feb 6, 2015, 2:44:13 AM2/6/15
to joao...@googlegroups.com
I did send another log in case it helps, times in question are from around 21:47 to 21:51, and before that 18:27 to 18:31 was quite a few as well

João Dias

unread,
Feb 6, 2015, 3:39:47 AM2/6/15
to joao...@googlegroups.com
Yes, the state won't help with those. That happens because the location recognition is probably not very precise when you're in your garage.
Can you try this: add a 5 minute wait action inside the entry task of that profile. If I understand how Tasker works correctly, the task probably won't run again until the 5 minutes are up.

Hope this helps!

Mike Kramer

unread,
Feb 6, 2015, 3:50:59 AM2/6/15
to joao...@googlegroups.com
Its not just in the garage. It was before too when I was walking home (18:27 to 18:31). As I said before, if I put that 5 min delay in, my lights wont come on until I've been home for 5 minutes... The idea is to have the lights come on before I come home...

João Dias

unread,
Feb 6, 2015, 3:54:15 AM2/6/15
to joao...@googlegroups.com
No, I mean put the delay at the end of the task, not the beginning. Then it'll turn the lights on and wait for 5 minutes

Mike Kramer

unread,
Feb 6, 2015, 4:18:30 AM2/6/15
to joao...@googlegroups.com
ah sorry now I see what you mean. So at the end of my away task, just add wait 5 mins, and the same on the home task. What do you think I should do with collision handling on that ?

João Dias

unread,
Feb 6, 2015, 4:31:21 AM2/6/15
to joao...@googlegroups.com
Make sure that you only allow that task to run once at a time, so that it has to wait the 5 minutes before it can run again. I think I could probably make the "Wait Time" in AutoLocation to behave like this. Would be ideal, right?

Mike Kramer

unread,
Feb 6, 2015, 4:36:15 AM2/6/15
to joao...@googlegroups.com
Yes that would be ideal, as that would allow other tasks to run at the same time. But I like the idea, I think that should be a very good way of getting round my problem. I'll do wait now, and if you do implement it in autolocation, please let me know and I swap.

Mike Kramer

unread,
Feb 10, 2015, 2:53:03 AM2/10/15
to joao...@googlegroups.com
I got it working fine I think with the wait in the task and collision handling set to 'abort new task', but it would be good to handle this in autolocation as you suggested, as that then does not block or abort other tasks. Do you think you could incorporate that at some point ?

João Dias

unread,
Feb 10, 2015, 4:53:46 AM2/10/15
to joao...@googlegroups.com
Yeah, I could try. It's on my todo list :)

Mike Kramer

unread,
Feb 10, 2015, 5:39:26 AM2/10/15
to joao...@googlegroups.com
Fantastic. Thanks

Mike Kramer

unread,
Feb 17, 2015, 4:13:22 PM2/17/15
to joao...@googlegroups.com
The 'Wait' at the end of my Away and Home tasks seemed to have worked, but with these setings replicated on my wifes phone, I noticed today 2 occasions where the Home was followed by the Away within seconds. That happened a few times. I have a 4 minute wait after it sends the commands to my Vera, and collission handling set to abort new task. So in theory it should not be able to send the other task, but it does. I have attached a notification to each of those tasks to be able to confirm if it was that task firing, and it was. So even though the task 'home' was still running and on the 'wait' action, it fired the 'away' task.
I dont know if that is a bug in tasker, or if our logic with the wait task was wrong.

This is my 'home' task (without the attached notifiaction)

Home (6)
    A1: Wait Until [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ] If [ %Mdata ~ 1 ]
    A2: If [ %Home eq 0 ]

    A3: AutoVera Devices [ Configuration:Vera: Vera 3
Device: (*)Mike's phone
State: Turn On
Action: State
Service: Power Switch Package:com.joaomgcd.autovera Name:AutoVera Devices Timeout (Seconds):30 ]
    A4: AutHomationHD Device [ Configuration:(*)Mike's phone Package:com.garrettpower.authomationhd Name:AutHomationHD Device Timeout
(Seconds):0 ]
    A5: Variable Set [ Name:%Home To:1 Do Maths:Off Append:Off ]
    A6: Perform Task [ Name:Secure Place Priority:%priority Parameter 1

(%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]
    A7: Email Me Pro [ Configuration:To: x...@gmail.com, Subject: Home tasker Package:com.caramellabs.emailmepro Name:Email Me Pro Timeout
(Seconds):0 ]
    A8: Wait [ MS:0 Seconds:0 Minutes:4 Hours:0 Days:0 ]

João Dias

unread,
Feb 18, 2015, 5:50:19 AM2/18/15
to joao...@googlegroups.com
Hmm.. Weird how it has a different behaviour on your wife's phone. Are you maybe using a different tasker version?

Maybe you could try asking in the tasker forums as this is (as you said) a Tasker issue. Maybe they'll be able to help further? :)

Sorry for the trouble.

Mike Kramer

unread,
Feb 18, 2015, 6:17:55 AM2/18/15
to joao...@googlegroups.com
I have posted in the tasker forum. Even though I am using exactly the same geofence on my wifes phone (I copied the backup from my phone over to hers), have the location monitor enabled, I get false triggers with her phone. She leaves the house, the phone goes away, and even though is is going even further out of the geofence, somehow it triggers home again. With attached notifications I have narrowed this down to autolocation being the trigger. So somehow there is a problem there, unrelated to the wait being ignored. The phones are not identical, I hace a Sansung S5, she has the S5 mini. Both are on the same (up to date) tasker and autolocation versions, even the tasker profiles are identical except for with switch in my Vera is triggered by the tasks.
Very strange. Its driving me crazy...

Marta Hintz

unread,
Feb 18, 2015, 11:09:01 AM2/18/15
to joao...@googlegroups.com
Perhaps one is better at GPS then the other. I had a Samsung s3, that I struggled with geofences, but same task in my new note 3 was golden. My note 4, still awesome.

Mike Kramer

unread,
Feb 18, 2015, 11:28:33 AM2/18/15
to joao...@googlegroups.com
I did want to buy her the S5, but that is too big for her...  I love the Note 4, but that's too big even for me
But that might be a reason. Very annoying though...  I think it could still be something else. Once it is out of the fence, and I turn my Vera manually to away (I have a logic doing that after a while of no pings), it does not turn back to home until she re-enters the geofence.
Reply all
Reply to author
Forward
0 new messages