Can Tasker Stop Charge?

192 views
Skip to first unread message

My-kl

unread,
Mar 21, 2023, 12:23:16 PM3/21/23
to Tasker
I've looked into using Tasker to stop the phone charging but all the threads I found were rather old so I though trying their code might be a waste of time. Is it possible, maybe with shell commands or something?

(Huawei P30, EMUI 12, Android 12, unrooted)

João Dias

unread,
Mar 21, 2023, 1:03:04 PM3/21/23
to tas...@googlegroups.com
The only way to do that is if your phone is connected to a smart plug and that smart plug is controlled by Tasker.

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


My-kl

unread,
Mar 21, 2023, 2:04:40 PM3/21/23
to Tasker
OK, thank you.

My-kl

unread,
Aug 7, 2023, 10:11:43 AM8/7/23
to Tasker
So now I have a Sonoff micro charger. Can I control it with Tasker or do I need nodeRED? I really don't want to have to learn how to use nodeRED.

Rich D

unread,
Aug 7, 2023, 10:53:54 AM8/7/23
to Tasker Google Groups Post

So now I have a Sonoff micro charger. Can I control it with Tasker or do I need nodeRED? I really don't want to have to learn how to use nodeRED.


Yep.. I control all my Sonoff devices with this..

You can use the Tasker plugin AutoVoice and Alexa to control most home devices.

Here is one tutorial but there are many you can choose from if you simply do a bit of googling. 




My-kl

unread,
Aug 7, 2023, 5:08:37 PM8/7/23
to Tasker
Gahhh I've spent ages googling and I can't find anything. I'm getting confused by all the mentions of mosquittos and IFTTT and I don't know what I need to install. Can someone please point me in the right direction? I want a simple way to control the smart charger with Tasker. I'm not a Tasker noob but I'm baffled by all the talk about mosquittos.

Rich D

unread,
Aug 7, 2023, 5:19:35 PM8/7/23
to Tasker Google Groups Post

Gahhh I've spent ages googling and I can't find anything. I'm getting confused by all the mentions of mosquittos and IFTTT and I don't know what I need to install. Can someone please point me in the right direction? I want a simple way to control the smart charger with Tasker. I'm not a Tasker noob but I'm baffled by all the talk about mosquittos.


What was wrong with the link I posted?

My-kl

unread,
Aug 8, 2023, 3:34:22 AM8/8/23
to Tasker
I don't have an Alexa. 

Rich D

unread,
Aug 8, 2023, 5:13:06 AM8/8/23
to Tasker Google Groups Post

I don't have an Alexa. 

You really do not need alexa. If you follow the link and check the set up requirements you just need to download the Alexa app (free app) for the initial set up. Then you can even delete it. You do not need any Alexa devices and you do not need to use alexa. This is absolutely the best solution for controlling any Home automation device using just your android device. 

If you would like to be able to use the 'OK google' command to get commands into Tasker then have Tasker control your devices you can use this in addition to the Alexa approach.





Brenden M

unread,
Aug 8, 2023, 3:43:14 PM8/8/23
to Tasker
I never saw a mention of mosquitos.........

I set up a few smart plugs, some lights, some LED strips. I can walk in my door, Tap my watch button twice, Tap Alexa button, and say "Turn on the Orange Plugs" and not have to fumble for lights or get shocked by bright lights I don't intend to use once turning my other lights on.

I used the information Rich D points out, from other information sources. Tasker's directions directly, and others. Googling helped me find it.

I could have deleted Alexa app, it ended up being useful to organize multiple devices in rooms and groups. If ALL you want is one smart plug to work, the method linked to above where you get to Delete Alexa after setup IS the simple way to go.

Cheers,

My-kl

unread,
Aug 9, 2023, 12:36:11 PM8/9/23
to Tasker
I've got as far as step 3 in that reddit thread. When I try and configure the AutoVoice Trigger Alexa Routine it says I need to enable AutoVoice Smart Home but when I tap enable it tells me to sign in to link my account but the sign in button just takes me back to the page telling me to sign in to link. I've paid for AutoVoice, so what's wrong?

Brenden M

unread,
Aug 9, 2023, 4:22:35 PM8/9/23
to Tasker
Get out of Reddit for a bit.

Follow the developer's instructions here:
https://joaoapps.com/autovoice-amazon-echo-smart-home/
and the link at the bottom:

You do not actually need a physical Echo. You can do this with Android, Tasker, Autovoice, Alexa.
In some instruction, João mentions that Alexa can be totally uninstalled after the routine is set up.
Then, you only have to remember your command, and it should stick and be simple.
__
Brenden

Steve

unread,
Aug 9, 2023, 5:29:20 PM8/9/23
to Tasker
I'm not familiar with all of the smart home devices out there.  One possibility would be to look at IFTTT.com and see if they can link to the manufacturer for your device.  If so, you can send messages through tasker to IFTTT and turn the device on and off.  I used NodeRed for a few weeks, but got rid of it because of how unwieldy it became.  IFTTT.com has made it much easier and with a couple of commands, I can use Tasker or voice to turn my plugs and lights on and off.

My-kl

unread,
Aug 10, 2023, 7:46:17 AM8/10/23
to Tasker
I've tried that, but I've got stuck. 
I can switch my charger on/off with Alexa routines but I don't see how to trigger the routine with Tasker. I can't use AutoVoice Trigger Alexa Routine because it says I need to enable AutoVoice Smart Home but when I tap enable it tells me to sign in to link my account but the sign in button just takes me back to the page telling me to sign in to link. I can't follow that tutorial about lights exactly (and then adjust it to fit my needs) because I don't have a smart light to test it with.
This is the easy method? BOy do I feel stupid.

