Page 1 of 1

Trigger google home to say something

Posted: 05 Jul 2018 19:52
by guivassao
Hello everyone,

I am evaluating automagic and so far it has been awesome.

I have a question: Is it possible to use automagic to trigger google home to 'say' something?

I know that currently google doesn't have such an API but I heard that it is possible to achieve this with Tasker and AutoCast plugin, so I was wondering if I could do the same with automagic.

Thanks.

Re: Trigger google home to say something

Posted: 08 Jul 2018 18:11
by Desmanto
This will be somewhat hidden usage of google home. Use the new feature broadcast to send what you want to say to all connected google home devices.
https://support.google.com/googlehome/a ... %3DAndroid

I don't know how the Autocast plugin do it, but in case you can replicate it in Automagic, you can use that autocast plugin too in Automagic.

I would prefer to do all in automagic alone, as we have the resource to do it already.
Action : Voice Command, blank prompt. Make sure you tick Google as the default app, so it will launch google assistant
Action : Control UI, you need to click the keyboard and send some text there. You can look at my index, Control UI tutorial (Basically this is similar to autoinput)
I don't have google home to try out, but probably you can use this CUI script

Code: Select all

sleep(500);
clickById("com.google.android.googlequicksearchbox:id/keyboard_indicator");
sleep(500);
setText2ById("com.google.android.googlequicksearchbox:id/input_text", "broadcast the answer to life the universe and everything is 42");
This should send the "the answer to life the universe and everything is 42" to all google home device and broadcast the message.