WiFi triggers? how are they different?

Post your questions and help other users.

Moderator: Martin

Post Reply
Econdoc
Posts: 153
Joined: 28 May 2016 20:06

WiFi triggers? how are they different?

Post by Econdoc » 15 Jun 2016 20:04

I have a timed flow that is supposed to execute every two hours. When this triggers, I want to do some ACTION if I am connected to my home WiFi. What seems to be happening at the appointed time:
1. I AM connected to my home WiFi
2. My phone is asleep
3. The ACTION never gets done.

There are three WiFi conditions:
WiFi Available
WiFi Connected
WiFi Access Point Enabled

Can anyone tell me how are these different form each other? The descriptions under triggers is not complete enough for me to distinguish what each trigger does that is different from other triggers.

Which one do I want to use for my task? Basically, run ACTION when I am connected to my home WiFi even if the phone is asleep.

Thanks for any help.

User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

Re: WiFi triggers? how are they different?

Post by Bushmills » 16 Jun 2016 08:00

Sorry for pasting the text written in reply to an earlier, similar, question, at http://automagic4android.com/forum/view ... f=5&t=5928:
"I'd use condition "active network type", test for WLAN, and take SSID from variable network_extra_info."

If the condition "home/away" is needed in many flows, or frequently, consider to maintain a global variable, indicating your phone's home / away state, which then may be more elaborate than merely testing SSID (you may be home while your router is down, for example), while testing for home condition becomes as simple as using the bool value of that global variable as return value from an expression condition. It also can be directly used in script actions (which is not the case for network status testing), and can serve as trigger as well as condition (network testing can do that too)

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: WiFi triggers? how are they different?

Post by Econdoc » 16 Jun 2016 11:24

Thanks for the reply. The link you pasted is not on this topic and I assume not what you intended to paste.
The differences between the three conditions I listed remain very murky.

You write "I'd use condition "active network type", test for WLAN, and take SSID from variable network_extra_info."
I confess to not following what you wrote. Can you expand on that? Sorry, but I am a noobie.

User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

Re: WiFi triggers? how are they different?

Post by Bushmills » 16 Jun 2016 11:45

Indeed was the topic different, but the actual question was similar.
What part of "I'd use condition "active network type", test for WLAN, and take SSID from variable network_extra_info." would you like me to expand on?

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: WiFi triggers? how are they different?

Post by Econdoc » 16 Jun 2016 13:27

The link you sent was about formatting. It had nothing to do with my WiFi question.

User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

Re: WiFi triggers? how are they different?

Post by Bushmills » 16 Jun 2016 14:21

No, it wasn't about formatting. It was about obtaining the WIFI SSID. But the topic said it was about "formats", due to poster not knowing any better how he should call what he wanted to know.

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: WiFi triggers? how are they different?

Post by Econdoc » 20 Jun 2016 22:58

I am back again. Still not satisfied with the answers provided.
I thank the responder for his time and patience, but ask that he realize that I am unfamiliar with the terminology. The fact is that the descriptions of some of the actions/conditions/triggers are less than clear.
I am back to my original question, which remains unanswered:
There are three WiFi conditions:
WiFi Available
WiFi Connected
WiFi Access Point Enabled
Can anyone tell me how are these different form each other?

I have flows that are supposed to be TRIGGERED on connection to a specific SSID. I have used WiFi Connected as that trigger. It appears that that trigger get activated over and over and over. The way I read the description, it would get activated once on initial connection. So something is not working the way it is described or something else is going on that remains unexplained.
Bushmills: I am a noobie. Try to explain this to a 10 year old. That will work for me. ;)

User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

Re: WiFi triggers? how are they different?

Post by Bushmills » 21 Jun 2016 07:04

I'm not really sure what you're asking: you want a timed trigger, running every 2 hours, which tests whether you are connected to a specific WLAN, but you also want the flow triggered by the connection event to that WLAN - while this is entirely possible, it requires awareness of the difference between triggers and conditions, which is essentially: triggers prefer responding to events, while conditions like to test states. "Connecting" is an event, while "being connected" is a state.
However, the difference between "available" and "connected" is that a WLAN which is merely available but not connected to can't be used to send data through - connecting to it is first needed. Essentially, you look at those which are available, take your pick, and connect to the network you picked. "Access point enabled" looks at and reports from your system configuration, but doesn't care about the actual connection.
For why your flow, triggered by "WiFi connected", is executed over and over again, add another trigger which tests whether your device also gets disconnected again, prior to reconnecting - I use that trigger too, and don't experience your observations. It will reconnect sometimes, but will generally stay connected for many hours, as long as I don't leave its range. Armed with both "connect" and "disconnect" triggers, I'd then examine whether this frequent reconnection happens with a specific network only, or with any.

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: WiFi triggers? how are they different?

Post by Wibbly » 22 Jun 2016 13:24

WiFi Available: True when you would see the access point in the list of access points you could connect to in the devices's list of access points it can see (regardless of if you have the password etc for it)
WiFi Connected: True when the specific access point (or one of them) is actually connected to your device
WiFi Access Point Enabled: True if the selected access point has been configured on your device (e.g. the password for it has been stored at some point)

Post Reply