Trigger google home to say something

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
guivassao
Posts: 1
Joined: 05 Jul 2018 05:18

Trigger google home to say something

Post by guivassao » 05 Jul 2018 19:52

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.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Trigger google home to say something

Post by Desmanto » 08 Jul 2018 18:11

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Locked