[MUSIC PLAYING]
JESSICA DENE EARLY-CHA: Welcome to "Assistant on Air."
We have conversations with people that
build for Google Assistant.
I'm Jessica Dene Early-Cha.
And I'll be your host today.
I'm a developer advocate for Actions on Google,
which means I create content to teach developers on how
to build for Actions on Google.
And I get their feedback to make the platform better.
Today, we'll be chatting with Dan Myers.
Welcome, Dan.
DAN MYERS: Thanks.
Glad to be here.
JESSICA DENE EARLY-CHA: So what do you do here at Google?
DAN MYERS: So I'm a developer advocate on the Google
Assistant and Actions on Google developer platform
team where I work specifically on smart home.
So controlling and automating your house
using different IoT devices through Google Assistant.
JESSICA DENE EARLY-CHA: Oh, that sounds like such a cool, cool
space to be in.
And so the only smart thing I really
know about and that I use everyday is my lights.
So can you go in more into detail about what's
happening there?
DAN MYERS: Absolutely.
So when you are developing any type of smart device
with Google Assistant, there's a specific flow
that you have to go through.
So when a user says a command or says a different phrase
to control their light, what's actually happening
there is the Google Home or Google Home
Mini is taking in the audio.
It sends this up to Google's cloud
for processing the natural language understanding engine.
At that point it actually goes to a partners cloud
for who that device is.
So for example, if it was a Philips Hue light bulb, right?
It would actually be going to the Philips cloud service
with a specific structure of JSON
that matches the intent of what the user said.
So if they said, "turn on my light,"
there's a specific structure in JSON
that is sent to Philips Hue servers.
And Philips then takes that and processes that information
and sends it back down to the light bulb.
So it's all done through Wi-Fi and internet connectivity.
JESSICA DENE EARLY-CHA: And that sounds awesome.
So what happens if I'm a developer,
and I have my own thing that I want
to connect my Google Assistant?
Is that possible?
DAN MYERS: It is.
It is.
So we have a variety of tools for developing
your own smart devices, both in Node.js and Java.
All of these different libraries come
with samples, come with tutorials on how to build it.
And so when developing for those,
we have a list of different device types
and a lot of different elements for this when developing.
JESSICA DENE EARLY-CHA: So I'm assuming
because you said "device types," does those device types mean
that there's different functionalities for each device
that's possible?
DAN MYERS: Yes.
So the device type itself defines what type of icon
might show up in different applications, things like that.
And then there's device traits.
And the device trait is what actually
is used to define the capabilities of that device.
So when you think of a smart light,
you could have a light bulb that can turn on and off.
You might have one that can dim.
You might also have one that can change colors.
And so-- or you could even have one that does all three.
Right?
And so each of those are defined in different traits
within the smart home library and given to Google
during the sync process.
JESSICA DENE EARLY-CHA: So if I'm a developer,
and I'm building my own, I'm doing my own thing,
do I have to worry about anything outside of just
the functionality and seeing the functionality?
Or do I still have to worry about how
users might ask for this?
Like, how to work with my device I've just made or connected to?
DAN MYERS: Right.
This is the beautiful part of Google Assistant
for smart home is that Google Assistant handles
that natural language understanding for you.
So as long as you have all of those capabilities defined,
Google Assistant is able to take that and apply
literally the infinite number of phrases
that people can say to control that capability.
So anything from "turn down the lights just a little bit,"
right, to, "make it 50% less bright in the room."
Right.
It's able to understand these different kinds of phrases
and be able to control it appropriately.
JESSICA DENE EARLY-CHA: Oh, that sounds great.
For me, that just means as a developer,
I can focus on my own thing and not
have to worry about all that.
Because that's a lot of overhead.
DAN MYERS: Absolutely.
And that's-- I mean, when you talk about NLU,
that's a whole other nut to crack.
JESSICA DENE EARLY-CHA: No, no.
Definitely.
So if I am--
I'm excited.
I'm watching this video.
What's the first thing I should do as a developer?
I want to get on-boarded.
Is there something I should go to first?
DAN MYERS: My approach would be to instantly go
to the code lab.
The code lab is a complete walkthrough
of every aspect from setting up your Google Cloud
project to setting up on the Actions
on Google console to setting up your Firestore.
Every aspect of developing a smart washing machine.
So you get to see exactly what goes into a process like that.
JESSICA DENE EARLY-CHA: That sounds awesome.
Well, thank you, Dan, so much for hanging out with me
and chatting with me.
I really appreciate it.
DAN MYERS: Thank you.
JESSICA DENE EARLY-CHA: Thanks.
If you liked today's show, please like the video.
If you have any comments or suggestions
on what we just learned about today
or what you want to learn about in the future,
please find the comments below.
And feel free to follow us on Twitter
for any updates and new videos.
I've been Jessica.
And chat with you next time.
[MUSIC PLAYING]