Google Assistant Webserver in a Docker container

Tags: #<Tag:0x00007fd08d360e88> #<Tag:0x00007fd08d360a28>


Double check your PROJECT_ID is set correctly

google.assistant.library.device_helpers.RegistrationError: Failed to register device INVALID_ARGUMENT (400): Could not get the device instance. Project_id from side channel and project_id from url do not match.


USB sound cards are pretty cheap (~7$ on amazon or maybe even less on aliexpress), I don’t know about the compatibility but it might worth a try.
The SYBA model seems to work fine on the Raspberry Pi for @robwolff3 (is it this one ?

I do agree that a way to run it without audio input/output would be great though as we don’t specifically use it.

On a side note, the Google assistant Library version 1.0.1 has now limited support for ARMv6 architecture (Raspberry Pi Zero). Which means a new cheap platform to try this on !


Replying to myself :sweat_smile:, with deeper thoughts (well not that deep) I think it should be possible to create a dummy sound card device on linux…


If anyone knows how to do this, could be very beneficial to the project.


Sometimes I’ve got thir error :
UnicodeEncodeError: ‘ascii’ codec can’t encode character ‘\xe9’ in position 42: ordinal not in range(128) stderr
On a Synology nas. Any idea?

How to say to play music with a timer? Thanks !

commands work, but broadcasting no. It was working fine with andbobsyouruncle-amd64-google-assistant-webserver. Is it playing only on soundcard?


\xe9 is a small letter E with an acute accent mark. Try replacing it with a regular e.


Yes I know, I’m french and this characters are regularly employed. I don’t undersand why it does’nt work, while it work with andbobsyouruncle on the same platform.

Thanks for your help.


You’re definitely right.
Sorry for the noob question: I’m very new to home assistant and am using I only installed new things using the hassio plugins.

Can I install this in hassio? If yes: will it discover the USB soundcard?


@capstan1 This project is not made to work with Personally I use Docker so this was easy to just share with others to use. The only solution for right now is AndBobsYourUncle’s however it cannot cast remote media (spotify). Anyone is welcome to take what I / we’ve done and make it an add-in for


I don’t need streaming necessarily (would be a great addition to have though). My problem with the hassio plugin is only that broadcasting isn’t working for me, so I wanted to try your solution.


For me it works without real soundcard enabled, using:
sudo modprobe snd-dummy

I’m able to use it and play music on selected device. Many thanks for great work.


Does this solution also suffer from the issue with the google home saying “incoming broadcast from x” or have you somehow been able to get around it?


It has the same issue, we cannot disable that as long as Google doesn’t provide an option.

My Google Home is setup in french and didn’t have this issue at first, but Google recently rolled out an update in France that’s also changed the behavior of broadcasted messages. (For once I was glad updates were late :sweat_smile:)

HA to trigger Alexa routine

Using sudo modprobe snd-dummy what devices do you pass into the Docker container. Same that I do? /dev/snd:/dev/snd:rwm


Yes, I’ve passed the same.


This looks very interesting, as I assume this Webserver can run my Google Home Routines? (Which the Hassio version of Google Assistant Webserver does not when I tested).

A few dummy questions though…

Currently Im running HA on Raspberry Pi 3 B+ with Hassio only. Besides this Raspberry Pi and a Windows 10 PC, I dont have any other Linux setup or server. Im not familiar with Docker containers either (sorry for being a newbie), and I wonder if (and how) I can make this to work on my current Raspberry with Hassio, or my Windows 10 PC which is on 24/7 here at home?

Can I install a Docker container on any of these, or should I buy another Raspberry Pi for this purpose?

All I really need this for, is to call my Google Home Routines through buttons/cards in Home Assistant. Or at least be able to call functions like “play spotify on living room speaker” with HA/Lovelace card, which doesnt work with the Hassio version of Google Assistant Webserver.

Thank you


From what I’ve herd Docker on Windows doesn’t work the best yet and is not compatible with Linux based containers. If you don’t have a Docker environment (I have a Docker getting started tutorial here) then your best bet is to run though the Embed the Google Assistant tutorial from Google and run the python script they provide on your Raspberry Pi or another computer.


If you’re running then you’re technically already running a Docker environment. Using the Portainer addon you can add any Docker containers you want.


I was able to hack together a working local addon, but noticed it dies after using it to start a cast on another device. I went back and deployed on docker to confirm, and it does the same thing, the difference is the docker setting to restart on failures.

  • is this expected behavior - container dies and has to be restarted after requests?

To get it to work as a local addon I ended up hard coding the variable in the scripts and repointing the folder to the \share map in hassio. I’m sure someone with a little more knowledge with addons could convert this over pretty quickly. I may keep working on it but it’s only second time I’ve done anything with addons and the first was pretty simple.


I don’t have any experience with hassio addons personally. If someone would like to convert this project to an hassio addon or suggest changes to the container to make it more compatible, I welcome it.