Creating a pfofile that get triggered by other profile - Tasker Tips & Tricks

Hi there,
I'm looking to create a profile that will trigger every time I'm having my weekly train commute and will compile different useful tasks for train riding like launching the Wi-Fi hotspot (so I can go online on my laptop) and mute the ringer, and some other stuff. I'm looking for some aid about about how to manage this through.
I thought about triggered this profile by using the speed data, but in that case it will launch on every ride I have, even when I'm riding my motorbike. So now I'm looking for something more sophisticated. Because I depart and arrive on regular stations and on regular times each week I want to have four new profiles - two for the the each of the two station I'm getting to and from of, for each commute occasion, setting one for the time window when I'm usually departure and one for arriving occasion. Those four will be used only as a platform. The train ride profile (a fifth one) will triggered by both of the departure profiles when I'll get to the station at the desired time and will turned off by the arriving stations profiles when I'll reach my destination station at the right time.
Doe's it make any sense? How can I pull this through?

Try WiFi near if the stations have a specific WiFi. That way, you don't need a time context.
You can use location with a time window you describe. That way, the device isn't trying to identify your location continuously outside of the time window you set.

ktmom said:
Try WiFi near if the stations have a specific WiFi. That way, you don't need a time context.
You can use location with a time window you describe. That way, the device isn't trying to identify your location continuously outside of the time window you set.
Click to expand...
Click to collapse
Thanks for the answer but you didn't got me. completely. I don't have a problem to detect the station location, the problem starts when the train leave the station and I want the profile to keep going on until I arrive at my destination station.

So use a speed evaluation combined with having the WiFi in proximity.

ktmom said:
So use a speed evaluation combined with having the WiFi in proximity.
Click to expand...
Click to collapse
It makes no sense, two reasons why:
1) When the train leave the station I'm loosing contact with any Wi-Fi
2) One of the reason I'm using Tasker to begin with is that I want my Wi-Fi to operate only when I'm in my home or in my workplace. The profile I want to operate on my train ride includes turning on my phone's hotspot (so I can use my laptop online during the ride). So I can't use any Wi-Fi network even if I want to.
3) I simply need to figure out a way how to trigger the "train ride" profile I want to have by other profile (station location profile in this case).
Yoghev

You can detect whether a WiFi network is nearby without connecting to it. You can use the WiFi's presence as the initial step to your process. Set a variable, them the exit task waits some time and a second profile looks for the variable to be set and some movement to be achieved.
Or not ¯\_(ツ)_/¯
You could always use a shortcut, or an NFC tag or location as I suggested before.

Create four profiles based on time and location.
One that's triggered at the train station A and in the average departure time of your commute to work.
Add an enter task which sets the variable $TrainStationCommute to A.
One that's triggered at the train station B and in the average arrive time of your commute to work.
Add an enter task which sets the variable $TrainStationCommute to B.
One that's triggered at the train station B and in the average departure time of your commute to home.
Add an enter task which sets the variable $TrainStationCommute to B.
One that's triggered at the train station A and in the average arrive time of your commute to home.
Add an enter task which sets the variable $TrainStationCommute to A.
Add another profile which is triggered as soon as variable $TrainStationCommute is set.
Add an new task "Commute" to this profile. Start with an IF action and check if variable $CommuteSettingsActive is not 1. Add your actions (enable hotspot, enable silent mode, etc.) to the IF loop and at the end, set the variable $CommuteSettingsActive to 1.
Add an IF ELSE action and check if variable $CommuteSettingsActive is not 0. Add your actions (disable hotspot, disable silent mode, etc.) to the IF ELSE loop and at the end, set the variable $CommuteSettingsActive to 0.
So every time the variable $TrainStationCommute is set, the task "Commute" will be executed. Based on variable $CommuteSettingsActive it will enable or disable your favorite settings.

Related

Tasker help?