Brenden M

unread,
Aug 10, 2023, 11:59:42 AM8/10/23
to Tasker
Sorry to make it sound easy. I think it is doable and not too tough, but I did click around in loops a few times and then it seemed to work and keep working. No one is stupid for not figuring out random technology that works different in slight ways on different manufacturers etc... Anyway...

In Alexa, if you hit More on the bottom right, then Settings, then Device Settings, do you see "Alexa on This Phone" and also your charger? I think at least your charger is there. What about your "AutoVoice Smart Home Device? That needs to be set up in AutoVoice.

I remember the "sign in to link" being a bit finicky or not exactly explained, but part of the issue I think is that Alexa, the charger, Tasker, Autovoice, are a bunch of things to connect and João is not a 150-person software team (but does a good job fooling everyone). I think the order might not be totally linear for every device. I've seen instructions for YEARS with different hardware and drivers etc, "try installing it three times, it worked for some users." Even though we want such a statement to be nonsense it is still true. The sign in page might not appear right after you click your account. After that, try the below part anyway.

On my "AutoVoice Devices" page in AutoVoice, I see a blank icon, but things seem to work. In "Alexa Smart Home Devices" I see "MyDevice" with various capabilities like percentage and on/off enabled. I set those up pressing + button.

Try signing in on the top AutoVoice Devices? Then, whatever result, go to the "Alexa Smart Home Devices" and click + then make a device. Do you see that device in the Alexa app's "Device Settings"? In mine, I see Alexa on This Phone, my device added AutoVoice.

If you can see your AutoVoice Smart Home Device, then in an Alexa Routine, you make the Smart Home action go to your named device, and send "On" or "Percentage 0" for example.

Then in Tasker, create a profile, Event, AutoVoice Smart Home, use your Virtual Device and Virtual Action of "Set Percentage".
In the Task the profile triggers, it Performs a Task named "phone %avpercentage"
In the Task list, there is a task named "phone 0"
"phone 0" in your case is a pre-defined task, simply "turn on charger".
You could make "phone 1" turn OFF the charger.
The way you would do that in Tasker is with the AutoVoice action "Trigger Alexa Routine".

So.... when you make the command like above Alexa Routine will be triggered by voice or button or other context, like normal Tasker.
Importantly, if you are interested in other smart devices, you'd be totally set up to add them in after doing the above (without the big device in your living room).
Otherwise, you should be able to set up the above, then uninstall Alexa, and the documentation says it should work still...

Good luck..

My-kl

unread,
Aug 10, 2023, 5:15:25 PM8/10/23
to Tasker
>On my "AutoVoice Devices" page in AutoVoice, I see a blank icon, 
I've got a phone icon with my model number underneath.

>In "Alexa Smart Home Devices" I see "MyDevice" with various capabilities like percentage and on/off enabled. 
I've done that.

>The way you would do that in Tasker is with the AutoVoice action "Trigger Alexa Routine".
But I can't use that because it tells me to enable AV S H skill, which requires going through that login screen that doesn't work. I've tried it about 20 times at this point, I think it fair to say it's never going to work :-(

If I tell GA to "talk to AV" it opens AV. Doesn't that mean my account is linked after all? But if I tell GA to ask AV to say hello (as in the demo video) it doesn't work.

Brenden M

unread,
Aug 11, 2023, 4:11:21 PM8/11/23
to Tasker
> to enable AV S H skill,

Did you do this in Alexa? Go to "Your Smart Home Skills" at bottom of Devices page and search for AutoVoice.
Install that, then the Trigger Alexa Routine should work.
I suspect (and hope,) you haven't done this, and it might solve the issue.

(Again, I did have a roundabout like you describe, where I clicked and clicked.
Suddenly it was all connected and I could make routines and use my watch or phone to make things happen on varied devices.)

My-kl

unread,
Aug 13, 2023, 5:40:43 AM8/13/23
to Tasker
Nope. It took me back to that login page that doesn't work.

Brenden M

unread,
Aug 13, 2023, 2:03:48 PM8/13/23
to Tasker
Yah who knows. If I ask many questions and provide many details, and you give one liners with no description, have fun figuring it out.

Whatevs. 

Maybe your phone is broken.

Brenden M

unread,
Aug 13, 2023, 2:06:34 PM8/13/23
to Tasker
For sure, Tasker does not have an entire engineering department like Alexa or smart tech companies, so the method that currently works is an ingenious workaround.
It works great, but it does not work for everybody. If you HAVE done steps correctly and it doesn't work, you should know that if you claim you have done every step.
Makes sense, right? It works for many others, right?

Good luck.

My-kl

unread,
Aug 15, 2023, 4:03:11 AM8/15/23
to Tasker
Sorry, I had a crazy weekend.
It looked like it was working but then Alexa couldn't find the charger. Not surprising as I'd unplugged it since it's currently of no use. So I plugged it in and then I got stuck at that login page. I can't remember exactly what happened as this was Thursday.
When I try now, the search for AV yields two results. One takes me to a page with:
- Launch (where Alexa tells me I need an AV account);
- Settings (where I can trying linking but of course the login page doesn't work, or I can disable the Skill even though it isn't enabled).
The other AV search result takes me AutoVoice Smart Home with an enable button that takes me to the login page.
I try that login page a few more times each time I get there but the result is exactly the same.

Reply all
Reply to author
Forward
0 new messages