[Request] Get External I.P adress and SMS It - Tasker Tips & Tricks

Hi All
I would be really gratefull if someone could help me on this.
I use Tasker on an Old Phone as a remote controller for my Network. Mainly i do commands via SMS , like WOL my Server.
Sometimes when router restarts , since i do not have Static IP but a DNS domain , i lose external IP and can no longer have RemoteDesktop unless i physically get there
So I would like to set tasker to get my external IP and sent it via SMS. I was told that i should :
1. Set Tasker Launch Brower to a specific URL ( Like: https://icanhazip.com )
2. Set it dump the result of that page to a variable
3. Sent it via SMS ...
But i couldn't make it work
Could someone help ?
Thanks in Advance !

Adrs Ip (2)
A1: HTTP Get [ Serverort:https://icanhazip.com Path: Attributes: Cookies: User Agent: Timeout:10 Mime Type: Output File: Trust Any Certificateff ]
A2: Send SMS [ Number:123456789 Message:%HTTPD Store In Messaging Appff ]

frrancuz. said:
Adrs Ip (2)
A1: HTTP Get [ Serverort:https://icanhazip.com Path: Attributes: Cookies: User Agent: Timeout:10 Mime Type: Output File: Trust Any Certificateff ]
A2: Send SMS [ Number:123456789 Message:%HTTPD Store In Messaging Appff ]
Click to expand...
Click to collapse
I cannot thank you enough !!! Brilliant

Related

Tasker send Intent putExtra

I want to send an intent with longitude and latitude to an app.
The app tells you which options you have to choose in order to receive an intent from tasker.
1st extra: lat:16.65878D
2nd extra: lng:-45.0364D
Target: Service
When I set those settings in Tasker and send an intent to Tasker which triggers to send this intent it works perfectly fine but sending an intent which triggers sending an intent seems pointless to me.
Intent serviceIntent = new Intent("com.incorporateapps.fakegps.ENGAGE");
serviceIntent.putExtra(Intent.EXTRA_TITLE, "lat:16.65878D ");
serviceIntent.putExtra(Intent.EXTRA_TEXT, "lng:45.0364D ")
startService(serviceIntent);
The location app tells me it changed its location but always changes location to lat:0, and lng:0
I tried different options for putExtra like EXTRA_SUBJECT instead of EXTRA_TITLE but nothing works.
Do you guys know what the intent tasker sends looks like or what I am doing wrong?
thanks a lot
Autoshare intercept is your friend…
I found that there might be a line break or new line that i was omitting and it would cause Tasker, and the app to completely crash

message

Anyone know a profile that can send an automated message (text) when phone is charging?
Profile: Charging (209)
State: Power [ Source:Any ]
Enter: Anon (236)
A1: Send SMS [ Number:<Number goes here> Message:<Message goes here> Store In Messaging Appff ]
sumotori1 said:
Profile: Charging (209)
State: Power [ Source:Any ]
Enter: Anon (236)
A1: Send SMS [ Number:<Number goes here> Message:<Message goes here> Store In Messaging Appff ]
Click to expand...
Click to collapse
What is Anon 236? and I want it for any number.
Anon is an anonymous task attached to the profile, it's just a naming.
I think you need to explain a little better what you are trying to do.
Do you want to reply to an incoming message of your phone is charging?
sumotori1 said:
Anon is an anonymous task attached to the profile, it's just a naming.
I think you need to explain a little better what you are trying to do.
Do you want to reply to an incoming message of your phone is charging?
Click to expand...
Click to collapse
I tried your profile, and it only worked once. Yes. I need to auto reply a text while cell is charging. Whether on my contact list or ANY number
sumotori1 said:
Anon is an anonymous task attached to the profile, it's just a naming.
I think you need to explain a little better what you are trying to do.
Do you want to reply to an incoming message of your phone is charging?
Click to expand...
Click to collapse
I realized what Anon meant, after I hit enter. Lol
Tmobilefan906 said:
I tried your profile, and it only worked once. Yes. I need to auto reply a text while cell is charging. Whether on my contact list or ANY number
Click to expand...
Click to collapse
Alright... Then you need to add one more condition on the profile: Event > Received text SMS
So you will have two conditions on the same profile.
Then replace the number with: %SMSRF
sumotori1 said:
Alright... Then you need to add one more condition on the profile: Event > Received text SMS
So you will have two conditions on the same profile.
Then replace the number with: %SMSRF
Click to expand...
Click to collapse
There...
Yup, I think I his should work perfectly.
Edit: Just saw that you used the variable on the message received. You don't need it there. As soon as you receive the message, the variable gets updated from tasker. It's a built-in variable that gets a value as soon as Tasker starts monitoring messages. So leave sender empty. Otherwise, perfect!
sumotori1 said:
Yup, I think I his should work perfectly.
Edit: Just saw that you used the variable on the message received. You don't need it there. As soon as you receive the message, the variable gets updated from tasker. It's a built-in variable that gets a value as soon as Tasker starts monitoring messages. So leave sender empty. Otherwise, perfect!
Click to expand...
Click to collapse
So, under "number" I could leave blank? The profile I shown ya seems to work as is.
Tmobilefan906 said:
So, under "number" I could leave blank? The profile I shown ya seems to work as is.
Click to expand...
Click to collapse
I'm glad it's working for you!
Yes, it's an optional parameter.
Maybe it works, but I'd suggest to empty it to avoid and undesired behaviour in the future.
sumotori1 said:
I'm glad it's working for you!
Yes, it's an optional parameter.
Maybe it works, but I'd suggest to empty it to avoid and undesired behaviour in the future.
Click to expand...
Click to collapse
Which one...number or sender?
sumotori1 said:
I'm glad it's working for you!
Yes, it's an optional parameter.
Maybe it works, but I'd suggest to empty it to avoid and undesired behaviour in the future.
Click to expand...
Click to collapse
Know a profile to send a text while you're on a call?
Tmobilefan906 said:
Which one...number or sender?
Click to expand...
Click to collapse
Sender
Tmobilefan906 said:
Know a profile to send a text while you're on a call?
Click to expand...
Click to collapse
You need two profiles, one to monitor phone off hook (task to set variable %INCALL to true) and another profile to monitor phone idle (task to set variable %INCALL to false).
sumotori1 said:
Sender
You need two profiles, one to monitor phone off hook (task to set variable %INCALL to true) and another profile to monitor phone idle (task to set variable %INCALL to false).
Click to expand...
Click to collapse
Yea, I did see phone off hook but wasn't sure. Thanks.
sumotori1 said:
Sender
You need two profiles, one to monitor phone off hook (task to set variable %INCALL to true) and another profile to monitor phone idle (task to set variable %INCALL to false).
Click to expand...
Click to collapse
I'm lost. Lol. How would I do that?
This is how I set up mine some time ago. These are two profiles (64 and 68) and each has one enter task (65 and 69 respectively).
Profile: Phone Offhook (64)
Event: Phone Offhook
Enter: Phone Offhook (65)
<Set InCall variable>
A1: Variable Set [ Name:%InCall To:true Recurse Variables: off Do Maths: off Append: off ]
Profile: Phone Idle (68)
Event: Phone Idle
Enter: Phone Idle (69)
<Set InCall variable>
A1: Variable Set [ Name:%InCall To:false Recurse Variables: off Do Maths: off Append: off ]
Once you do that, you will always have access to the variable %InCall for my example which you can monitor (with a profile with a state variable check). If the variable is set to true, you're in a call, otherwise you're not.

Auto Skype Voice Call

Anyone know how to create a task for automatic voice call on skype to a specific number. Pls help, i have tried my best to create one.
I saw this but i didnt know how to use it
Intent skype_intent = new Intent("android.intent.action.CALL_PRIVILEGED");
skype_intent.setClassName("com.skype.raider","com.skype.raider.Main");
skype_intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
skype_intent.setData(Uri.parse("tel:+91//phone number"));
startActivity(skype_intent);
https://stackoverflow.com/questions/14293974/skype-call-using-username-in-android
I think you want a "system -> send intent" action filled out something like this:
Code:
A1: Send Intent [
Action: android.intent.action.VIEW
Cat: None
Mime Type:
Data: skype:[user]?call&video=true
Extra:
Extra:
Extra:
Package:
Class:
Target: Activity
In the data field, you should replace "[user]" with the username you are calling.
I don't use Skype so this is a guess and I can't test it. But it should get you going.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers

Http requête when connectons wifi

Hi,
I'm searching to make a trick but never find how to...
Someone can help me here ?
Sorry for my poor english...
I would like to make a http request when connecting to my wifi SSID but only when I go home...
Make a http request is ok for me.
Connecting to my wifi SSID ok.
The problem is during the night my phone is in airplane mode, and when I turn on I don't want to make the http request.
Thank you helping me ?
Create an location profile for your home. Add an enter task which sets an variable e.g. %Location to "Home" if you're at home. Add an exit task which sets the variable to "Unknown" as soon as you've left the home location.
Add an action to the end of your HTTP request task, which sets an variable e.g. %HTTPRequestMade to "1" if the HTTP request was made.
Then add two IF conditions to the HTTP request action, so that the request is only running if %HTTPRequestMade is not "1" AND the %Location is "Home".
Create another profile which is triggered if the variable %Location changes (Event "Variable Set"). Add an task which sets %HTTPRequestMade to "0" if $Location is not "Home".
So if you're coming home the request will be executed and the variable %HTTPRequestMade will be set to "1". If the task is executed again it will not do the request because %HTTPRequestMade is still "1". If you leave your home the variable %Location will change to "Unknown". That will trigger the new profile which will set the variable %HTTPRequestMade back to "0". Next time you're coming home the HTTP request will be executed again.
Wow
It seems so hard to make it...
For the moment i have linked with my Xiaomi bip lite and the button pressed for the http request and it works well.
The objective is to have the request made automatically and when I'm front of my house the portal should open but it seems hard to made it and to have something which react very quickly...
The challenge is to recognize if you've left your home or not when you get connected to your wifi again. In my opinion a location profile is the easiest and most reliable way to do this.
Maybe it will be easier for you to implement it when I shorten my first idea:
Create an location profile for your home. Add only an exit task which sets the variable %HTTPRequestMade to "0"
Add an action to the end of your HTTP request task, which sets the variable %HTTPRequestMade to "1" when the HTTP request was made.
Add an IF condition to the HTTP request action itself, so that the request will be only executed when %HTTPRequestMade is not "1".
So when you've left your home the exit task of the location profile will set %HTTPRequestMade to "0". Next time you get connected to your home wifi the HTTP request task will be executed and set %HTTPRequestMade to "1". When you reconnect to your wifi without leaving your home before, the request will be not executed because %HTTPRequestMade is still "1".
Or you add an time depence to your profile so that the task will be not executed in the morning or whenever you wake up.
Yes i have this Idea also but after a single test when connecting wifi, it works not immediately si not really usable as i would like...
I'm searching for another Idea...
Have you checked if the profil gets active (green) as soon as you're connected to your wifi?
I had the same issue that the profil need some seconds until it became active. The issue was that I'd configured the SSID and a single MAC address for the profile. But my wifi router supports 2,4 and 5 GHz wifi for the same SSID, and therefore it has two different MAC addresses. Thats why the profile became only active in the 2,4 GHz wifi.
Due to that the first six chars of both MAC addresses are the same, I've changed the value to AA:BB:CC:* , which is fitting to both MAC addresses (AA:BB:CC are only an example. Add the first six chars of your routers MAC address).
It's cause that my smartphone take a little time to connect to the wifi...
You can try to force the connection with action "WiFi Net: Reconnect" as soon as your mobile phone is near your wifi. Or, if you have configured a lot of wifi profiles in your mobile phone, delete the unnecessaried ones. Maybe this will speed-up the connect.
Hi,
What is this action ?
How to force it ?
And how to delete wifi profiles ?
I have a Xiaomi Mi 9
Profil "Near Wifi" -> Yours
Add task with action "WiFi Net" -> Action "Reconnect"
I mean the known wifis in your wifi settings. Every wifi that your phone was connected to creates an profil. Delete the ones that you don't need anymore.
I will try but not really sure it will works...
JasMan78 said:
Profil "Near Wifi" -> Yours
Add task with action "WiFi Net" -> Action "Reconnect"
I mean the known wifis in your wifi settings. Every wifi that your phone was connected to creates an profil. Delete the ones that you don't need anymore.
Click to expand...
Click to collapse
It's not working better...
It take long Time to connect to the wifi...
So my tasks make long time to run...
diabolyk34 said:
Hi,
I'm searching to make a trick but never find how to...
Someone can help me here ?
Sorry for my poor english...
I would like to make a http request when connecting to my wifi SSID but only when I go home...
Make a http request is ok for me.
Connecting to my wifi SSID ok.
The problem is during the night my phone is in airplane mode, and when I turn on I don't want to make the http request.
Thank you helping me
Click to expand...
Click to collapse
Perhaps you need to contact technical support and check the Wi-Fi router ...

Termux - passing text/variables to Tasker

Hello!
Ive got problem and im stucked.
im using shell scripts in termux to call actions in tasker.
im doing it like here:
https://glow.li/posts/pass-variables-from-termux-to-tasker/
so for example i can send sms like so:
#tasker#
system-> intent received action: net.dinglish.tasker.send
task:
send SMS: Number: %number; Message: %message
#termux# send.sh
#!/data/data/com.termux/files/usr/bin/sh
am broadcast --user 0 -a net.dinglish.tasker.send -e number "$1" -e message "$2" > /dev/null
so when i execute send.sh 1234567 foo it send "foo" to 1234567
as you can see i can pass variable $1 and $2 and everything is working well.
But from few days im trying to send whatsapp message like this:
#Tasker#
profile: whatsapp
Action: phone->contact Via App
contact: MichaelX
app: .../vnd.com.whatsapp.profile
text: TEST_TEXT
#termux#
#!/data/data/com.termux/files/usr/bin/sh
(this way) am broadcast --user 0 -a net.dinglish.tasker.whatsapp > /dev/null
(or this way) am broadcast --user 0 -a net.dinglish.tasker.whatsapp -e number "$1" -e message "$2" > /dev/null
But when im executing it, whatsapp isnt opening and im geting the Text value inside termux and output "TEST_TEXT" (or %variable) command not found...
How can I do it? How can I call it? Or maybe do YOu know any other way to call it from termux...
Thank You so much, couse im out of ideas how can i pass it.

Categories

Resources