De-/activate WiFi in multiple locations

Post your questions and help other users.

Moderator: Martin

Post Reply
Viking84
Posts: 22
Joined: 01 Dec 2013 08:01

De-/activate WiFi in multiple locations

Post by Viking84 » 01 Dec 2013 08:12

Hi all,

I've just started using Automagic and have a question regarding location based triggers.
Ideally, I'd like to create a flow that checks my location periodically to activate WiFi in three different areas (maybe more to come): at home, in the office and at a regular client's.

But since I can't find a condition like IF ... OR, IF ... ELSE or similar, I'm wondering how to achieve this?
If I just create 3 different flows my thoughts are that they would basically deactivate each other, since each flow would have a 'FALSE' state to disable WiFi based on a different location.

Any ideas or suggestions?

Best,
Chris

pat2net
Posts: 85
Joined: 01 May 2013 09:18

Re: De-/activate WiFi in multiple locations

Post by pat2net » 01 Dec 2013 13:36

I'm using cell ID to activate and desactivate wifi. It's not very accurate but it use less battery and it's working well for me. I use these two to activate or desactivate other flows.

http://automagic4android.com/flow.php?i ... 4c053a92bd

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

Re: De-/activate WiFi in multiple locations

Post by Martin » 03 Dec 2013 17:23

Hi,

You can also combine multiple conditions in a flow to create more complex logic (AND, OR, XOR).
This post shows some examples: http://automagic4android.com/forum/view ... 3868#p3868

Regards,
Martin

Viking84
Posts: 22
Joined: 01 Dec 2013 08:01

Re: De-/activate WiFi in multiple locations

Post by Viking84 » 04 Dec 2013 07:27

Thanks, both ways looks good to me! Since there's a lot of space between all of my locations, saving battery sounds pretty neat - do you know a good app to easily read my cell ID? Or can it be done with regular services already present in android? I'm on 4.4 if that matters.

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

Re: De-/activate WiFi in multiple locations

Post by Martin » 04 Dec 2013 18:02

You can use the Start/Stop buttons in trigger Phone Cell GSM or Phone Cell CDMA to collect the cell IDs your currently connected to. You can also use the similar named conditions to check for the cell ID. The triggers and conditions also make the cell IDs available to the executed flow in variables lac and cid (GSM) respectively cell_id (CDMA).

Viking84
Posts: 22
Joined: 01 Dec 2013 08:01

Re: De-/activate WiFi in multiple locations

Post by Viking84 » 05 Dec 2013 08:02

Thanks Martin, that did the trick!

pat2net
Posts: 85
Joined: 01 May 2013 09:18

Re: De-/activate WiFi in multiple locations

Post by pat2net » 08 Dec 2013 14:27

For your info it took me about one week to save all the cell ID for my home. When you see that the trigger isn't fire go to the trigger and collect the new cell ID (start collect then stop). If your using also a condition you can select the text in the trigger then copy an past in the condition. Good luck!

Post Reply