VPN "always-on" with tasker most networks - Tasker Tips & Tricks

In miui / android it seems that at least for my device/software version configuration it's not possible to set the build in function for vpn to "always-on" while on 3rd party app's there's such an option (which is depending on a use case i would say)
i have been browsing through the web to compose a tasker task to activate the VPN option on all (or all except home) networks and could not figure out to get it working.
most people seem to be using either
- tasker send intent function
- or similar attempts with shell am start (some intent formular)
- load application function
- tasker plugins (i would appreciate not using third party plugins)
however it seemed like whatever i tried, the option never triggered.
So inside Settings > VPN
i have setup the integrated VPN called Fritz (which is working manually obviously)
as well as another APP which has VPN Capabilities but is not the case to use...
In my Screenshot here, you can find the Setting which needs to be enabled / what i want to get done with tasker
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Detail Page of Build in VPN (you can see there's no always on Option)
The other App listed there has other options which give settings like "always-on", "block connection without vpn" as seen here:
Anyone has enough experience to help me out?

Looking around a bit, I think you are using the MyFRITZ!App to connect to a FRITZ!Box. Do I have that right?
I'm guessing that most of what your finding related to tasker and VPN is OpenVPN configurations. OpenVPN is programmed with Tasker integration in mind. Through tasker plugins, or by sending intents, it's possible to control OpenVPN.
I'm not finding similar integration for the MyFRITZ!App. The answer may be that you need to automate touches with AutoInput. Another option is to contact the developers of MyFRITZ!App and request intents to command the connection/disconnection which tasker could then use.

That's not the case here.
Yes myfritz app has vpn connectivity and it's properly set up, however I have also set up another vpn with the built-in vpn functions from Android. On miui this can be found on settings > Vpn .... Regardless of the myfritz app.
To demonstrate, I have uninstalled myfritz.
As seen in my screenshot the built-in settings are still available.
On miui the settings package seems to be available on android.net.vpn.settings which seems to be used in tasker with intents for other vpn clients such as vpncilla.
However it's not clear how tasker could access the toggle switch by intent.
I have no tasker plugin yet so if I had the choice I would want to get it done by intent or shell.
Gesendet von meinem MI 9 mit Tapatalk

I think the only solution is a possible work around using openVPN to access your VPN provider's servers. Then you can use an intent or plugin to manage OpenVPN.
Tasker can't manage what it doesn't have access to.

Related

[Mod] Logitech app for Harmony Smart/Ultimate remotes

Harmony remote app on the Gear (for Logitech Harmony Smart and Ultimate remote)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Modified the Harmony app a bit to use it on the Gear. It's just a temporary quick and dirty hack to allow the remote app to bypass the wifi detection when it starts up. Hope to work on it a bit more in the future, but for now it will do for others to experiment with it
A working bluetooth tethering connection is required!
1. To connect launch the app. The following screen will be displayed
hit the question mark in the upper right corner.
2. The following screen will appear
Select Advanced Scan
3. This will get you to the advanced scan screen. Here you should select Enter IP Address Manually and enter the IP address of your Harmony Hub. (To find the IP address look under Info in the general menu of the app on your phone or check your router page)
Again, this is just a experimental quick and dirty mod. Primarily for experimenting with such a use case. I encourage others to decompile the app and do some additional smali editing if you want to make it work the way you want. (Because of time constraints I can't promise that I will do some extra work on this)
I already contacted Logitech and asked them if they want to make the app work with bluetooth tethering scenarios. Let's hope they will update the app soon. Because really, with the Logitech hub you can control your complete Home Theater System with your watch. (Yep... no more searching for the remote
This is a mod of https://play.google.com/store/apps/details?id=com.logitech.harmonyhub
appelflap said:
Harmony remote app on the Gear (for Logitech Harmony Smart and Ultimate remote)
Modified the Harmony app a bit to use it on the Gear. It's just a temporary quick and dirty hack to allow the remote app to bypass the wifi detection when it starts up. Hope to work on it a bit more in the future, but for now it will do for others to experiment with it
A working bluetooth tethering connection is required!
1. To connect launch the app. The following screen will be displayed
hit the question mark in the upper right corner.
2. The following screen will appear
Select Advanced Scan
3. This will get you to the advanced scan screen. Here you should select Enter IP Address Manually and enter the IP address of your Harmony Hub. (To find the IP address look under Info in the general menu of the app on your phone or check your router page)
Again, this is just a experimental quick and dirty mod. Primarily for experimenting with such a use case. I encourage others to decompile the app and do some additional smali editing if you want to make it work the way you want. (Because of time constraints I can't promise that I will do some extra work on this)
I already contacted Logitech and asked them if they want to make the app work with bluetooth tethering scenarios. Let's hope they will update the app soon. Because really, with the Logitech hub you can control your complete Home Theater System with your watch. (Yep... no more searching for the remote
This is a mod of https://play.google.com/store/apps/details?id=com.logitech.harmonyhub
Click to expand...
Click to collapse
What would it take to get the Harmony smart control to work with something like Tasker? I'd kill to be able to have my home theater system, lets say, turn on when I walk in the door.
Sent from my Nexus 10 using XDA Free mobile app
This is hilarious, Nice share.. How did I just notice this tho ?
I may have to give it a try !
Does this work with Tizen?
PERFECT!...but...
This would be AMAZING on the Tizen Gear but it seems it is only for Android. Hopefully when they port Android Wear to the Gear it will work. Keep up the good work Dev. Thanks.
Any plans on updating? Currently force closes on Android Wear Lollipop

[2.1+][FREE][Ads-Free] Wifi Password Manager (Root)

Quickly View Saved Wi-Fi Passwords
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Have you ever been in a situation where you needed to connect to a Wi-Fi network, but couldn’t remember the password? Or maybe there’s a network you’ve connected to with your jailbroken device, but now you need to access that network on your Mac or PC.
Well, the days of forgotten Wi-Fi passwords for computers may be a thing of the past. Wifi Password Manager is a new Google Playstore application that will list all saved Wi-Fi passwords that you’ve connected to from your rooted android device. Of course, in order for this app to be useful for the situation I mentioned, you must have previously connected to a specific network from your device in the past.
That being said, if you have built good list of remembered networks, and you need to connect to one of them from a computer, this little android application will definitely come in handy.
Once Wifi Password Manager is installed, instead of asking around for the Wi-Fi password, launch the app, tap on “Wi-Fi Password,” then select “Known Networks.” This option is made available via Wifi Password Manager and it will display a list of all known network names and their associated passwords.
Yes, my Wi-Fi password is “animalfarm.” Don’t judge me.
On top of that, you’ll be able to tap on a network in the list and copy the SSID or password. From there, you can sms or even whatsapp the information to someone or write it down and be on your way to connectivity back at your computer. It may not seem like much, but I can think of many situations where this little application would have saved the day.
The best part is, Wifi Password Manager is completely free. And for now ad-free! If this had been available in the past, I would have easily paid at least $0.99 to save me from a forgotten Wi-Fi password nightmare. Thankfully, it’s available now and you can install it via Google Playstore for free. There are no options to configure for this application.
Download
https://play.google.com/store/apps/details?id=com.myrippleapps.wifi

Best Tasker Plugins

Push Tasker
Push Tasker is a plugin for the app Pushbullet. Pushbullet is an amazing app with all kinds of capabilities to send information from one device to another. I personally use it to setup custom notifications for updates on specific websites. there are some great instructional videos to help you get started with Push Tasker.
With Push Tasker, you can have Tasker send notes, links, and lists automatically. It can also intercept notifications or reply on its own. If you're already using both of these apps then you'll love the idea of combining the two of them. Check out this video to see how it work.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download Push Tasker
Download Pushbullet
AutoLocation
AutoLocation will let you set custom Geofences. A Geofence is a location on the map that you will be able to define by giving it an exact radius. You can then have tasker react when you're within your defined location.
This is a perfect way for me to keep track of all the restraining orders that people have on me. I'll just get a notification every time I'm getting to close to someone's house. Keeps me of trouble and out of jail!
Download AutoLocation
AutoWear
If you have a smartwatch you'll love the ability to trigger tasks based on the activity of your Android Wear device. The video below shows a bunch of really cool example of how you can use this plugin.
Download AutoWear
So what are your favorite tasker plugins? Let me know in the comments!
Thanks a lot for sharing such an useful post. All of these apps are really useful.
Besides the AutoApps plugins by joaomgcd, there are some excellent newer plugins called Snackbar Tasker Plugin and Material Design Tasker Plugin made by Nick Nack Development that allow you to easily create interactable Material Design scenes. Beats using the stock scene editor!
BaldApps plugins are the best IMHO
AutoRemote is by far the best plugin in my experience, we've been using it for years. It solves the cross-Google account issue with PushBullet, so I can send things to my wife, son, parents etc. PushBullet is frustratingly limited to one Google account.
The number two slot is mentioned above (AutoWear), before that was AutoPebble. AutoNotification is very useful, as is AutoTools for the What3Words API.
We've stopped buying the Auto apps and started subscribing as it's ridiculously better value for money.
All the AutoApps (including the alpha ones) are almost a requisite at this point. As "FourQ" mentioned - the subscription is the ultimate deal, for about a dollar a month you get every single AutoApp plugin, (including the alpha ones). It's a total of like 30 plugins.
Also the Snackbar and Material Design plugins (by Nick Nack Development) are great for so many things, whether taking input or displaying data, in a look/feel of complete Material Design, without ever having to setup or mess around with using a Scene.
Join from JoaoApps is a new one, and basically is a full replacement for PushBullet. It integrates with Tasker too of course, but in a way that's also far beyond what Pushbullet does. There's no monthly fee for using Join, just a one time purchase.
Two brand new recent releases that are extremely helpful in dealing with data storage for Tasker are the Spreadsheet Tasker Plugin and the Tasker SQLite Plugin. The first can upload/download data directly to/from Google Sheets. The second can store/retrieve/administrate SQLite databases on the device using Tasker and without using root (in regards to databases you create). So amazing what folks have come up with lately.
Others I use include On Time which lets Tasker designate groups of quick launch icons in homescreen widgets, as well as the plugin KC Tasker Processes which lets you know if an application is running in the background.
Secure Settings still has its uses, however plugin Media Utilities seems to have not been updated in a long time and may be abandoned.

Time context repeat wont fire

Hey guys. I have two different power saving profiles that I use for home and work to turn on/off Autosync. My work-profile does not work properly, and I think it has to do with the repeating option in the time context. My home-profile works perfect, and the only difference between these profiles is that the repeat-interval is much shorter in my home-profile. Sometimes the work-profile fires, sometimes not. I tried experimenting with the repeat-interval and if I change it to 10,15 or 20 minutes (for example) it works every time. This is why I am pretty convinced it has to do with the repeat-interval.
This is how my work-profile looks like. The other contexts (Wifi connected and weekdays) are always activated when I test the profile, so they are not the issue.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
My home-profile has repeat-interval of 20 minutes, and that works as I said flawless.
Has anyone else experienced any problems using longer intervals with repeating contexts, or could it be anything else?
Repeating time context seems to be an issue on Samsung devices running Android 5.1 ->, in THIS thread there is a lot of people with exatcly the same issue.. Not good.
Did you already try activating the option "Use Reliable Alarms" in settings/preferences/monitor?
This feature solved the problem with my time context profiles on MM occasionally not activating.
Also it's best to exclude Tasker and Secure Settings in Battery Optimization feature of MM.
GrippingSphere said:
Did you already try activating the option "Use Reliable Alarms" in settings/preferences/monitor?
This feature solved the problem with my time context profiles on MM occasionally not activating.
Also it's best to exclude Tasker and Secure Settings in Battery Optimization feature of MM.
Click to expand...
Click to collapse
I have not activated Reliable alarms, I will look into this! I have already excluded Tasker and Secure Settings (and all other plugins I use for Tasker) from Doze though.
I tried a different solution yesterday though, to only have a single context (State) since the Time context seems to be the problem;
State -> connected to work-Wifi.
Action 1 -> Sync ON
Action 2 -> Wait 5 min
Action 3 -> Sync OFF
Action 4 -> Wait 2hours
REPEAT ALL ACTIONS FOUR TIMES
EXIT TASK - > Sync OFF
In this way I get the same result since it covering the hours I am at work. The same could be done when connected to Home-Wifi but with a lot more repeats. Since the Task only will activate when connected to Wifi (and end when disconnected) I don`t need any specific hours when the Profile should run. So this should work in the same way..
Anyway, I will try your suggestions as well and see if it fixes the issue.
Thanks!
GrippingSphere said:
Did you already try activating the option "Use Reliable Alarms" in settings/preferences/monitor?
This feature solved the problem with my time context profiles on MM occasionally not activating.
Also it's best to exclude Tasker and Secure Settings in Battery Optimization feature of MM.
Click to expand...
Click to collapse
Tried set ``Use Reliable Alarms´´ to ``Always´´, but dint work. Repeat works the first 1-3 times but after that it will stop or only activate the task sporadically. I think I have some serious bug in Tasker since this is not the only issue I have for the moment. Will probably try to reinstall and load a older backup and see what happens..
Problem solved. See HERE for info.

activate a activity when in location HELP

Hi everyone. I set up an activity that should be activated with the location via GPS and the network. however it does not work even if they are in the exact position. Could someone tell me if these functions on the position work immediately and with the screen off or is it useless that I continue to study? thank you
Yeah, it works. I use it every day.
Can you explain your profile? Maybe I can help.
aleavenger said:
Yeah, it works. I use it every day.
Can you explain your profile? Maybe I can help.
Click to expand...
Click to collapse
please help me:
i have the necessity to open google assistant and then play a media of a command with my voice. this when i arrive near my door elecric automatic that opens with a scene of IHC app (broadlink). i already tested the command and it works. now i set the tasker so:
in profiles i set position (network and gps) set at 30 mt. range.
in activity i set: open app (google assistant) and play media (my registration vocal)
when i execute the activity voices all work, but if i go near the door nothing execute.....
perhaps i wrong something, please can you help me step by step?
i hope and thank you
myabc said:
please help me:
i have the necessity to open google assistant and then play a media of a command with my voice. this when i arrive near my door elecric automatic that opens with a scene of IHC app (broadlink). i already tested the command and it works. now i set the tasker so:
in profiles i set position (network and gps) set at 30 mt. range.
in activity i set: open app (google assistant) and play media (my registration vocal)
when i execute the activity voices all work, but if i go near the door nothing execute.....
perhaps i wrong something, please can you help me step by step?
i hope and thank you
Click to expand...
Click to collapse
Tasker location is not precise like that, you can try a geofence with autolocation plug-in, but you can't make it precisely activate when you are near the door. And Tasker checks locations based in configuration (check in Tasker preferences, monitor: GPS check seconds and Network location check seconds).
In your situation a NFC trigger is better.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
aleavenger said:
Tasker location is not precise like that, you can try a geofence with autolocation plug-in, but you can't make it precisely activate when you are near the door. And Tasker checks locations based in configuration (check in Tasker preferences, monitor: GPS check seconds and Network location check seconds).
In your situation a NFC trigger is better.
Click to expand...
Click to collapse
NFC or auto barcode for that matter

Categories

Resources