A raspberry pi turned into a Google Home, and it works!

This could be a new feature of HomeAssistant! You should submit it @claudio

Ok, got it working. So, i guess, compared to Alexa what is cooler on Google?

IMO the interaction with Google is way better then with Alexa-Echo.

Plus you have Chromecast integration, multi-user support, and multi-room audio (when google will implement it for the pi too)

If you use lower powered raspberry +mic+ speaker is cheaper then 50$ Alexa

i installed it just now to test.
i saw i could use snowboy for a wakeword, but i dont know how :wink:
i was browsing through the code a bit searching for where google waits for an enter, but i cant find it so fast.

is there an option that it starts listening and the programm ends after the reply?
that way i could create a commandline switch in HA that makes google listen to me.

1 Like

yes please, at least we can start using it from now, without waiting Google code. The code is not lonbg so I guess is not too difficult to identify what tio do.

Should be at line 190\

while True:
        if wait_for_user_trigger:
            click.pause(info='Press Enter to send a new request...')

        conversation_stream.start_recording()

https://github.com/googlesamples/assistant-sdk-python/blob/master/googlesamples/assistant/__main__.py

it starts listening after you see the text “Press Enter to send a new request…”, and after you press enter it stays in listening mode

i want to change the “Press enter” and use a HA switch for that

yes, exactly!

and it works on a pi zero. I guess we could have 20$ google home in every room :smiley:

oke, i see it now.

in the assistant there is a line

click.pause(info='Press Enter to send a new request...')

that makes the assistant wait.
so i guess i could create my own function and use that to let the assstant wait for any action i like.

i am gonna create a input_boolean and a small appdaemon app.
after that i should be able to ask Alexa to make google listen to me :stuck_out_tongue:

yeah knowing how to code I think is not difficult, awaiting your efforts.

I saw snowboy instructions, way too complicated for me. I rather wait the switch code, or google wake word code

@ReneTode

check this

Trigger the Assistant

Modify the sample code to control when to trigger an Assistant request (for example, at the push of a button). Triggering an Assistant request is done by sending a request to EmbeddedAssistant.Converse.

https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha1#google.assistant.embedded.v1alpha1.EmbeddedAssistant.Converse

trying to see how to make it works on windows PC, and android device, so we can use our HASS with voice from a smartphone …

@anon35356645 I managed to get Google Assistant talking to me on my iMac.

I’d imagine it’s a similar process to this for a Windows PC too?

I guess but don’t find any link

you know how to? Any progress?

No, my HA runs in a virtual server (Ubuntu - Hyper-V) on my main server at home. The Google is on a RPi.

yeah i created an app and can fire the google assistant with an input_boolean now.
but i have run into a few problems, because i did install the google assistant in a virtual env.
so i ended up installing a second appdaemon in that environment.

i will test some more and then upload it to github.

2 Likes

Did you add the emulated_hue entities through the google home app? I got google home working on the rpi3 but can’t find a way to add lights/swtiches.

The Google documentation says you need a real Home to set services like Hue, same reason you can’t do it with just Assistant and Home app on a phone.