Assistant Relay

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.

Thanks, but I’m not using Portainer.
However, that shouldn’t be a show stopper. I’m using a custom container UI made by QNAP called ContainerStation. I’ll try to install it and let you know how it goes.

all good,

Sadly i only know how portainer works.

if u can’t get it working, just download the assistant relay version in the add-ons of home assistant.
not the beta but the last working one, that one also works.

Add this repo

regards

As I said, I’m not running HassIO but the Core version in a dedicated container. So I do not have any add-ons or plug-ins repository or any supervisor options.
But that shouldn’t stop me so I’ll just give it a try and I’ll let you know.

aah true, my bad. yeah let me know how it goes.
hope its gonna work for you.

regards

@RienduPre

there will be changes to the oauth in october.

i did read this on github, and maybe this will let it work after the update.
a guy posted this in github, and i don’t know if its working, well see soon.

also there is an updated nodejs verion what works, but i’m not a fan of that.

This is the github post

I think I have a method that will work to get this running without any code changes at all. And it has to do with how you create your Oauth Client. Instead of choosing Desktop, choose “Web Application”. You will then be presented with a screen to add your redirect URI. Simply enter “https:.//www.example.com” and click create. This will create a json file for you to download that will not use localhost as the redirect URI, so it should still work.

Once you go to add your user using that JSON file, you will eventually get to an example.com page where the address will contain a code:

(don’t worry, that’s not the real one, I subbed in a lot of fake characters) just copy everything after “code=” to “&scope”. So, mine would be: 4/0AdQt8q474dfdydghdsdbdbtRrzq0QC_lObsRrsdwa4yXIssdfvxkgF8zHrvrtyrrhdyz4EumCwwett433g (if that were real) That oauth method will not be deprecated after Sept because it doesn’t use the unauthorized flow. You have to manually put the code in but we’ve had to do that anyway. Fingers crossed this still works!!!

2 Likes

Your link to the github page isn’t there.

hi its this one,

i posted it here because its hard to read on github.

regards

2 Likes

Just moved Assistant Relay off of my Home Assistant to it’s own Docker container (after much struggling getting the Google auth part)

I’ve been using the beta for a few years now. After moving this, I added basic auth (username/password) with nginx for additional security.

This seems to break the ability to also use an assistant relay API key. {“msg”:“Invalid API Key provided”}. API keys work fine with basic auth disabled. Basic auth works when no relay API keys have been generated.

I think this is because basic auth also uses the “authorization” HTTP header, but I’m not sure.
Here is how I pass the API key header with NodeRED:

msg.headers['authorization'] = 'longstringofnumbersandletters';

Anyone know of a workaround to allow the use of both at the same time?