[NEEDS UPDATING] Assistant Relay V3.3 Beta

The only way is to use something like Cast-Web-API and put all of your speakers into a group. The only caveat is, your speakers will definitely NOT broadcast a message that isn’t synchronized…but each speaker may not play the whole message or even any of the message. Since this method used the cast function which is intended for media lasting longer than a few seconds, the group function sometimes takes a couple seconds to kick in for every speaker. They are all synced but some miss the first few seconds. If you whole media file is only a few seconds long, then it misses the whole thing.

So, the short answer to your question is, no, there really isn’t a way to get around this.

Finally got this set up and working again (has been down for so long), just need to tweak my VPN settings as the server gets very confused about not being on the same network as the google home devices when VPN is on!

Just thought I would send this message in case it helped anybody else, I spent hours debugging only to discover that my OpenVPN connection was running and hence Google Assistant decided not to play any audio! Very frustrating!

Incidentally, I think it would be super useful to add the Assistant Relay version number into the About page if it is not too difficult, since some of the error messages were the ones that have been previously fixed, so I worried I had the wrong version running in my docker container.

All good now, look forward to having a play properly! Thanks again

this version was a million times easier for me to setup, I followed this guide to a T. You just download the release to the same folder and away you go.

Thanks for creating this, my v2 instance keeps going down so I keep having to restart my pi, we shall see how this goes.

Hey All,

I have 3 d-link security camera’s, one of them being inside the house facing out the front. These camera’s are google assistant compatible. I rent so didn’t want to install a doorbell camera or anything permanent. I have a dumb doorbell and 3 google smart display’s. When google released their smart displays they showed off a function where if someone rang your nest doorbell it would immediately cast that camera to your smart display so you could see who is at the door. This function only works for their nest doorbell. Now I could say ‘hey google show me the front door’ and it would come up on the screen.

I’ll try and cut a long story short but basically I put a motion sensor on the roof of the front porch facing the door, a multipurpose sensor just placed inside the doorbell housing inside. I have an automation that turns on a simulated switch if there’s motion out the front as well as vibration in the doorbell housing. In webcore I have a piston that sends a command using this assistant relay ‘cast front door to computer room display’ if my PC is on or ‘cast front door to bedroom display’ if i’m in night mode.

I’m so proud of myself for pulling this off, i’m not going to lie, it took hours of researching with a lot of people saying that it’s not possible. I’m also thankful to @ghesp for creating this!

TL:DR If someone rings my ‘dumb’ doorbell the camera at the front door casts to the smart display using this Assistant Relay. I have almost the same functionality as a nest doorbell paired with a nest hub.

2 Likes

That’s cool, however you’ve intrigued me. I could swear that the Google SDK doesn’t allow you to cast…

Can you share the command you’re using?

Well that’s interesting…
I’ll have to see what else it can do

I might add you don’t actually need a smart display. I’ve managed to cast it to my chromecast ultra as well but if the tv isn’t on it takes a while to power up so they would probably be gone by then. The commands you can use are extremely limited. I had to be very specific with how I worded the command.

I also wanted to automatically start playing music from google music on my smart speakers when I enter rooms but no matter how I worded the command, I couldn’t get it to play music.

Yeah, Google have locked the SDK down supposedly for media controls.

Some people say other solutions let you trigger routines etc if you have AR registered as a device, but I cannot for the life of me get it to work

This will only let you cast devices that are already connected to your google home architecture to one of your other devices. It will not allow you to cast any media/website you want. So, front door is a Nest Camera or something? That would make total sense that that would work.

If you are looking for a way to get a camera or dashboard (like SharpTools or Action Tiles) to show up on your google nest hub or hub max, check out CATT. It’s a python app that allows you to cast any website you can get to directly to your Google displays. It works really well too.

1 Like

One other thing to consider is that the dashboard must provide it’s own means of input when being cast (or a token based login) otherwise you won’t be able to login. Websites that are cast to a Cast Display allow touch input, but Cast Displays do not provide a keyboard for input.

For example, SharpTools.io has a touch input keypad for phone logins. :slight_smile:

Edit: For a view-only Cast device (without touch input), a token based login would be required.

1 Like

Thanks guys. I’ll have to look into this. I managed to install this Assistant Relay and also the cast-web apps onto an old PC I have running 24/7 thanks to some fantastic tutorials online. Just skimming over the documentation of CATT and it looks like a complicated setup at least for me…I have to somehow run it on that Windows 7 PC and figure out how to send instructions to it through Smartthings…looks like you guys have given me another project :grin:

You’ve set me another challenge now :smile:

I’ve managed to get CATT integrated into Assistant Relay, but when it finishes playing media, my Home Hub stays on a black screen with the cast icon. Any idea how to get it to exit when its done?

This is where I used https://vervallsweg.github.io/cast-web/installation/

It allowed me to setup each Google speaker/smart display as a music player device in smartthings then I can send a ‘stop’ command to that device through webcore which gets rid of the cast icon. The piston I shared above uses it.

The Stop command works for everything apart from locally played media. Try casting a local file using CATT and then issuing a stop command after it finishes. The icon still remains :frowning:

Ah bugger! I guess there’s not much point in me trying to get CATT running then, that would be very frustrating.

did you try the stop through CATT? That is what works when you cast a website to the screen.

@ghesp I see you put a branch off for the CATT implementation. How exactly are you issuing the commands from GAR to get the cast to work? I’m currently using a different method to get them there but if GAR can do it it would be a LOT simpler. Thanks!

I’m spawning a python process from Node to control it.

Issuing a stop command works for all media, apart from local media.
Try playing a sound on your computer using CATT to a smart display. The cast logo will stay there until it times out. Even a Catt stop doesn’t work for it.

Only for local media though? I only use online media sources (github) since that is what I have to use with cast-web-api. It didn’t support local files. But I’ll try using CATT right from my RPi and see if the stop works for local media.

What i meant was, what is the combo of commands that you have to use for CATT? Did you wrap it into a release file yet?

You’re spawning a python process? You should just be able to do it by issuing a bash command though. You don’t have to specifically spawn it in python. That might be why the stop isn’t working. Are you setting up CATT with a default display or are you issuing the display name every time?

Yeah I’ve done it manually without the server too but stop doesn’t work with local files. Fine with websites, YouTube etc.

You could technically pull the branch from from got, and just do npm I and npm run Dev in the relay folder.

You then search for devices using post /cast/search and cast using /cast with a JSON body using device (IP or name), and source (I think of the top of my head) being the URL