Hi guys, today I bring you an alternative way to use Google Home (Google Assistant).
What is the difference with the existing implementation?
You don't need to say "Run" macro name "in macrodroid", just the name of the routine.
Requirements:
Install: Google Home - Apps on Google Play (Complete initial configuration)
Check compatibility with your language here
Next enter here https://home.google.com/ followed by clicking on "Add Routine"
(delete the existing demo code) and copy and paste the following code, modifying the following lines:
is: "Activation phrase" - replace 'Activation phrase' with your preferred phrase this phrase will activate the routine.
body: "My Macro Example" - define here the name of the macro you want to invoke.
members: example@gmail.com - Please change your email address here, the same as the one used in Google Home.
Save the routine and we finish the work on this site.
We now turn to MacroDroid.
In a new or existing macro we add a trigger "Notification Received".
Select the Google Home application and 'Contains' the same value as the body line: "My Macro Example" in this case we should put 'My Macro Example'.
Finish the actions of your macro, and now you can say "Ok Google My Macro Example" and the macro should run successfully.
Advanced:
To create more automated routines within the script
just copy and paste this code snippet (with the corresponding modifications).
In this way
What is the difference with the existing implementation?
You don't need to say "Run" macro name "in macrodroid", just the name of the routine.
Requirements:
Install: Google Home - Apps on Google Play (Complete initial configuration)
Check compatibility with your language here
Next enter here https://home.google.com/ followed by clicking on "Add Routine"
(delete the existing demo code) and copy and paste the following code, modifying the following lines:
is: "Activation phrase" - replace 'Activation phrase' with your preferred phrase this phrase will activate the routine.
body: "My Macro Example" - define here the name of the macro you want to invoke.
members: example@gmail.com - Please change your email address here, the same as the one used in Google Home.
YAML:
metadata:
name: MacroDroid Automation
description: MacroDroid - Google Home
automations:
- starters:
- type: assistant.event.OkGoogle
eventData: query
is: "Activation phrase"
actions:
- type: home.command.Notification
title: "Google Home MacroDroid"
body: "My Macro Example"
members: example@gmail.com
Save the routine and we finish the work on this site.
We now turn to MacroDroid.
In a new or existing macro we add a trigger "Notification Received".
Select the Google Home application and 'Contains' the same value as the body line: "My Macro Example" in this case we should put 'My Macro Example'.
Finish the actions of your macro, and now you can say "Ok Google My Macro Example" and the macro should run successfully.
Advanced:
To create more automated routines within the script
just copy and paste this code snippet (with the corresponding modifications).
YAML:
- starters:
- type: assistant.event.OkGoogle
eventData: query
is: "Activation phrase 2"
actions:
- type: home.command.Notification
title: "Google Home MacroDroid"
body: "My Macro Example 2"
members: example@gmail.com
In this way
YAML:
metadata:
name: MacroDroid Automation
description: MacroDroid - Google Home
automations:
- starters:
- type: assistant.event.OkGoogle
eventData: query
is: "Activation phrase"
actions:
- type: home.command.Notification
title: "Google Home MacroDroid"
body: "My Macro Example"
members: example@gmail.com
- starters:
- type: assistant.event.OkGoogle
eventData: query
is: "Activation phrase 2"
actions:
- type: home.command.Notification
title: "Google Home MacroDroid"
body: "My Macro Example 2"
members: example@gmail.com
Last edited: