Location precision problem

Post your questions and help other users.

Moderator: Martin

Post Reply
thewild
Posts: 12
Joined: 10 Mar 2017 10:13

Location precision problem

Post by thewild » 15 Mar 2017 07:56

Hi all

I recently switched from Llama to Automagic (no regret, it's great !), and have a problem with a flow checking a location.

I have a periodic location update trigger, then a location condition with entering/exiting checked (30m accuracy) , then a location condition with only entering checked (same location, same accuracy).
This morning, when the trigger ran for the first time, I was outside this location (like 2000m away), but the first condition returned true.

What's wrong with my setup ?

To make it a bit clearer, I'd like to achieve something quite simple : when arriving at work, store volumes and lower volumes. When leaving work, restore volumes.
So I expected the first location check to return false (i.e. not yet at work, so stop the flow). Should I check "ignore when previous state is unknown" ? I'm a bit perplexed by this option, since the help file says that last location is given by the location provider if available, and I was driving with GPS turned on so location was available for quite some time.

Thank for helping!

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Location precision problem

Post by Scotty » 15 Mar 2017 16:19

Since the first location condition returned TRUE, but (reading between the lines of your post) the second location condition did not, it seems likely that the first condition's returning TRUE did not happen because it thought you had entered the area - rather, it was responding to the fact that the first condition (unlike your second one) has "exiting" checked.

So, as you have proposed, I would check the "ignore when previous state is unknown" box. I would also UNcheck the "Accept Every Update / Inside" box.

Also, instead of following your first (entering/exiting) location condition with a second location condition, you can follow the first one with the Condition / Expression :

entering == true;

That new condition returns TRUE if you've entered the area, and FALSE if you've exited the area.

Finally, this very recent thread may help. I don't know if you've seen it - if not, remember to use the forum's search function (a search for "location" finds that thread). As I wrote there, Periodic Location Update can drain the battery, so I'd advise that you disable location flows by default (when you know that your location isn't going to change anytime soon e.g., when you're at home, or at work), and enable them only when you are changing your location (e.g., when driving).

Like you, I used Llama for years. As you're finding (or will find) Automagic is FAR more powerful. Next to my calendar app, it's the most important app on my phone (and it's by far the most fun to use).

All the best

Scotty

thewild
Posts: 12
Joined: 10 Mar 2017 10:13

Re: Location precision problem

Post by thewild » 15 Mar 2017 16:30

Thanks for the reply Scotty.
Scotty wrote:Since the first location condition returned TRUE, but (reading between the lines of your post) the second location condition did not, it seems likely that the first condition's returning TRUE did not happen because it thought you had entered the area - rather, it was responding to the fact that the first condition (unlike your second one) has "exiting" checked.

So, as you have proposed, I would check the "ignore when previous state is unknown" box. I would also UNcheck the "Accept Every Update / Inside" box.
OK, sorry but I realize that my post was not clear enough?
The first condition returned true, and the second one also returned true (i.e., it considered I DID enter the location).
I realized that because my music volume suddenly dropped to 1 while driving, which is supposed to only happen when I arrive at work.
So in fact the first condition did return TRUE because it thought I had entered the work area (or not, but I'm lost, that's why I ask here).
Also, instead of following your first (entering/exiting) location condition with a second location condition, you can follow the first one with the Condition / Expression :

entering == true;

That new condition returns TRUE if you've entered the area, and FALSE if you've exited the area.
Great tip, thanks !
I'm a beginner, but I already love Automagic. ;)


Finally, this very recent thread may help. I don't know if you've seen it - if not, remember to use the forum's search function (a search for "location" finds that thread). As I wrote there, Periodic Location Update can drain the battery, so I'd advise that you disable location flows by default (when you know that your location isn't going to change anytime soon e.g., when you're at home, or at work), and enable them only when you are changing your location (e.g., when driving).

Like you, I used Llama for years. As you're finding (or will find) Automagic is FAR more powerful. Next to my calendar app, it's the most important app on my phone (and it's by far the most fun to use).
I'll check this thread ASAP.
I did search, bu I must admit that I used Google and not the forum's search box. Also, I searched for "automagic location entering", or something like that (can't remember exactly). Not just "location".

About battery drain, it seems very constrained for the moment. 100% battery arriving at work, 95% left now and I'm leaving.
I use "balanced power/Accuracy" profile. The trigger is time limited (i.e. it only runs during approximative office hours), and I know that when I'm at the office I have a very good location precision without GPS (there are a lot of wifi networks around). So for so good.

Your right about Automagic, it's very powerfull and I already love it. I just have to master it and I'll be fully happy !

thewild
Posts: 12
Joined: 10 Mar 2017 10:13

Re: Location precision problem

Post by thewild » 16 Mar 2017 10:09

thewild wrote:The first condition returned true, and the second one also returned true (i.e., it considered I DID enter the location).
I realized that because my music volume suddenly dropped to 1 while driving, which is supposed to only happen when I arrive at work.
So in fact the first condition did return TRUE because it thought I had entered the work area (or not, but I'm lost, that's why I ask here).
OK, so I have left the flow unchanged, but this morning it ran perfectly well.
Is it because the last time the flow was executed (i.e. yesterday evening), I was outside the area, and therefore the location was known to be outside and the "entering" state could be triggered ?
That's my only guess at the moment.

Also, instead of following your first (entering/exiting) location condition with a second location condition, you can follow the first one with the Condition / Expression :

entering == true;
I still have to try this. It doesn't really make a difference, but it simplifies the flow a little bit by removing a condition.
Like you, I used Llama for years. As you're finding (or will find) Automagic is FAR more powerful.
We're going off-topic, but have you tried to emulate Llama profiles with Automagic ?
As of now, my flow triggers 3 different actions to make my phone quiet (volume ringer 1, volume notification 1, volume music 1). In Llama, I would set these volumes in a profile, and simply activate that profile in an event.

Edit : I just realized that a trigger could be left empty. So I could put all these volume changes in a flow with an empty trigger, and call that flow from the main one. I'll give this a try.

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Location precision problem

Post by Scotty » 16 Mar 2017 15:10

thewild wrote:
Also, instead of following your first (entering/exiting) location condition with a second location condition, you can follow the first one with the Condition / Expression :

entering == true;
I still have to try this. It doesn't really make a difference, but it simplifies the flow a little bit by removing a condition.
You're not really removing a condition, you're replacing one (location) with another (expression). I think it may make a difference, because when you enter the area, your first location condition returns TRUE, so automagic has acknowledged that transition; I'd guess (don't know for sure) that the second location condition will look for a transition and (since that's already been acknowledged), it might return false. Then again, that may depend on other settings in the condition (Accept Inside, etc). But why take the chance, when the expression condition avoids it altogether?
thewild wrote: We're going off-topic, but have you tried to emulate Llama profiles with Automagic ?
As of now, my flow triggers 3 different actions to make my phone quiet (volume ringer 1, volume notification 1, volume music 1). In Llama, I would set these volumes in a profile, and simply activate that profile in an event.

Edit : I just realized that a trigger could be left empty. So I could put all these volume changes in a flow with an empty trigger, and call that flow from the main one. I'll give this a try.
I have several settings similar to Llama profiles. As your edit suggests, they can be activated via another flow (this is true even when the trigger is non-empty). Flows can also be activated manually (using a shortcut).

Two more things to say.

First, you can have multiple triggers in a single flow (you're not limited to one trigger); this can be useful.

Second, if you haven't played with widgets, I urge you to do so. I used to use (with Llama) an old app named Zooper, which allowed you to create custom widgets, which could be linked to Llama profiles, actions etc. Automagic widgets are every bit as graphically powerful as Zooper, and can be linked to flows. So, for example, it's easy to create a widget that shows battery charging status, as well as the current charge & temp, for both of which the text color changes depending on the reading....
Image

thewild
Posts: 12
Joined: 10 Mar 2017 10:13

Re: Location precision problem

Post by thewild » 16 Mar 2017 16:12

Scotty wrote:I think it may make a difference, because when you enter the area, your first location condition returns TRUE, so automagic has acknowledged that transition; I'd guess (don't know for sure) that the second location condition will look for a transition and (since that's already been acknowledged), it might return false.
Well, has I said the profile worked fine this morning, so the second check does work.
I found this "trick" in another thread, so I think it's OK.


I have several settings similar to Llama profiles. As your edit suggests, they can be activated via another flow (this is true even when the trigger is non-empty). Flows can also be activated manually (using a shortcut).
Yes, but if the trigger is non empty and has a condition, this condition is still checked. I think that an empty trigger is better to remove potential problems out of the way.
First, you can have multiple triggers in a single flow (you're not limited to one trigger); this can be useful.
Yes, I've already used this feature. Works nicely. Thanks for the tip.
Graphically, I think it would be better with multiple "trigger boxes" than with a single one containing all the triggers, but it works just fine.
Second, if you haven't played with widgets, I urge you to do so.
Well I don't use widgets (at all), so no thanks ;)

Post Reply