Assistant Relay Alternative

I have some smart devices that cannot be Tasmotized or EspHomed, but these devices are integrated into Google Home. Having a way to communicate with Google Assistant and send commands through HA would be the missing link to complete a fully integrated smart home where I can fill the gaps.

I have found out that there was a previous project called Assistant-Relay-for-Hassio. GitHub - Apipa169/Assistant-Relay-for-Hassio: Send commands (including broadcasts) to the Google Assistant via Home Assistant

That project was very well documented and even had a decent tutorial to integrate into HA

I tried to follow all steps described, but when we reach the point where we must connect with Google, the windows does not pop and we end up in a dead-end. It seems that about 2 months ago, Google changed the settings for the Oauth, meaning that it no longer works.

Since Assistant Relay is no longer maintained, it seems that won’t be fixed.

Does anyone know of an alternative way to achieve something similar? I mean, sending commands to Google Assistant silently from Home assistant. Or anyone could take the lead and update Assistant Relay so it could reach the Oauth login page from the configuration menu.

4 Likes

This might work. I moved from this to Assistant Relay a while back.

Thank you for your suggestion @Mahko_Mahko,

The add-on you referred is for broadcasting TTS. It can be useful in some cases but my goal was to send commands to Google Assistant silently to execute some tasks with lights that could not be integrated into Home Assistant.

After some more adjustments, I was able to properly set Assistant Relay and it has been working so far.

2 Likes

You can use it for commands too.

But Assistant Relay is a bit slicker, so if you’ve got it working that is great.

1 Like

Thanks I will look into Google Assistant Webserver. I use Assistant Relay to control some of the cheap Costco Feit bulbs since there is no direct integration. I hope Feit will eventually support Matter, but I’m not holding my breath.

I received a notice from Google that OAuth out-of-band (OOB) flow will be deprecated on October 3, 2022 and will block OOB requests to Google’s OAuth 2.0 authorization endpoint for existing clients. I believe that means Assistant Relay will stop working except in test mode on that date.

I also expect that OAuth out-of-band will be deprecated eventually… If I could build integrations for my products that do not interact with Home Assistant that would be my first choice. Assistant Relay has only been patching a hole for the time being. Or even if there was a way to Tasmotize my renegade devices inside HA, that’d be great! Until I find another way to plug them in, Assistant Relay will be the way for me…

@donparlor for those of us following along at home, are you able to share the adjustments you made to be able to set up the Assistant Relay add-on, I also tried to follow the same YouTube tutorial and got stuck at the OAuth bit at the end. TIA.

Hello @riqjuan, I found the solution reading comments below the video.

Credits to Jake Moore in Youtube

A few things have changed since the creation of this video.

  1. When creating your OAuth Credentials, set your app as a Desktop App, not TV.
  2. When creating your user in Assistant Relay, the Google authorization flow does not have a specific pop-up that says “Allow” anymore. Instead, there’s a button that says Continue.
  3. When you finish the Google authorization flow, it’s going to open a tab with a blank screen. Your Auth key is in the url. Copy everything between “code=” and “&scope”. You can paste that into the auth key screen in Assistant Relay setup.
  4. After you visit the URL from your logs and enable the API, it will likely take up to 10-15 minutes for it to start working. Even then, I was not able to get it to broadcast from the sandbox.
  5. When creating a test animation and you select the REST command you created as the action, it did not show the “Service Data” field. Click the 3 dots on your action and click “Edit in YAML”. Now you’ll see “data: {}”. Type anything between the curly brackets, then switch back to visual editor and your field for Service Data will be visible.

Let me know if it works for you. I’ll add more info if it doesn’t. :slight_smile:

7 Likes

Great! thanks @donparlor I was able to get it all working with this extra info, appreciate it. :ok_hand:t4:

@riqjuan Keep an eye for stability of this integration. I’ve seen Assistant Relay disconnecting users from accessing the Google Devices it had previously access to. I think the OAth disconnect if connection does not remain active. Going through authentification again and adding user again render this integration useless. I don’t know if there is a way to avoid user getting disconnected…

Hey I came across the disconnecting issue by following the video… do you have an update after using the method from the comments… is it reliable or has it disconnected because of oauth issue

It seems that someone is trying to fix the assistant-relay base.

https://techgaun.github.io/active-forks/index.html#https://github.com/greghesp/assistant-relay

I can confirm mcmoe version works fine. Follow this Youtube comment to set up it properly.

Here's the comment in case it will be deleted

Jake Moore
I was able to get this working today! A few things have changed since the creation of this video. 1. When creating your OAuth Credentials, set your app as a Desktop App, not TV. 2. When creating your user in Assistant Relay, the Google authorization flow does not have a specific pop-up that says “Allow” anymore. Instead, there’s a button that says Continue. 3. When you finish the Google authorization flow, it’s going to open a tab with a blank screen. Your Auth key is in the url. Copy everything between “code=” and “&scope”. You can paste that into the auth key screen in Assistant Relay setup. 4. After you visit the URL from your logs and enable the API, it will likely take up to 10-15 minutes for it to start working. Even then, I was not able to get it to broadcast from the sandbox. 5. When creating a test animation and you select the REST command you created as the action, it did not show the “Service Data” field. Click the 3 dots on your action and click “Edit in YAML”. Now you’ll see “data: {}”. Type anything between the curly brackets, then switch back to visual editor and your field for Service Data will be visible.

Then you can follow integration with HA.

5 Likes

Very interesting! Thanks for sharing!

AWESOME! Thank you!

I believe this is from not pushing the app to production and the test user expires in 7 days.

I did make a new setup using this method on 24th August and till now works for me

Any idea what to do with this?

image

Is yours still stable/going strong?

My add-on seems to need occasional reinstall/onboarding…

Needs more monitoring though…

Mine works fine :slightly_smiling_face:

1 Like

I found a quite simple solution to this problem.
Recently, Google introduced “Device Triggers” for its Google Home Routines. It’s possible now to trigger routines e.g. when a certain device is turned on.
Using the standard Google Home Integration (Google Assistant - Home Assistant) it’s possible to expose a Home Assistant helper as device to Google Home.
Everything that is needed then is a Google Home routine triggered by that helper.
Like that:


Now it’s possible in Home Assistant to just turn that Helper toggle on which then results in Google Home starting the routine.
Works pretty good so far.

9 Likes