Google Home - Tasker command to switch on a device

5,081 views
Skip to first unread message

francwalter

unread,
Aug 29, 2020, 7:47:53 AM8/29/20
to Tasker
Hallo

Is it possible to switch on and off Google Home connected devices with Tasker?

I can use Google Assistant or Google Home to switch on my sonoff plugs (connected to Google through eWeLink) but I would like to automate it more easily. At the moment I have to talk to Google or use Google Home to switch them but it has no widget it shortcuts. 
Tasker could do all that if there were any connection to Google Home.
Is there any way to use tasker?

eWeLink (and sonoff) used to work with IFTTT, but since may that is costly, so I am looking for another way to use sonoff easily, without changing the firmware.

Thanks.
Frank

Tasker newest version, Xiaomi Mi A1 mit Android 9

francwalter

unread,
Aug 30, 2020, 1:12:49 AM8/30/20
to Tasker
I tried AutoVoice, set an Action "Test Command" which says "Schalte Flurlicht an" but this doesn't switch anything. At least it throws no error.
If I say to Google Assistant the same thing, the "Flurlicht" switches on.

What could I do?

1840t...@gmail.com

unread,
Aug 30, 2020, 4:13:08 AM8/30/20
to Tasker
, Go to the IFTTT (If This Then That) website and link it to your devices and Google home.  Once this is set up, Google will send commands to IFTTT.  You can also use Tasker to send commands to IFTTT directly and switch your devices on and off.  I use it all the time for my lights, outlets and switches.

francwalter

unread,
Aug 30, 2020, 4:23:57 AM8/30/20
to Tasker
1840t...@gmail.com schrieb am Sonntag, 30. August 2020 um 10:13:08 UTC+2:
, Go to the IFTTT

As I already wrote, IFTTT stopped working with sonoff :(
As I must read on ewelink:
"The IFTTT is only available for the Advanced and Pro VIP Plan, details refer to below link:
https://vip.ewelink.cc/ "
And sonoff is connected (hardcoded) to ewelink. Its only possible to flash e.g. Tasmota.
But I want a simpler solution, too much work to flash all my sonoff devices and program all that Home automation newly.

Rich D

unread,
Aug 30, 2020, 8:09:55 AM8/30/20
to Tasker Google Groups Post
Here is what I have done and it has worked for a long time now. I have a tablet that mostly keeps a picture viewer going but is available in the kitchen if I want to use a tablet instead of my phone. You can use any older unused android device. Have it always on with wifi on. Any command I want tasker to send to the assistant I will have pushbullet (you can use Join) push the message to this device. On the receiving device just detect the push and open the assistant and paste the command in. I use the tasker 'Keboard' action for pasting and entering the command. There is a option in the assistant settings to always launch the assistant in keyboard input instead voice input. 

On some finicky commands for example occasionally a sonoff device is offline, after issuing the command you can scrape the screen with auto input to get the assistants response to make sure the command is accepted. If it is not accepted you can try giving command a few more times (this usually works for sonoff device) or alert you it failed. 

francwalter

unread,
Aug 30, 2020, 9:55:54 AM8/30/20
to Tasker
Thank, Rich D, thank.

My use-case is this one: It is midnight and I sit on the sofa and the movie, projected with a beamer, is over. I switch off the beamer with my phone with IR command (irplus, great App it is, thanks!) and I switch off the old Laptop (some cheap Sony Laptop I found, with a big HDD, serves as Media station) with ssh (I use Bitvise, works good and on Android I use Smart Command SSH, which is easier than own ssh over Tasker etc.) but to switch off the switch where the laptop and the Power Amplifier are connected, a basic sonoff switch, I used an IFTTT command previously.
IFTTT for sonoff (eWeLink without monthly paying) has vanished, so I first tried the eWeLink-Widget, which is a bad-working buggy thing. It is mostly first offline, so to call it Widget it would be unjust. Only if I start eWeLink App, the widgets start to get some life. But then I could use the eWeLink-App in the first place, which takes long to open.
I want to ideally press a button and go to bed. I don't want to talk to Google Assistant, which would work as well, but it is late, I don't want to talk much ;)
At the moment I use Google Home and switch it off there, which works mostly fast. But there is no Shortcut or Widget for it, so it takes some Clicks - too much for me to be comfortable.

OK, this is all not a big deal, I could also walk four steps and switch the sonoff off manually (I wouldn't need any sonoff in this case anyway).
But I love to automate things, makes me feel so mighty :) ;)
And I love a bit programming.

Rich D

unread,
Aug 31, 2020, 5:13:25 AM8/31/20
to Tasker Google Groups Post
Those are some of the reasons I went this route. I hate waiting for theses apps to "come on line"  and to wade through Google home is too time consuming as you stated you could hit the switch faster. This approach allows you to hit one button, then if Google does not succeed it will try it for as many times as it takes. 
Reply all
Reply to author
Forward
0 new messages