Assistant Relay

So is this a fork of the other Assistant Relay ?

yes that works to, but also the old one is still working.

I’m using the 4.04 version.

and i installed 2 days ago (Google Assistant Webserver) thats a integration for home assistant and works even better and faster.

Ok, I think you misunderstood my previous question then.

I have been using Assistant Relay for years. My question was about being able to broadcast to a specific device rather than all devices.

No i did not misonderstood, u asked if that was a fork of Assistant relay, i replied yes,
But right now i’m testing 2 versions, 1 Assistant relay v4.04, and a addon called (Google assistant Webserver) and i must say the second one works faster and smoother

And yes its possible, just disable the broadcast button and use this command (broadcast to YOUR ROOM, MESSAGE.

It works great, as most of my important messages ar using this way to broadcast an issue, the rest is native tts

I’m currently using the HA add-on:
image

with the rest command to broadcast:

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

and service calls such as:

      - service: rest_command.assistant_broadcast
        data:
          command: Someone is at the front door

So based on what you have said I should be able to create a new rest command with "broadcast": false and then a command something like broadcast to kitchen, someone is at the front door ?

I’ll have to give it a try. Thanks for the pointer.

EDIT: Looks like I already created some code for this that I had forgotten about…

notify:
  - name: google_device_broadcast
    platform: rest
    resource: http://192.168.0.14:3000/assistant
    method: POST_JSON
    data:
      user: "Home Assistant"
      broadcast: "true"
      talkback: "false"
      command: "{{ message }}"
      device: "{{ target }}"

… so I just need to test it out and see if it works the way I want.

The massive benefit for me of using the Assistant Relay braodcast function vs TTS is that we almost always have music playing and TTS does not resume playback whereas the broadcast method does.

Yes thats how i use it to, the default tts is not that great.

But for emergency announcements i use this Broadcast feature.

Change this:

- service: rest_command.assistant_broadcast
        data:
          command: Someone is at the front door

To this:

- service: rest_command.assistant_broadcast
        data:
          command: Broadcast to livingroom, Someone is at the front door

Or if u have a dropdown menu, and text buton, like i have, do it like this:

service: rest_command.assistant_room_broadcast
data:
room: ‘{{ states(’‘input_select.room’’) }}’
command: ‘{{ states(’‘input_text.message’’) }}’

If u want my full code let me know, ill post it

1 Like

Thank you! I’ll give those options a try. I do like the idea of creating a card with input_select and input_text boxes.

Would you mind sharing your code for the rest_command.assistant_room_broadcast ? I think I basically have it in my post above but just want to check before I waste time testing things that don’t work.

Is there a non-deprecated version of assistant Relay out there that people are using these days or is everyone still using apipa169’s? I was using that addon but realized a couple weeks ago that it was archived and marked unmaintained almost a year ago. And the author of assistant Relay itself (the core software the addon repackages) moved on and marked it as unmaintained over a year ago. So I got rid of it since it’s not even getting security updates anymore.

I’m still interested in the functionality if anyone knows of a version of it which is being maintained though. I did find it useful.

here you go

rest_command:
    assistant_room_broadcast:
      url: http://XXX.XXX.XXX.26:3000/api/assistant  #for v4 if v3 use   /assistant
      method: POST
      content_type: 'application/json'
      payload: '{"command":"broadcast to {{ room }} {{ command }}", "user":"don"}'
      #payload: '{"broadcast": false, "talkback": false, "user": "oot", "command": "broadcast to {{ room }} {{ command }}"}'
2 Likes

Well there are some updateded versions, i’m testing Google Assistant Webserver and using v4 from apipa169.

If u want an easy thing what does the same add this html into supervisor resources (GitHub - AndBobsYourUncle/hassio-addons) and install Google Assistant Webserver

Otherwise go into portainer add the docker image of Apipa169 use the v4.04

There are other docker images what are beeing updated but still having issues

Can you explain to me how I can still use this addon? As I have a HVAC/Airco unit which is completely controlable through HomeAssistant but I can’t turn it on or off… However, I can with Google Home… So I’m looking for a way to bind a button to action Google Home to turn it on or off.

  • Add this repo to your HA add-on store.
  • Install the Assistant Relay add-on.
  • Add the rest commands as per the docs in the add-on repo.
  • Call the services via HA code / automations. In your case you will want to use the command rest service rather than the broadcast one

Google changed their oAuth… the repo is no longer working on HA on the way it is desribed in the docs, had the same issue a month ago but thought it maybe changed…

U can still use it, tell me where it goes wrong.

If its by where u need the auth code, just let it open the new page, enter your email and then u get an error.
But in the website link there is your auth code, use that and it works.

Also when creating a AUTH user on google just select web app.

@malosaa ,

Can you be more specific to solve this.
I get this window:
Schermafbeelding 2022-06-05 om 20.51.10
But when I click on “Authentication” I get this error in a new window,

I downloaded the json for the generated “Web client (auto created by Google Service” - Uploaded to Assistant Relay - I have a popup page with my email address, I choose my email address and got a 403 access denied google page. I’ve saved the URL and the error page.

What does the auth code look like?

EDIT

I figured it out - I forgot to add my email to the test users. After that I was presented with the error page with this URL:

https://hassio--assistant-relay-894d333.firebaseapp.com/__/auth/handler?code=4/0AX4XfWihEdh7_Gq4n_EQqKaS-Ab217bo8L2Q3BVQUU5dRy6sEwuoAJm7bIHpctV9Urs7-A&scope=https://www.googleapis.com/auth/assistant-sdk-prototype

Between handler?code= and &scope= is your auth code, so mine would be:

4/0AX4XfWihEdh7_Gq4n_EQqKaS-Ab217bo8L2Q3BVQUU5dRy6sEwuoAJm7bIHpctV9Urs7-A

see this tutorial
@RienduPre

Thanks, now it works :slight_smile:

you welcome, and sorry for the late reply

@Viking
this is the correct docker image*

GO into portainer,

  • Click on add container
  • give it a name
  • and paste this into image (behind docker.io)
    apipa169/assistant-relay:4.0.0b4
  • click on publish new network port
    [HOST] 3000 [CONTAINER] 3000
  • Click on restart policy just down below
    Select on failure or unless stopped

just click deploy container and you should be good

If it works just do the installation and follow tutorial.
https or http://yourserver:3000

Even when searching an image on docker.io u see some people updating this version, but did not test them as there is no info available, so the above one i’m using for some time and works really good and stable.