Custom Commands

Assistant Relay lets you send any command to Google Assistant that would normally follow the OK Google commmand.

Sending a custom command

To send a custom command, simply send a HTTP POST request to /assistant with the following json-encoded body parameter:

{
"command": "tell me a joke",
"converse": true, // Or false if you don't want the response broadcasted
"user": "greg" // Match the name of the users you setup
}

Once executed, Assistant Relay will then broadcast the response to your Google Home devices.

Note: If you do not want Assistant Relay to broadcast the response, set the converse parameter to false

Restrictions

As Assistant Relay uses the Google Assistant Service, there are some restrictions.

  • Google does not allow media commands to work, so sending a command such as Play John Mayer in the Office will not work

Casting back audio responses

Assistant Relay now supports Casting (in v3.3.0b and above). In the above custom command example, the response is populated with an audio field.

It is possible to pass this URL back to the /cast endpoint for it to play as per the following json-encoded body parameter:

{
"device": "Office Hub",
"source": "http://192.168.1.174:3000/server/audio?v=1581510182698",
"type": "remote"
}

For more information, please see Casting Media