Location at not working

1,103 views
Skip to first unread message

Oliver Völker

unread,
Apr 14, 2016, 8:01:41 AM4/14/16
to Automate
It seems, Automate is more tricky than expected :(

I have a "Is at location" block. I've selected the location in the map and verified the coordinates via Google maps. The radius is 2000m.
When I'm at this location it should turn on Wifi, else turn it off.
I've added to dialogs to see the result of the location check and it's always the "no" exit.
Then I've added a block to show my position in Google Maps and it's showing the correct possition.

Why is Automate not activating Wifi?
Any idea?

Reagrds,
Oliver

Florian HubSpace

unread,
Apr 14, 2016, 10:01:54 AM4/14/16
to Automate
I am not as familar with the coding behind the location at block but: 

"The Location at block with proceed 'Maybe immediately' do timeout if it doesn't get an 'enter' event within 10s.
Sadly it's how the Android (not Google Play Services) geofencing works, if you're in the area it sends an event, if you're not in the area nothing is sent."

Try out if there is any improvement when you disable/enable "Google Play Services" in the settings.

PS: Maybe your SAP buildings are very shielded from any GPS connection :D

Oliver Völker

unread,
Apr 14, 2016, 10:09:01 AM4/14/16
to Automate
Hi,

I don't have GPS in the office.
But a rough position should be available via phone signal or something like this. e.g. Maps shows my position exact.

Enableling Play Service API seems to solve my Problem! :)

Thanks!

I will do some mor tests tomorrow :) Now I'm leaving the office :D

Oliver Völker

unread,
Apr 14, 2016, 12:34:21 PM4/14/16
to Automate
Still not really working.
after the start it switched on WIFI, but after leaving office it didn't switch off. Then I switched it of on my way home after 10 minutes or so, but wifi wasn't actived at home.

Any idea?
WLAN.flo
Screenshot_2016-04-14-18-30-58.png

Henrik "The Developer" Lindqvist

unread,
Apr 14, 2016, 1:58:36 PM4/14/16
to Automate
Why is the flow using two additional "Is at location" checks?

Oliver Völker

unread,
Apr 14, 2016, 2:29:46 PM4/14/16
to Automate
It should turn on WIFI on three different locations

Henrik "The Developer" Lindqvist

unread,
Apr 14, 2016, 2:41:18 PM4/14/16
to Automate
Well, that won't work. You have to use proceed "When change" for all of them, put each in a separate fiber using the Fork block.

Oliver Völker

unread,
Apr 14, 2016, 3:46:31 PM4/14/16
to Automate
Thanks for the hint!
Will test it...

What needs to be done to turn WIFI off when leaving the location?

Or are the exits of the three location Blocks linked to the fork block?

Oliver Völker

unread,
Apr 14, 2016, 3:56:24 PM4/14/16
to Automate
Ok... Read the doc and don't understand the fork block :(
Is there an example where I can see the fork "in action" ?

Adriano Marzano de Carvalho

unread,
Apr 14, 2016, 9:12:23 PM4/14/16
to Automate
Imagine the fork block as different fibers runnig. Imagine you're actually creating 3 different flows.

Each fork allows you to create a new fiber, but actually within the same flow.

Therefore, you can do:

Fork -> NEW fiber for location 2
|
Fork -> NEW firber for location 3
|
Continue here for location 1

I hope it helps somehow.
You can find a lot of examples also in the community icon within the app.

Oliver Völker

unread,
Apr 15, 2016, 1:57:04 AM4/15/16
to automa...@googlegroups.com
Ah thanks!

Now I understand the concept. Will try it out :)

EDIT:
OK.... I've created the beginning like you showed me and it's easy to turn Wifi on: (Any Location Check exits with "Yes" -> Turn Wifi on)
But how should I turn wifi off?
Just going from location check "no" to "Wifi off" won't work, because at least two of the three checks will fail.
The only Idea I have is a delay when turning Wifi on.
So 2 of the 3 checks will turn Wifi off and the 3rd will turn it on after a short delay.

Any better idea?

After turning Wifi on or off I just continue with the first fork block?

Sorry for these maybe silly questions, but I neeed to get used to the logic behind :)


furyd...@gmail.com

unread,
Jul 6, 2016, 8:49:47 AM7/6/16
to Automate
I'm facing the same problem.
GPS is always active on my device and my location is mostly accurate on maps, I configured 3 fibers with two forks for automating wifi activation on 3 location.

None of these works, wifi didn't disable when out of every location et didn't enable when entering in one of them.

Flow is quite simple
Begin -> Fork -> Fork -> When at location (when change) -> enable wifi -> go back to location
         |       |                                   or -> disable wifi -> go back to location
         |       When at location (when change) -> enable wifi -> go back to location
         |                                   or -> disable wifi -> go back to location
         When at location (when change) -> enable wifi -> go back to location
                                     or -> disable wifi -> go back to location

All fibers are running but get stuck on location block.

Henrik "The Developer" Lindqvist

unread,
Jul 6, 2016, 1:28:26 PM7/6/16
to Automate, furyd...@gmail.com
Did you follow the instructions to in the documentation:
http://llamalab.com/automate/doc/block/location_at.html

Try using a larger radius.

furyd...@gmail.com

unread,
Jul 6, 2016, 2:50:55 PM7/6/16
to Automate
I think this block isn't the most difficult to use, is it ?

I pick the location on the map at the same place of the blue dot marking my current location.
I also tried to set a big radius but for an unknown reason two of them fall back to 136.41009216920986m (big enough I guess) !
The third stay at 250m.

I just checked the log and saw a very strange behaviour.
All fibers were started at 07:42.
I entered the 3rd fiber area (block 12) at about 12:10 ... no reaction.
I leaved the 3rd fiber area at about 12:45 ... no more reaction.
I came back to home at 15:30, the block 6 triggers ... and block 8 (3rd area, leaved at 12:10) resulting in wifi activation immediately followed by deactivation.
Without moving, block 6 triggers a "NO" (disable wifi) at 20:30 then a "YES" (enable wifi) at "20:31"

I saved the log & the flow :
https://www.dropbox.com/s/dirfsd0ls0evd5n/flow-9.log?dl=0
https://www.dropbox.com/s/zxwfe1pwx14jovs/Wi-Fi%20maison.flo?dl=0

Henrik "The Developer" Lindqvist

unread,
Jul 6, 2016, 10:34:53 PM7/6/16
to Automate, furyd...@gmail.com
Sorry i meant the instruction to disable any power save feature, doze, etc. as described in the doc.

The "Balanced" provider used for geofencing has an accuracy of 100m, so a 130m radius may be a bit small.

furyd...@gmail.com

unread,
Jul 7, 2016, 1:25:26 AM7/7/16
to Automate
Thanks,

I don't have any power saving enabled on my S5.

Please note that's the fiber configured with 250m radius which didn't trigger, the first one (home) successfully enabled wifi when I came back to home.
Althought, there was a very strange behaviour yesterday, why did block 12 triggered a NO at 17:30 when block 6 triggered YES ?
I was very far away 3rd area (several km) since hours and I used my phone several times in between (game, call).

I've updated to 1.2.1 and extended radius to 250m on all "location at" blocks, will see today if it works as expected.
Reply all
Reply to author
Forward
0 new messages