Entering/Exiting problem in Location based flow

Post your questions and help other users.

Moderator: Martin

Post Reply
skiptannen
Posts: 82
Joined: 13 Jan 2014 21:39

Entering/Exiting problem in Location based flow

Post by skiptannen » 20 Jun 2014 18:00

I'm struggling with getting a simple location based flow working. I have two flows based on the trigger Periodic Location Update - the first one (Arrive Location) simply creates a notification when arriving at a predetermined location, and the other one (Leave Location) creates a notification when leaving a predetermined location. The Arrive Location flow works fine, but I have never gotten the Leave Location flow to work. The flows and parameters are identical, except the Arrive Location flow has "Entering" checked in the condition Location and "Exiting" is checked in the Leave Location flow.

I've done some reading in the forums, gone over the explanations for the various triggers and conditions, and played around with different settings, but I can't figure out what's going on here. I've attached the two flows and I would sure appreciate some help on this - I'm still a bit of a newbie, but there's either a concept I'm missing or something else is going on.

Thank you.
Attachments
log_Leave-Location.txt
(6.06 KiB) Downloaded 728 times
flow_Leave_Location_Task_20140620_135506.xml
(3.07 KiB) Downloaded 763 times
flow_Arrive_Location_Task_20140620_135520.xml
(3.08 KiB) Downloaded 763 times

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Entering/Exiting problem in Location based flow

Post by Martin » 21 Jun 2014 07:29

Hi,

The condition Location needs to be executed at least once with a location inside the area of interest so that it can determine if the location was exited later. I assume the the flow was never executed with a location inside the garden center or variable global_myTaskList did not contain a task at this point in time. You could try to switch the order of the two conditions so that the location condition is executed first and has a chance to properly initialise regardless of the task list.

You could also use a trigger Location with both Entering/Exiting checked and then use a condition Location Entering to distinguish between the two cases which would allow to keep everything in one flow. The modern version (experimental) is usually quite battery saving.

Regards,
Martin

skiptannen
Posts: 82
Joined: 13 Jan 2014 21:39

Re: Entering/Exiting problem in Location based flow

Post by skiptannen » 23 Jun 2014 14:31

Thanks for the suggestions, Martin. After messing around with a number of different settings, I finally got it working. I found that the trigger Periodic Location Update set to High Accuracy (Experimental) would capture the coordinates, then I could test and branch off with the condition Location set up with Ignore Previous State and Inside unchecked. I think using the High Accuracy (Experimental) provider in the trigger was the secret sauce.

Thanks again.

cimbrum
Posts: 9
Joined: 22 Jan 2014 15:27
Contact:

Re: Entering/Exiting problem in Location based flow

Post by cimbrum » 27 Jun 2014 05:51

Martin wrote:Hi,

The condition Location needs to be executed at least once with a location inside the area of interest so that it can determine if the location was exited later. I assume the the flow was never executed with a location inside the garden center or variable global_myTaskList did not contain a task at this point in time. You could try to switch the order of the two conditions so that the location condition is executed first and has a chance to properly initialise regardless of the task list.

You could also use a trigger Location with both Entering/Exiting checked and then use a condition Location Entering to distinguish between the two cases which would allow to keep everything in one flow. The modern version (experimental) is usually quite battery saving.

Regards,
Martin
Thanks, I encountered this issue, too! But you should help us with little pop-up messages (or something like else) if some additional operations are required on different triggers, etc. I never thought I have to execute the Location trigger at least once (!) onto a desired location.

Post Reply