Create "if" action based on wifi SSID?

2,026 views
Skip to first unread message

Clay Whitenack

unread,
May 13, 2015, 4:31:19 PM5/13/15
to tas...@googlegroups.com
Hi all, I'm trying to get a Tasker task to first check if it is connected to a specific wifi network before it runs a portion of the task.  I have read some other posts on here and this is what I have so far...

Variable Set - %wifi to %WIFII
Variable Split - %wifi
Flash - text %wifi4

So far so good.  When running the task up to this point, tasker flashes the current SSID info.  However, I haven't been able to use this info in an IF action.

Right now, I have...

IF - %wifi4 ~ WSI2 (<---- current wifi ssid)

...but this doesn't work.  The IF doesn't ever respond.  I have tried "matches", "equals", etc., but nothing works.

Juergen Gruen

unread,
May 13, 2015, 5:29:09 PM5/13/15
to tas...@googlegroups.com
Hi!


Flash - text %wifi4

So far so good.  When running the task up to this point, tasker flashes the current SSID info.

Yes, but in quotation marks...
 

Right now, I have...

IF - %wifi4 ~ WSI2 (<---- current wifi ssid)

...but this doesn't work.  The IF doesn't ever respond.  I have tried "matches", "equals", etc., but nothing works.

Works as expected... ;-)

Try
If %wifi4 ~ "WSI2"



If you read the documentation, you will find an easier solution: http://tasker.dinglisch.net/userguide/en/matching.html

No need for splitting the variable:
If %WIFII ~ *WSI2*

Juergen.

Scott Windham

unread,
May 13, 2015, 5:30:43 PM5/13/15
to tas...@googlegroups.com

Hello,
  In you IF do you have "WSI2"

The double quotes "  or * on each side
Need to match the output of flash


Scott

Clay Whitenack

unread,
May 13, 2015, 5:39:09 PM5/13/15
to tas...@googlegroups.com
Thanks Juergen and Scott!  Yes, that's it!  I wasn't using quotes.  And thanks Juergen, I hadn't seen the option for the * which removes the need for splitting.  I used that and it works now.  Thanks again!

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/y-vnMVnl4FQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Vinai V

unread,
Jul 11, 2018, 3:33:26 AM7/11/18
to Tasker
Hi,

I am new to Tasker. I was trying to do the same thing but for some reason its not working for me.
Has anything changed since this discussion was over?

Any help would be great. Thanks!

João Dias

unread,
Jul 11, 2018, 6:43:01 AM7/11/18
to tas...@googlegroups.com

Can you please export your task's description (not xml) so I can take a look? Long-click the task in Tasker->export description Thanks in advance

Reply all
Reply to author
Forward
0 new messages