Setting up Google Actions for Assistant

Hello guys,

I’m trying to get this working, however I’m having problems with the “google_assistant:” tag in configuration.yaml.
When starting Hass.io i am having this error:

2017-10-19 18:12:32 ERROR (MainThread) [homeassistant.loader] Unable to find component google_assistant
2017-10-19 18:12:32 ERROR (MainThread) [homeassistant.setup] Setup failed for google_assistant: Component not found.

Do you have any idea of what’s missing?

Thanks

Did you update the custom_component files?

Any idea what domains this integration supports? I listed cover, lock, and script in the configuration, but the only device that assistant asked me to assign to a room was my garage door (which is a cover).

No I didn’t :S What should I do?

By reading the code I see support from the following “switch, light, cover, media_player, group, fan, scene”

That’s correct, you can see the domains in the config.

script is probably super easy to add as a scene. lock could just be a switch but I’d be hesitant to expose by default.

Thanks @CedricGatay and @PhilK. I didn’t even think about the risks of exposing my locks.

Can we also expose input_boolean like homebridge? Lot of people (including myself) use input_boolean as toggles for automation and it will be nice to be able to expose the same.

I just checked, emulated_hue exposes input_boolean as well.

1 Like

Seems reasonable to me. Should I just create an issue on github with a todo list of things to be implemented so people can keep track of them? (also easier to link to PRs as they come through)

It will be difficult to keep a track on Github, plus it is not really an issue. Feature requests should be posted in the forums. This is easy enough and we can submit a PR right away.

If it is just adding input_boolean to the DEFAULT_EXPOSED_DOMAINS, I can do it now.

Hi @CedricGatay. Thanks for your tip! It solved my problem.

For those who like me are using docker to get this up and running, you can chage this file by running this command:

sudo docker exec -it homeassistant vi /usr/lib/python3.6/site-packages/homeassistant/components/http/__init__.py

Then you need to make the changes to the file and save it.

Then just run:

sudo docker restart homeassistant

And that’s it!

Thanks for all the help guys.

Would the Google Actions be able to respond to a query like “Where is <device_tracker's name>?” and respond with the state of that device?

Nice work, ready for this to be in the release - I sent ahead and setup an oauth server and actions only to find the documentation link where you didn’t need it :confused:

In any case, seems to be partly working, getting this on the dev branch:
2017-10-20 02:36:02 INFO (MainThread) [homeassistant.components.http] Serving /api/google_assistant to 66.249.84.13 (auth: False)
2017-10-20 02:36:02 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=3044732784-41, service=turn_on, domain=group, service_data=entity_id=group.stairway_lights>
2017-10-20 02:36:02 WARNING (MainThread) [homeassistant.core] Unable to find service group/turn_on

still do not get it.

TO me it works with emulated_hue, both Alexa and GH

@kevinw hmm, turns out groups don’t have on/off like I thought, I’m going to have to rethink that one and fix it. I think I can solve it by using homeassistant.turn_on instead of trying to figure it out myself (since ha turn_on already does that). Sorry about that :confounded:

@firstof9 I’ve been thinking about a similar problem. I want to be able to ask “how much power is the house using?” because I have a house energy meter. But if you look at the available traits I can’t find anything that would match up to more general things like “where is [person]” or “what is the power consumption”. It’d be doable for the general actions API but that’s not something I’ve really thought about yet. Even if I can do both the smart home and actions together you’d end up having to do “hey google, ask [invocation name] where’s [person]” where invocation is some unique thing you’d have to come up with for your skill. Unlike the Echo you can’t create a private skill that uses a really generic invocation name (I literally have an echo skill that’s, “ask the house for the power consumption” and it gives me that info. “ask the house who’s home”)

@arsaboo and other early adopters. I’m working on a branch to add script, lock, and input_boolean support but I haven’t really tested it yet so if you’re SUPER eager for it and willing to potentially yell at me give feedback feel free WIP Branch

1 Like

That was exactly it! You are a genius!!

Next issue I found:

Invalid config for [group]: [google_assistant] is an invalid option for [group]. Check: group->group->RolandsLight->google_assistant.

I tried to just expose one group to google_assistant.
It works for switches, but not groups.
Thanks so much for all your work!

EDIT: the google_assistant: true must be a customisation as explained in the docs and then it works!!!
This is great!

And it doesn’t for a lot of people, particularly those new to Home Assistant or Google Home. If you take a few minutes to search the forum, or Discord, or even the issues on Github, you’ll see dozens of people who can’t get Emulated Hue and Google to work together.

Hello all,

I don’t know if someone tried to use media_player devices - which I did - and found a problem: The media_player devices are all considered as lights.

I have a Bravia Android TV and two chromecasts (one for the Kitchen TV and the other is the own Bravia TV itself).

Check my home devices in the google assistant device manager:

And this is my configuration.yaml:

So you can imagine… When I say “Turn on the lights” everything turns on: The actual lights, the living room tv, the kitchen TV (due to HDMI CEC)…

Also, the “all lights” group is considered to be a media_player, which I think it’s not correct.

Have someone struggled with this already? If not, when I have some time, I will check the code of google_assistant component to try to find where is the issue.

Many thanks!

How many times have you seen posts that say why won’t emulated_hue work with Google Assistant with the same answer every time, you need a real Google Home! this should mean you won’t have to have one any more.

Understood. Any other additional function ?

Like
OPEN GARAGE DOOR
instead of
TURN ON GARAGE DOOR

?