Yesterday I set up a "work" profile in Tasker with the following settings:
Context: Cell Near (only 1 cell tower came up)
Task: Vibrate on Notify (on)
Vibrate on Ringer (on)
Wifi (on)
Exit Task: Send a text to my husband
It did put my phone into vibrate and turn the wifi on, but then halfway through the day it sent the text to my husband, resulting in a lot of confusion. The wifi also turned off at the same time. I'm assuming that I lost reception for some reason? I have 4 bars here, so I don't know why I would have lost it. I was in the same place the whole time. I can't use the GPS settings because I can't get my GPS to work at all. Working on the settings with that, but no go yet.
Any ideas on how I should set this task up and have it work correctly? The only other way (without GPS) that I can think of is something to do with the WiFi network at work... but I can't figure out how to set that up. I usually work 8-6 Monday-Thursday, so I would need it to scan for my work network between 7:50 and 8:10, and if it finds it, then turn on the work settings (vibrate and wifi on). Then when I am out of the wifi range it would need to turn vibrate and wifi off and send the text message. What I'm not sure how to do is get it to search on and off for the wifi signal, and then keep it on and change the settings when it finds the wifi signal. Can this be done in one profile, or do I need to set up multiple profiles?
If you work a regular schedule, you could just do it by time. That's what I do. All you need is a near approximation.
Dungeon47 said:
If you work a regular schedule, you could just do it by time. That's what I do. All you need is a near approximation.
Click to expand...
Click to collapse
Yeah, that was my last resort. I was trying to avoid doing it that way because while I do work a regular schedule, there are occasional times when that schedule might change and I wanted it to automatically keep my work settings should I end up staying an hour late or something. Plus, a profile based on time would not allow for an accurate text message to go out. It is very common for me to stay 20 minutes late, and I wouldn't want it to send a text to my husband if I wasn't actually leaving at 6pm.
Great profile pic btw.
Ok, messing around with it some more and set up the following:
Work_pre profile -
Context: Mon, Tue, Wed, Thu
From 7:50 to 8:10
Task: Wifi (toggle)
Work profile -
Context: Wifi Near
Task: Vibrate on Notify
Vibrate on Ringer
Wifi On
Exit Task: send text message to my husband
Any reason why this wouldn't work? I'm not sure about the first profile (work_pre) toggling the wifi... will that conflict with the work profile?
EDIT: Well, I don't know why, but it just sent a message telling my husband I was leaving work. lol Obviously that setup doesn't work either... any idea why?
Still trying to figure this out...
I set up a profile called "work test" with the following settings:
Context1: Wifi Near (toggle) my work network
Context2: Mon, Tue, Wed, Thu
Context3: Time (5:30pm-5:40pm...running for 10 min, set for a couple minutes ahead of when I was testing it)
Task: Wifi On
I checked it, and sure enough it turned wifi on by itself. It stayed on until the time was up at 5:40. What I was trying to do was get it to Try to connect during that 10 minute time frame, but then stay connected once it found the network until I left the area. Guess it doesn't work like that, and I don't know what to do to make it do that. Also, everytime I let the screen lock, it turned wifi off, which I'm guessing is the reason some of my previous profile tests had sent the "leaving work" text in the middle of the day.
I've figured out I probably don't want to have wifi stay on while I'm at work, it drains the battery too fast. Is there any way to have the phone scan for my work network at intervals between 7:50-8:10am, put the phone on vibrate if it detects the work network (not connect to it, just detect it), and then scan for the work network again between 6:00-6:30pm and turn the ringer back on and send a text if it does not detect it?

Set Google Voice number based on Wifi connection?

