Community Hass.io Add-on: Google Assistant Webserver (broadcast messages without interrupting music)

Is your solution something that will be published for all of us or home brew only?

1 Like

Maybe I havenā€™t followed something but isnā€™t the official Google Assistant add-on a way for Google Home devices to interact with Home Assistant using DialogFlow (basically run custom commands on HA by voice input).
Thereā€™s also the Google Assistant component which is a way to expose Home Assistant controlled devices to Google Home so that they can be operated by voice using ā€œstandardā€ interactions.

How do the official add-on and component support broadcasting from Google Assistant to all Google Home devices, or more generally execute commands (e.g. remote media casting) on Google linked devices in place of the user? It seems they are designed to work in the other direction.

Actually Iā€™ve already shared the code in a previous post:

Itā€™s not a plug and play solution for sure. I wish I could make into a Hassio add-on, but I donā€™t have the knowledge nor the motivation yet (Iā€™m not a Hassio user)

By ā€œofficial Google Assistant add-onā€ I mean this one made by pvizeli (outdated doc)

To be honest I havenā€™t really used any add-on (again, Iā€™m not a Hassio user) but from my understanding the official add-on just create a new voice controlled Google Assistant device and is not directly related to Home Assistant capabilities. It is not a requirement for the Dialogflow component and is only useful if you donā€™t already own a Google Home device.

The Google Assistant component does not support broadcasting. As you said it is a way to expose Home Assistant entities to Google Assistant.

How hard would it be for you to bundle this up into a single docker container?

Iā€™m trying to get this working on a QNAP nas, and unfortunately theyā€™re pretty locked down in installing random software. Docker works fine though (through ā€œContainer Stationā€).

I am thinking of moving it onto a spare rpi3 I have lying around if we canā€™t figure it out, but Iā€™d prefer to keep it all on the one device.

Iā€™m getting the same error. Did you ever find a way around this?

Hello there my names Craig, I hope you can help, as I am pretty technical but not to the level of programming or linux and stuff like that. Iā€™ve never used hass.io before so I need to start from scratch. I basically want my google home to do what your addon can do, ie type some text on the computer and have google home anounce it in the assistant voice. quite amusing dont you think if Iā€™m talking to someon and suddenly google says ā€œI agree!ā€ and everyone will think sheā€™s listening in! would you be so kind as to give me some step by step instructions on setting up home assistant and your addon so i can do this? I believe I need a raspberry pi, which I can get from amazon, and if I find the setup too difficult or parts of it are inaccessible, Iā€™m totally blind and use assistive technology, Iā€™ve got a tech friend who should be able to help, its just the instructions arenā€™t really clear on here, the link to the add on that you say is similar says its broken and going to the google assistant page says the addon has been updated, but no idea where to find the updated version and instructions
any help greatly appreciated!

take care
craig

Just following this up, is there ā€œany wayā€ to play a short audio file* in the same way that broadcast works. Eg doesnā€™t stop any existing use of the google home devices.

*cookoo clock
*door bell
*other audio notifications

Unfortunately, itā€™s not currently possible. This is a limitation of Google Assistant and not this add-on.

I donā€™t know but first make sure your QNAP nas meets the requirements of the Google Assistant Library. You could try for example to install the official add-on, if it does not start my solution wonā€™t work either as both use the same library.

Technically you can send audio data with the Google Assistant Service so if we concatenate the sound ā€œbroadcastā€ + a custom audio file it might work.

Care to elaborate? Have you managed to get any interaction with broadcast other than repeating the input? For example, if you tell the assistant to ā€œbroadcast the weatherā€ your devices simply say ā€œthe weatherā€. Iā€™m fairly certain that functionality does not exist yet, broadcast is simply for broadcasting messages.

No I didnā€™t (well except the predefined broadcasts such as ā€œbroadcast itā€™s movie timeā€ etcā€¦) but the idea is to send an audio file being a record of yourself saying ā€œBroadcastā€ + another custom sound like ā€œDing Dongā€ so the end result would be a sound file ā€œBroadcast Ding Dongā€. Then Google Home devices would repeat the sound ā€œDing Dongā€. This is of course a hack but might worth a try.

In this case the assistant wouldnā€™t repeat the sound as it is just doing speech recognition. The sound of a door bell wouldnā€™t be recognized as speech. The assistant would just ask you to repeat yourself or say that it doesnā€™t understand.

When I do a broadcast with my voice from my phone, the Google Home actually replays a recording of my voice. So it might be the same with the SDK ?

Oh, now that is interesting. Every time Iā€™ve used broadcast it was just repeated in the assistants voice.

Yep. Itā€™s installed and working fine. The NAS has an intel celeron processor in it.

When I broadcast from my phone it repeats my own voice tooā€¦

Being able to repeat your own voice via home assistant would be fun. Currently my google home says ā€œwelcome home Mattā€ when I walk through the front door. I could have google welcome my wife with my voice when she gets homeā€¦ that would be freaky/funny.

Did a bit of testing. Unfortunately, it wonā€™t broadcast unless it actually understands spoken words.

No, I tried again today and still got ā€œTemporary failure in name resolutionā€, so it doesnā€™t sound very temporary. Lots of Googling got me nowhere. There seems to be some suggestion the CPU architecture may make a difference - Iā€™m running hass.io (ie. docker) under Ubuntu under VirtualBox under Windows on Intel (all 64 bit).