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.
Entering/Exiting problem in Location based flow
Moderator: Martin
-
- Posts: 82
- Joined: 13 Jan 2014 21:39
Entering/Exiting problem in Location based flow
- 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
Re: Entering/Exiting problem in Location based flow
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
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
-
- Posts: 82
- Joined: 13 Jan 2014 21:39
Re: Entering/Exiting problem in Location based flow
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.
Thanks again.
Re: Entering/Exiting problem in Location based flow
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.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