Is there any way to use Tasker or some other setting/app to have my Google Voice ring a different number depending on if I'm connected to Wifi or not?
Here's why:
I have a pretty low minutes limit on my plan, but I also have an unlimited Skype account, so I can have GV forward into my Skype number if I have a wifi connection, so I don't get charged cell minutes. But if I'm not somewhere where I have a wifi connection, I want it to ring my actual cell number.
I've seen the Google Voice plugin for Locale/Tasker, but it chooses based on location, as does the Google Voice Locations app. I'd prefer to use any location, but change the number when I'm connected to Wifi.
Thanks!
Maybe I don't understand how Tasker plugins work, but if there is a Google Voice plugin for Tasker, that should be all you need. You are not forced to trigger it based on location, make a Tasker profile based on wifi connectivity instead.
Good call. I tried it, and it works when using wifi connected as the state that Tasker checks.
Unfortunately, I realized that will be kinda useless if I don't have cell data as well, because when the wifi disconnects, there's no way for the phone to connect to Google Voice settings to change the phone number.
For me the whole point is to get my phone to work in some places I frequently go that don't have cell reception... I did manage to get it to work using Tasker custom widgets, so I can set it manually, but I don't see any way to get it to work automatically unless I have 3G data, which I don't in the locations I mentioned.
So I have single touch access to changing the settings, but not automatic based on location.
Yeah, if you don't have a connection you can't really change the setting. Sounds like you need a Tasker state that can predict the future. "Will lose wifi in 5 minutes"
But seriously, I can't think of a way to get around that problem easily. If you always had a computer online at home or something, you could have Tasker send it a signal every 5 minutes. If your home computer notices the signal is late it can run a script to switch you to your cell number, because it will know you have lost your data connection and couldn't send the regular notice.
When you get connection again, either your computer can switch it back (when it receives the 5 minute signal again), or have Tasker do it because it can talk to Voice again.
Yeah, that might be an option, actually... Hmm.
Time to brush up on some scripting skills. Any recommendations?
Thanks for the input, in any case!
Well, personally, I would set up a web server and script it with PHP, because I know that well.
No clue how to go about hooking it into Google Voice to change the settings, you'd have to look it up, but I do know Tasker can send a call to a web page.
I would make it in two parts, or two scripts.
So set up a PHP page where you would send a signal to and it would then set a 'latest signal' variable, possible in a DB but you would probably want something simpler. You would want to pass in some POST or GET variable unique to your phone, so other people don't access the page and pretend to be the phone, unlikely, but possible if you tell your friends about it
Then I'd have a separate CRON task that runs every 5 minutes, checks the DB or file to see if the phone has sent in a new update, if it doesn't see a new update it then does whatever it needs to do to change your Voice setting.
Then to switch back to Skype, you can have Tasker do it when it detects a data connection again, or just depend on your home script to switch you back when the next signal goes out.
Doesn't gv forward calls to your numbers in the order you want them to ring? If everyone called gv you can make gv forward to skype first and if you don't pick up there it rings your cell right?
I'm not home in the states so I can't test it :/
Actually they all ring at once. So you can switch to skype and pick up there.
If it does, I haven't figured it out yet.
I'm new to GV, but so far I've found that I can set which numbers ring simultaneously, or set them based on either time of day, or contact groups.
If I could have it ring Skype for 2 rings first, then my cell, that would be perfect, but I haven't found that setting yet.
Bringing this thread back to life for a followup question. Before I shell out the money for Tasker, will it enable me to alter GV settings based on WHICH wifi network I am connected to? I.E. set GV to ring home and cell when connected to my home network, office and cell when connected to my office network, and cell only for all other times?
Given it's been a couple of years since this post, is there a better way/software to do this without the expense of Tasker?
Thanks!
Ben

Why tasker doesn't always work?

