Component to send commands to Google Assistant

AR has CATT built in so you could cast the mp3

Yes but looks like similar limitations in that it interrupts and doesnā€™t restart music. Also the video cast icon bug on nest hubs. Iā€™m guessing there are elaborate work arounds. For now Iā€™m just keeping Google assistant devices and a seperate music system.

Hello All I used this in other smart home instances and loved it. Iā€™m fairly new to HASSIO and I got it installed and when using the sandbox Iā€™m able to broadcast etc. The thing I can not figure out is how do I use this within hassio automatons etc? I have been fighting with this for sometime now and Iā€™m afraid Iā€™m just not getting it and not finding much info online that walks you through the process for newbs to hassio.

No one? I have spent countless hours searching the internet and Iā€™m not finding anything. Iā€™m sure it is simple and maybe Iā€™m over complicating things but I have the info above in my config, I would of thought I needed to call a service but that does not list anything related to the home assistant. Notify has nothing either. Can someone provide me some guidance.

Well looks like I got the rest service showing up now. Appears I had some extra spaces in my config although when I checked config it showed no errors. Anyway I can now call the rest service but I cannot get the googles homes to announce although the sandbox commands work. I know there is a bug in HASSIO but not sure if it is me or related to the bug. See below for what Iā€™m testing with.

image

Did you ever got an answer on the Nabu Casa question? I only use Nabu Casa and I canā€™t make this work, at all.

No :slight_smile:

Ok thanks for your quick response. It looks like a very nice component but I donā€™t have any idea how to make this work for me.

I too want to change this. Seems like it gets the name from the user youā€™re logged into HASS with when you created the integration. I canā€™t work out how to edit that now though.

Hi, Is it possible to trigger my Wake Up automation which i configured in google home to tigger it with Assistant Relay? instead of saying ā€œHey Google goodmorningā€

I donā€™t think it possible, to send ā€œcustom commandā€.
https://greghesp.github.io/assistant-relay/docs/commands/custom-commands

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

1 Like

Hi Joe, did you ever manage to get your rest service working? Iā€™m at the same point as you, I can broadcast messages to my Google Homes using the AR sandbox but I am unable to send commands using call service.

I have added the following to my configuration.yaml

rest_command:
  assistant_broadcast:
    url: http://192.168.1.170:3000/assistant
    method: POST
    content_type: 'application/json'
    payload: '{"command":"{{ command }}", "user":"David", "broadcast":true}'

After server reboot I have tried calling the service from developer tools using the following command, but I get no audio broadcast from my Google Homes?

service: rest_command.assistant_broadcast
command: hello

I did get it working. I canā€™t remember the exact issue but I did have an issue in my yaml config. See below for an example of my corrected and working config.yaml.

rest_command:

assistant_broadcast:

url: http://192.168.1.135:3000/assistant

method: POST

content_type: "application/json"

payload: '{"command":"{{ command }}", "home":"username", "broadcast":true}'

assistant_converse:

url: http://192.168.1.135:3000/assistant

method: POST

content_type: "application/json"

payload: '{"command":"{{ command }}", "home":"username", "converse":true}'

assistant_relay:

url: http://192.168.1.135:3000/assistant

method: POST

content_type: "application/json"

payload: '{"command":"{{ command }}", "home":"username"}'

notify:

Hope this helps brother let me know if you need anything else from me.

1 Like

Thanks for your reply Joe. I tried removing my previous rest_command: configuration and then modified your working config, but changed IP and username. My configuration.yaml now includes the following

rest_command:

  assistant_broadcast:
    url: http://192.168.1.170:3000/assistant
    method: POST
    content_type: "application/json"
    payload: '{"command":"{{ command }}", "david":"username", "broadcast":true}'

  assistant_converse:
    url: http://192.168.1.170:3000/assistant
    method: POST
    content_type: "application/json"
    payload: '{"command":"{{ command }}", "david":"username", "converse":true}'

  assistant_relay:
    url: http://192.168.1.170:3000/assistant
    method: POST
    content_type: "application/json"
    payload: '{"command":"{{ command }}", "david":"username"}'

I tried ā€œdavidā€:ā€œusernameā€ and ā€œusernameā€:ā€œdavidā€ as I wasnā€™t sure which way round they should be. Unfortunately I can still only broadcast from ARā€™s sandbox, but canā€™t figure out how to call the RESTful Command: assistant_broadcast service.

Am I correct in thinking that the username in the payload should be the AR user found in user management? http://192.168.1.170:3000/user-management Is your user called ā€œHomeā€?

Yeah it is home I created another account because the broadcast from user is annoying. That makes it a little more bearable at least. Iā€™m out and about now but will see if I can send you some more info screenshots etc when I get home.

Also I wanted to make sure you knew the code I posted was not formatted correctly. Iā€™m sure you figured this out already but just in case. I could not figure out how to format it when posting.

Another example, Google Assistant can turn off my TV through my Chromecastā€™s HDMI-CEC, but thereā€™s no way to do that through Home Assistant. it HAS to be a google assistant command.

2 Likes

anyone succeeded in starting a ā€œconversationā€ with assistant relay? I want HA to send a command to Google Assistant, which then starts a conversation (built with google Actions) with the user.

Hello guys, I am struggling in getting the authorization code, after you upload secret file, I just bump into new black page instead of getting the auth code. Any ideas?

thanks

Yup, having the same issue, last step is just a blank page. I dont think it will work anymore, because author of that relay stopped maintaning the repo and Google loves to change their APIs :frowning: