Google Assistant Relay and cUrl commands

Thank you for the code.
May be I am missing something, but I am not able to use the driver. Here is what I did.

  1. Set up the Google Assistant relay server on RPi running Ubuntu.
  2. Successfully sent commands to relay server endpoint 192.168.1.10:3000/assistant using Curl from another Ubuntu box. They were played on Google Home mini.
  3. Installed the driver code Hubitat/V2.X Driver at master · nrmoles/Hubitat · GitHub and created a device 'GoogleHomeMini' using the driver.
  4. Created a new rule to send notification as text message to mobile phone and speak/notification to GoogleHomeMini device on a mode change
  5. I was able to see that on mode change the rule ran and I got text message on the phone (as one of the action) but the Google assistant relay driver device did not run.

Any ideas what could be the issue?

Ajay

The driver I linked to is for Cast-Web...not assistant relay. You have to use @ogiewon's driver for Assistant Relay.

Ryan what are the main differences between assistant relay and cast web from a broadcast perspective?

From a broadcast perspective? Nothing of significance. The major difference between the two is:

  1. Cast web allows for volume control of cast devices
  2. Cast web allows for playing announcements on individual speakers through the cast capability of your GH speakers.

I need to sit down and figure out how to use web cast to my google home devices.

I can't use broadcast as I definitely do not want announcements on all home devices (bedrooms being the main concern).

Has someone written up a more concise guide for implementing, or do I just need to RTFM/use search and figure it out?

Well, that depends on how much assistance you need. There are some things you should know about the cast-web implementation though. If you are playing any music, it will not resume after an announcement. If you are casting to the device and you cast something else, then it doesn't resume the first thing when the second is done. That's how "casting" works.

If you are comfortable with getting node setup, then all you need to install the node server is npm install cast-web-api@beta -g. Then you can install the apps and drivers found here.


If you need help setting up a daemon to run the server automatically at boot, or running the cast-web, let me know, You can run cast-web and Assistant-Relay at the same time but not on the same port. So, there would have to be modification to how you are running one of them. You will still need the Oauth info for cast web, but you don't need a json file. Once you install the app, there will be an option to enable Google Assistant Authentication.

1 Like

Thanks!

I was aware of the music interruption. In my case that is OK, as I have one Chromecast Audio connected to my whole home speaker system and that is the only one I play music on. I only intend to send messages to the Google Homes, so should be good there.

Thanks for the link. I've setup node before for other applications, so should be able to muck my way through it.

Now I just have to find the time to give it a go.

Thanks again.

No problem. Also, definitely don't use node 11. It works best with node v8.11.

1 Like

Question, before i even try (Will receive my HE later on the week) G assistant now supports multi languages (Spanish, French, Italian etc) and you can have two assigned to your Google home devices. If you send the custom message let's say in Portuguese will GH be able to broadcast it?

Edit:
Sorry, I was looking at the wrong list on the reference page. Yes, you should be able to modify the language to Portuguese.
https://developers.google.com/assistant/sdk/reference/rpc/languages

OK I think it is working.

I got ubuntu + node v8 installed no problem.

I did npm install cast-web-api@beta -g

When I run sudo cast-web-api, I get "GoogleAssistant require error: Error: Cannot find module 'google-assistant'"

I decided to ignore and and move forward. I was able to add the app and it discovered my devices correctly. Test messages work.

Still weird though, in the Cast Web service manager, if I go to "Setup the google assistant" button, the web page that opens also says:
GoogleAssistant not installed, error: Error: Cannot find module 'google-assistant'

But it seems to work, so screw it.

NOW to figure out how to send messages like "Front Door Open" based on my door contact.

You have to go into the server, "cd" to the directory. Then "npm run start" to start the server app. If that's not running it's not going to work. In the connect app, go to "check host connection" and make sure that it can find your server.

Is the cast-web dead? all the links in this post are dead. I have google relay setup and runnning. My understanding from what I read here is that with Web-cast I would be able to send a request for only one of my google minis to broadcast vs all of them with assistant relay. Also I can control volume with cast-web. which one is needed if I want to say send a command like "Stop music" I have figured out how to use RM to make a broadcast when I press a button but Cant figure out how to send a command vs broadcast and dont like that it says my user name before broadcasting. Does cast-web say the username before it speaks? Sorry for all the questions thanks.

Castweb can do what you want, but for the most part, so can the Chromecast Integration (beta).

If you want Castweb, it's here

What is chromecast listed under on RM?

Your device that you find with the Chromecast integration. Did you go through the discovery process to find your Chromecast enabled devices?

I did and all of my devices are showing under devices. But can't figure out when I want to create an action in RM what category the devices are listed under.

Then for True Action....

25%20AM

Thanks exactly what I needed, really appreciate the details.