Hi
Often on my galaxy A5 2016 rooted I see that a task is active but it doesn't really active the function on my phone...
For example: I've a task to turn wifi on when I'm at home (based on location). Often the task is active (is green on tasker) but wifi isn't turned really on! Why this??
copeppe said:
Hi
Often on my galaxy A5 2016 rooted I see that a task is active but it doesn't really active the function on my phone...
For example: I've a task to turn wifi on when I'm at home (based on location). Often the task is active (is green on tasker) but wifi isn't turned really on! Why this??
Click to expand...
Click to collapse
On my s8 I've had to turn on reliable alarms for when screen is of as I noticed that some profiles like turning Bluetooth on weren't working when the screen was off. Maybe that could help turning this on in the settings?
Sent from my SM-G950F using Tapatalk
mgdorbit said:
On my s8 I've had to turn on reliable alarms for when screen is of as I noticed that some profiles like turning Bluetooth on weren't working when the screen was off. Maybe that could help turning this on in the settings?
Sent from my SM-G950F using Tapatalk
Click to expand...
Click to collapse
Maybe... but can you explain me better what alarms I must turn on?
copeppe said:
Maybe... but can you explain me better what alarms I must turn on?
Click to expand...
Click to collapse
Go to preferences > monitor > Use reliable alarms. I have mine set for screen off
Location is not a reliable trigger (never was for me).
Try using variables. These are better.
For example.
I'm using 2 variables to CONFIRM I'm at home and trigger my home profile.
First... I use Cell near to verify the proximity and enable my WiFi. So my variable is set to "1".
Then... After my phone connects to my network I set another variable to "1".
When both variables are equal to "1" my home profile kicks in.
This way I do not rely on Location (and my power consumption is lower).
Sent from my LG-D855 powered by Aosp Extended and Tapatalk.
So the way tasker works is when a profile activates, the entry task runs, then when the profile deactivates the exit task runs.
If something interferes with the entry task, or if you have profiles that overlap (changing the same settings for instance) the profile will be active, but the desired actions may not be able to run.
However, when it comes to wifi on/off actions, you have to do a few things to ensure the actions can run.
1. Make sure you give yourself enough time to enable wifi before continuing.
Eg: 1. Turn on wifi
2. If connected to my home ssid do the following
This will never work because tasker enables the wifi and immediately goes to the next action, but you need at least 5 seconds (really 15) to connect, so it will never be connected when if statement is checked
2. Or say you want to disable wifi every time The wifi is disconnected from any ssid and whenever you're in range of your homer ssid another profile turns on wifi.
The following WILL NEVER WORK but will take a long time to realize the simplicity of why if not careful
If wifi=on and wifi is not connected
Disable wifi and do these things
The reason is the home profile will always enable wifi and for 15 seconds the disable WiFi profile will trigger because the wifi is on but not connected...so it'll disable WiFi.. which will... you get the idea.
P.s. if the profile is active then reliable alarms has nothing to do with why the actions didn't run. Tasker correctly activated the profile... something interfered elsewhere

wifi off when there is no wifi around, or wifi is disconnected

