Action when specific WiFi name is available

Post your questions and help other users.

Moderator: Martin

Post Reply
tedhw
Posts: 3
Joined: 02 May 2017 00:50

Action when specific WiFi name is available

Post by tedhw » 04 May 2017 04:43

Hi, I am new to Automagic and hoping someone can help with this scenario:

I would like an action when WiFi name "ThatWiFi" is detected, AND still detected after 5 minutes.
If I move away and the specific WiFi is no longer detected within 5 minutes, it will not trigger the action.
But it will continually check again and repeat the process.

My guess is this will have to be accomplished with Java programming, which I am not proficient on!
Can someone help?

Thanks. :)

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

Re: Action when specific WiFi name is available

Post by Martin » 04 May 2017 18:54

Hi,

You could use a flow like this:
-trigger WiFi Connected: ThatWiFi
-action Sleep: 5m
-condition WiFi Connected: ThatWiFi
--> true: -action Vibrate (or something else)

I did not entirely understand your continually checking part. If you mean that the flow should check for the WiFi every 5 minutes, you could also use a flow like this:
-trigger Periodic Timer: every 5m
-condition WiFi Connected: ThatWiFi
--> true: -action Vibrate (or something else)

Regards,
Martin

tedhw
Posts: 3
Joined: 02 May 2017 00:50

Re: Action when specific WiFi name is available

Post by tedhw » 05 May 2017 00:19

Hi Martin,
Thanks for your reply.
Sorry I should have explained more clearly.

I only like to check if "ThatWiFi" is available / detected, not connected to it.
So if "ThatWiFi" is available, and if still detected after 5 min then trigger the action.

And if "ThatWiFi" no longer available, then I want to regularly check if "ThatWiFi" available / detected again.
If detected then do same thing, wait for 5 mins, if continue to be available then trigger the action.

Hope this is clear Martin thanks.

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

Re: Action when specific WiFi name is available

Post by Martin » 07 May 2017 11:08

Hi,

You could use a flow like the following: WiFi Checker

The flow is executed whenever new wifi scan results become available by the system. The flow uses a global variable global_wifi_available to remember if the wifi was detected before and the action for availability was executed.
The left part of the flow is executed when the WiFi network becomes available. It then checks by using the global variable if the action has already been executed before. If not, it waits 5 minutes and then checks if the wifi is still available. If it is, it executes the action for availability and sets the global variable to true.
The right part of the flow is executed when the wifi is not available anymore.

Regards,
Martin

tedhw
Posts: 3
Joined: 02 May 2017 00:50

Re: Action when specific WiFi name is available

Post by tedhw » 08 May 2017 00:41

Thanks Martin,
That's exactly what I was looking for and it works well!!

Post Reply