Page 1 of 1

Action when specific WiFi name is available

Posted: 04 May 2017 04:43
by tedhw
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. :)

Re: Action when specific WiFi name is available

Posted: 04 May 2017 18:54
by Martin
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

Re: Action when specific WiFi name is available

Posted: 05 May 2017 00:19
by tedhw
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.

Re: Action when specific WiFi name is available

Posted: 07 May 2017 11:08
by Martin
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

Re: Action when specific WiFi name is available

Posted: 08 May 2017 00:41
by tedhw
Thanks Martin,
That's exactly what I was looking for and it works well!!