im usuing tasker 5.0b5, and am wondering if anyone could help with a profile that will turn off wifi completely when there isnt any wifi around or when wifil has been disconnected. and also hoping a task with this profile to turn wifi back on when wifi is visible again. i seen a few tutorials and youtube vids on how to do this, but they were in reference to older tasker versions. can anyone help? thanks
I use these 3 profiles to basically do what your asking. You will have to change the profile with cell near to what ever cell towers are near you.
Let me know if you have any questions
https://mega.nz/#!M6BhUAqY!3qg9hpZt-_6JukuoKC1cCr1_NhVqPT3EId6yHJWSDfs
https://mega.nz/#!gvJRQK7S!26emPMKRewPlZvviD6a70xw7DzgcABLs0NJsDhvtITc
https://mega.nz/#!QzpBza7Z!S1XZq3T1zq0eW8jyUx0U1naHyyy_vU9G46Kc-nolJ9g
Fe Mike said:
I use these 3 profiles to basically do what your asking. You will have to change the profile with cell near to what ever cell towers are near you.
Let me know if you have any questions
https://mega.nz/#!M6BhUAqY!3qg9hpZt-_6JukuoKC1cCr1_NhVqPT3EId6yHJWSDfs
https://mega.nz/#!gvJRQK7S!26emPMKRewPlZvviD6a70xw7DzgcABLs0NJsDhvtITc
https://mega.nz/#!QzpBza7Z!S1XZq3T1zq0eW8jyUx0U1naHyyy_vU9G46Kc-nolJ9g
Click to expand...
Click to collapse
Do I link these profiles or run them all seperate?
This is what I have set up from the xml you sent me
Or like this?
Do these profiles supposed to turn WiFi off? As in, turning it off in settings too? I tried these and it don't work that way. I did change cell near as you suggested.
Fe Mike said:
I use these 3 profiles to basically do what your asking. You will have to change the profile with cell near to what ever cell towers are near you.
Let me know if you have any questions
https://mega.nz/#!M6BhUAqY!3qg9hpZt-_6JukuoKC1cCr1_NhVqPT3EId6yHJWSDfs
https://mega.nz/#!gvJRQK7S!26emPMKRewPlZvviD6a70xw7DzgcABLs0NJsDhvtITc
https://mega.nz/#!QzpBza7Z!S1XZq3T1zq0eW8jyUx0U1naHyyy_vU9G46Kc-nolJ9g
Click to expand...
Click to collapse
Could you quote my post so I can get the notification for this o.p? Tyvm
Tmobilefan906 said:
im usuing tasker 5.0b5, and am wondering if anyone could help with a profile that will turn off wifi completely when there isnt any wifi around or when wifil has been disconnected. and also hoping a task with this profile to turn wifi back on when wifi is visible again. i seen a few tutorials and youtube vids on how to do this, but they were in reference to older tasker versions. can anyone help? thanks
Click to expand...
Click to collapse
---------- Post added at 12:34 PM ---------- Previous post was at 12:20 PM ----------
Tmobilefan906 said:
im usuing tasker 5.0b5, and am wondering if anyone could help with a profile that will turn off wifi completely when there isnt any wifi around or when wifil has been disconnected. and also hoping a task with this profile to turn wifi back on when wifi is visible again. i seen a few tutorials and youtube vids on how to do this, but they were in reference to older tasker versions. can anyone help? thanks
Click to expand...
Click to collapse
Yes use all 3 at same time, make sure your variables are getting set. The one profile sets wifilocation variable when your near your cell towers, then the second one will see that wifilocation is set and activate causing it to turn on wifi and wait for 20 sec and if its not connected will turn wifi off. you may need a profile that turns wifi off when screen is off or go into wifi settings on phone and set it to not stay on when screen is off. Also you may need to turn on cell workaround and/or use new cell api under taskers preference depending on the model of your phone. You may not need the If WiFi connected profile, I think I used that for another project.
Tmobilefan906 said:
im usuing tasker 5.0b5, and am wondering if anyone could help with a profile that will turn off wifi completely when there isnt any wifi around or when wifil has been disconnected. and also hoping a task with this profile to turn wifi back on when wifi is visible again. i seen a few tutorials and youtube vids on how to do this, but they were in reference to older tasker versions. can anyone help? thanks
Click to expand...
Click to collapse
Fe Mike said:
I use these 3 profiles to basically do what your asking. You will have to change the profile with cell near to what ever cell towers are near you.
Let me know if you have any questions
https://mega.nz/#!M6BhUAqY!3qg9hpZt-_6JukuoKC1cCr1_NhVqPT3EId6yHJWSDfs
https://mega.nz/#!gvJRQK7S!26emPMKRewPlZvviD6a70xw7DzgcABLs0NJsDhvtITc
https://mega.nz/#!QzpBza7Z!S1XZq3T1zq0eW8jyUx0U1naHyyy_vU9G46Kc-nolJ9g
Click to expand...
Click to collapse
Honestly this is a complicated way of doing something very simple.
The most accurate and low battery way to accomplish this is to have 1 profile with a state context of "cell near" and set it to scan while you walk around your house for 5 min and then set it down and let it scan for another 10 min. (This ensues all available cell towers in your area are accounted for) and make tier entry task enable wifi. So when you're close to home, tasker will enable WiFi and Android will handle reconnecting.
In the exit task,Turn wifi off so whenever you leave your area WiFi will be deactivated and you are using nearly 0% battery to achieve it
loogielv said:
Honestly this is a complicated way of doing something very simple.
The most accurate and low battery way to accomplish this is to have 1 profile with a state context of "cell near" and set it to scan while you walk around your house for 5 min and then set it down and let it scan for another 10 min. (This ensues all available cell towers in your area are accounted for) and make tier entry task enable wifi. So when you're close to home, tasker will enable WiFi and Android will handle reconnecting.
In the exit task,Turn wifi off so whenever you leave your area WiFi will be deactivated and you are using nearly 0% battery to achieve it
Click to expand...
Click to collapse
Yeah. I have already used that task before. The cell near profile. I just want a profile that turns WiFi off completely when I'm not connected to any WiFi.
Tmobilefan906 said:
Yeah. I have already used that task before. The cell near profile. I just want a profile that turns WiFi off completely when I'm not connected to any WiFi.
Click to expand...
Click to collapse
How about a wait time, then afterwards switch wifi off if not connected?
HatchetEgg said:
How about a wait time, then afterwards switch wifi off if not connected?
Click to expand...
Click to collapse
Yes
Tmobilefan906 said:
Yes
Click to expand...
Click to collapse
Ok then the best thing to do is create a profile event context of WiFi disconnected and make the entry task merely set a variable %WIFITIMER to %TIMES+120
then create another profile with a time context and set if to activate on %WIFITIMER (which would be set for 120 seconds after the WiFi disconnected and make the entry task WiFi disable
Then create one more profile with an event context of WIFI CONNECTED and set the entry task to clear the Wi-Fi timer. This will ensure that if the Wi-Fi reconnects, the Wi-Fi disable profile won't be able to activate because the time will never be Null
The logic is: if the Wi-Fitimer is set then when the current time matches it, disable the Wi-Fi, but if it reconnects, the timer is disabled.
Edit
The benefits of these profiles is more than merely an elegant approach, but also the least battery impacting method to have Tasker wait until a certain time to do something. Using wait actions inside tasks might be one of the worst things for battery life

Does 'WiFi Near' work when WiFi is off?

My request is very simple:
I use WiFi tithering a lot while travelling. When I enter any known WiFi zone, I wish to turn tithering off and WiFi on, using Tasker.
I have created two profiles for this purpose:
1. Activates tithering when I leave a WiFi zone and loose WiFi connection. This profile works perfectly!
2. Disable tithering and turn WiFi on when I enter a known WiFi zone. This profile never triggers, but the associated tasks run do exactly what I want them to do when I run them manually.
The two actions linked to profile #2 are:
WiFi Tither Set Off
WiFi Set On
And, as I said - they perform exactly what they should - if run manually.
The profile that I use to trigger, is:
State Net, WiFi Near
I have not set any paramters such as SSID, MAC etc. Everything is left blank.
May assumption was that it would trigger on any WiFi zone that it could successfully recognise (log on to). But that does not seem to be the case. It never triggers.
But the profile does become active (turn green) every time I enter a known WiFi Zone. I believed this was a sign that it would trigger.
Any idea how to accomplish a working trigger the way I want?
Rgds
Viking
Oyvindo said:
My request is very simple:
I use WiFi tithering a lot while travelling. When I enter any known WiFi zone, I wish to turn tithering off and WiFi on, using Tasker.
I have created two profiles for this purpose:
1. Activates tithering when I leave a WiFi zone and loose WiFi connection. This profile works perfectly!
2. Disable tithering and turn WiFi on when I enter a known WiFi zone. This profile never triggers, but the associated tasks run do exactly what I want them to do when I run them manually.
The two actions linked to profile #2 are:
WiFi Tither Set Off
WiFi Set On
And, as I said - they perform exactly what they should - if run manually.
The profile that I use to trigger, is:
State Net, WiFi Near
I have not set any paramters such as SSID, MAC etc. Everything is left blank.
May assumption was that it would trigger on any WiFi zone that it could successfully recognise (log on to). But that does not seem to be the case. It never triggers.
But the profile does become active (turn green) every time I enter a known WiFi Zone. I believed this was a sign that it would trigger.
Any idea how to accomplish a working trigger the way I want?
Rgds
Viking
Click to expand...
Click to collapse
If I remember correctly Wifi near requires "Wifi Scanning" to be on, which is located under settings > security & location > location > advanced > scanning.

Categories

Resources