 Is that you? Oh, there it is. Yeah. So I should have prepped my slides before I didn't start wasting time. Do you have to go ahead and move already? Google, there we go. And I'm Mary, good. OK, so welcome to Google Home Automation with Drupal. My name is Matthew Winstow. I'm the co-founder and CEO of Co-Found Labs. And I've been doing stuff with Drupal for the better part of the last decade. Or I'll actually look at more now, which is really depressing to think about. OK, first morning. I'm going to be saying the words something Google a whole lot during this presentation. If your phone is set up to listen or respond to that, I'm going to be screwing with it. So if you want to turn your phone off, go ahead. But I will be using the OK Google keyword a whole lot. So morning number two. I think sassy robots are hilarious. So a lot of the air handling that I have with my presentation involves the robot being really sassy. So it's perfectly OK to laugh. It's perfectly OK to be maybe just a little bit insulted by it. So I've programmed some default responses here and there are a little sassy. So all right. So I'm going to cover a little bit about what the Google Assistant is and just need my how it works. How do we get the thing to show up there? Is there going to be a Google? I'm mirroring though. I'm going to just go back and forth. OK, so the Google Assistant. Who here doesn't know what it is? OK, everybody knows what it is. So I can skip that section. All right, so Google is the Google Assistant. It's basically a competitive Siri. And it's always this name. So this is what we call a Google Home, which is basically a physical representation of a Google Assistant. You can ask it questions. You can ask it to do things if you have some auto-mod animation stuff set up. If you can just play music. If you just want to use it as a speaker. It's pretty cool. So I got it because I wanted to control some lights in my house. I wanted to use the Google Play thing to connect to all my Chromecasts. I just, in general, wanted to live in the future, basically, where I had the Star Trek computer in my house. But after a certain point, I was like, man, I wish I could do a little bit more than that. And then being a developer, I was like, that's you. I could probably write some code. And as it turns out, I could. So what I've done is I've investigated some different ways to interact with it. And Google's recommended way is through this service called api.ai. And I'm just going to bring up this three minute introductory video. I don't know if Milano is going to play loud enough for you to hear it, but we'll see what happens. Welcome to api.ai. Over the next few minutes, I will show you how to get started with that platform. OK, that's clear. It's not going to work. All right, so I thought I'd go through the HTML. So what I'll say is if you're interested in playing with api.ai before you get started, really watch this video because it explains some really important concepts right off the bat, those being intense entities, contexts, what basically what actions are and agents are. So I'll put a link in the video to watch this. So I will let you guys watch that afterwards rather than me leaning into the speaker here. No, don't. There we go. OK, just leave my notes here. OK, so the most important thing about the api.ai thing, I'm really bad at this slide. I'm sorry. But anyway, so what I need, the most important thing when I was reading up on the documentation on how to actually interact with this thing was that all the docs assume that you actually know the terminology. Now, some of us may have encountered this before reading Drupal docs. So once you've mastered what they're talking about, the docs become a lot clearer. And unfortunately, there wasn't really a good intro thing other than that video, which sort of explains the basics. And then once I tink around for a bit, I sort of say, oh, OK, that's what you mean. That's literally an entity, so as you would sort of understand it. So take the time and watch it, and then read up on what it is. So the concepts we want to master are entities, intents, actions, contexts, and agents. It's a lot like Drupal. An entity is a thing that sort of stores stuff. It has structure. Intents are a little more unique to this. These are things you want it to do. Actions are basically reactions to what's actually happening in contexts. It's stuff about the conversation. So we'll explore that a little bit in a few minutes. It basically gives you, so you can have follow-up questions. So you can ask something, something, Google, what's the weather like today in Ottawa? And then I can follow up and say another question, being like, OK, what's the weather going to be like tomorrow? Because the context is set that I'm in Ottawa on the previous call. It knows when I just say, what's the weather like tomorrow? It doesn't need to ask you, where are you? And so it can imply that as part of the conversation. So, and I just want to zoom this in a bit, because it's really important slide. It's the only important slide. So when I was getting started with this, I tried to go a little too big. And my idea is, oh, I can get it to talk to this thing, and then make it turn around. And if I'm passing this geospatial fence thing, I can make it do blah, blah, blah, blah, blah. And it's just OK. You know what? Just start simple. Start with a very, very, very simple goal. Make sure, and we're getting into this one, let's be getting into the good idea at the.ai interface. Configure your defaults, because there's some default actions and default responses that you can make it do. Set up those first, because it'll teach you a little bit of how this thing is expected to work. And then once you've spent all that time and you've configured a thing and you've actually got it to do something, you'll never really learn how to do it right. So throw it all away and do it all over again. Because that's why I ended up doing it. Or if your stuff is perfect, I'll throw out the bad good free. So the other thing that I want to mention is, so API.ai is over here. It's a service that allows you to have a natural language conversation. But it's not specific just to the Google Assistant. Their API is that you talk to Alexa. You can talk to Slack. It's like a chatbot. You can integrate with Facebook Messenger for a reason. So it's a general interface, a general, devised, natural language interface that you can actually connect to various assistants. So the work you're doing is not limited to just Google. You can make Google-specific connections. But it's usable with other stuff. OK, so let's do a little off here. Let's go here. API.ai, do a console. All right, so let's create a new agent pretend I've never done this before. So when you first set this up, your agent name is essentially the name of your project. So what you want it to do. Let's make this my video game lookup tool. Game lookup. You can adjust and cannot canane white spaces. I've just done that for me, Google. Last time I presented the internet, it was not playing nice with me. Hey, all right, so there you go. I have officially created something that can talk to Google Home. I have nothing else to do. You're done. Drop mic and walk away. So this is what I was talking about with your seven defaults. So when you create a new project, the first intense that you get, the actions you can ask it to do are the two default ones that come with it. So a fallback event. This is when you've asked Siri to do something, and then she's like, I don't know what you're talking about. So that's what the fallback event is. It doesn't know what you asked it. And so this is what it will say as a reaction to that. So it says, I can get back and say it again. Sorry, I'm a little loud. So it gives you a whole bunch of things. So you can set this up so that when you ask it a question, it doesn't know what to do, and it'll actually give you a response. Come on, intense. There we go. And then there's the default welcome intent. So sometimes, for those who are here when the game started, you can say, OK, let's play a game. It'll have a big introductory, sort of like, sort of explaining the rules, explaining what's about to happen. Not all actions require this sort of welcome message, but more complicated ones can sort of guide you to this, which you can say next, or how to direct the conversation to the next intent or to the next desired action. So let's create a basic intent here. Let's plus. OK, so I'm going to say, what's your favorite game? All right? Don't really need any actions. Now I'm going to give it a response. So let's say I want to save my favorite game. It's Super Mario Bros. OK, hit Save. It does its machine learning, whatever stuff. And then so now I can try it and say, what's your favorite game? My favorite game is Super Mario Brothers. Yay, maybe that works. So this is the most basic intent. So you can have a fixed question and a fixed response. You can have different, the more things you give it, as far as what the user says, the smarter it can be to sort of pick up on variations on that sentence. Like I think, let's find out if this works. What game is your favorite? My favorite game is Super Mario Bros. Yeah, so you can see the natural language thing is actually, it's learning, it's picking up on basically, it knows that I don't have to say exactly that. It sort of figures that out. And that's an important concept for later when we actually have it start talking to Drupal. OK, so the next thing we want to look at are what we call entities. And for anybody who has used Drupal, everybody here's a Drupal dev, played with Drupal, knows when an entity is in Drupal 7. Yes? OK. So basically, you're creating entities. So I can be like, yeah, this is a video game. Is this going to complain about spaces? Yes, it is going to get too easy. So we have our entity type, or bundle, as it were. And then you can add a specific one. So you can have Super Mario. And then you can give it, the nice thing is you can actually give it similar names. So you can say Mario Bros. Yes, I'm aware of those are two very different games. So we're not going to get into the little minutiae right now. We're going to say, Super Nintendo Bros. Because I've heard parents misname things sometimes. And then you can do other stuff like Tetris, payload, there you go. Contra, there you go. Contra, and we'll put in a Super C. So I've created an entity. And it's a big one. So now if I go back to my intents, what's your favorite game? So now what I can do is, so where the word game is, I can actually turn this into sort of like a variable. So if I highlight it, I can choose video game. So now this is an argument. And then you can have actions. And then you can actually have the response. You can reference values. So instead of saying Super Mario as all the time, I can get, say, dollar sign video game. So let's just change this to my favorite game. Do you like game? So if I save this and I ask it, I forget what I told you. I was not to ask it. OK. Do you like Halo? Halo is my favorite. So now I have a really digital parrot, basically. I have to just agree with you all the time. You always want to play the same game. It's fantastic. All right. So that's how I did these work. Next, we're going to look at, let's see here. So just a recap. So your agent is basically your project. The intents are the things you want to tell it to respond to when you ask it to do stuff. Your entities are things that you're describing. So the really common one is, OK, they have music as a thing. So then song is a type of sub entity and that sort of stuff. And I don't feel noticed down here. So you can see the parameters Halo. But if I set up an action here, which is just a selected game, and I hit Save again, and I'm going to ask you, OK, do you like Halo? Halo is my favorite. All right. So you can see the next action that would have triggered is selected game. And why that's important is we can actually set up contexts and review game on the iPad. So if I wanted to write a follow up question, when this finishes talking, the video game that we were talking about is still active. And it could basically fall into the next intent. So what we're doing, we're going to create a follow up intent for this. So I'm going to go back to my intents page. I'm going to do add follow up intent. Let's try the yes one. So you can see here, OK, Miami's, I guess yes, doesn't really make much sense in this case. So as the content, you can see here, this intent will only run if video game is in the active context. So as a user, I can't trigger this intent directly. I have to go through the first one first to load up what game you're talking about, and I can have a follow up conversation being like, I'm just going to create a custom one. Because yeah, OK, this is a lot. It makes a lot more sense for me, actually. When was that released? Hmm? When was that released? Sure. Then I got a building release date, so I said, look it up. No. For Halo? No, I knew. OK, so let's try this. I'm just going to sit down and learning. OK, good. Do you like Halo? Nope, I have to hit the button first. Do you like Halo? Load is my favorite. All right, now you can see the active context that we have this video game. And then if I say, when was it released? That's technically correct. As they say, assassin answers, assassin robots. So if I clear the reset context, and I say, when was it released? You can see it used one of the failure. I missed that. I missed that. So it used one of the failure intents that we saw, because it doesn't know what the hell I'm talking about. It's all over the game. So that covers your agent. That covers your intents, covers your entities, and covers your contexts. Now we're going to get into the, I guess, the fulfillment part. And this is where Drupal comes in. So all of these things are all being processed globally. But you have the option to use a webbook to actually fulfill answers. So this can either use a webbook to fill in the context, or it can just be straight up send it the data, and then whatever response you get back, it'll read it out. But the webbook part is what allows you to, this is what let's me tie Drupal into things. Let me go back to my slides real quick. I had a whole demo that I was going to do. Well, I did the other instead. OK, so Drupal fits into this to Drupal. All right. Drupal fits into this by using a couple of modules. So Mixed Brown has this module for that. There's the chatbot API module. Let's go, Drupal, chatbot API. Someone was so kind to write for me. This was released, I think, like three days after I decided to do this presentation earlier in the summer. So I was like, hey, you did my work for me. So what it is, it's a generalized API that actually allows Drupal to have a webbook callback location that it'll parse the JSON payload. And by default, it supports the Alexa API and it supports the API.AI callbacks as well. He's done a lot of work. You can actually create some plugins. The Drupal console thing does some stuff. He's got some sort of basic views integration. So you can actually have it spit back a list of things. So you can ask it how many views are in this list, and then it'll spit it back out. By the most basic, there's four sites using it. I'm one of them. So this is how we use it. So it's all Drupal 8. You can just as easily do this in 7. It's literally just a JSON payload that you need to parse. So the services module can do this just as well. So why did I use Drupal? Because I know Drupal and there's a module. But like I said, it's just JSON. It's just where you can write it with a raw PHP. You can do whatever you want. I just use Drupal because I know it. OK, let's go to the documentation here. That's right. We're going to RTFM in real time. The other reason I actually chose to use it is because I actually wrote down how to use it, which is a little rare in the Drupalverse when it comes to brand spanking new modules. I guess it is. He wrote down for his own use and decided to share with the world. So there's this custom intent page. And this is where I started. The default ones were, you know, they were, but I wanted to get into writing some custom stuff right off the bat. All the instructions are right here. They're linked to in the presentation. I won't go over all the minutiae about how to set this up, but I will cover the important bits when we get to the terminal. So it's nicely documented. And I'm planning on actually contributing some updated examples just for a place where I got lost. OK, live coding time. That's where it's all going to go to hell. All right. So, we got to my terminal. I already have my HTML and barbecue. There's going to be some stuff. So the way you actually generate a plugin for this thing, once you have it installed in your Drupal 8 site, you wrote actually a Drupal console plugin. So it'll literally walk you through once you can see it, generating a new plugin so you can have a new callback created. So you just enter the name of the module you want it to go into. So I'm going to put barbecue monitor, because that's the thing I want to respond. You've got a class name, so BBQMonitor, sample. Get sample demos a little redundant. Enter the intense, label, or short description. I don't have a sample demo. OK, so here's where it's important. This is what I did not get the first time. So this thing here, that the value you're about to enter in, has to be the same name you gave your actual agent. You guys can bear to do that. So basically, if I wanted to link this up, I need to type in video. That's what I'm going to look up as my, or no, no. No, forget everything I just said. It's the intent. The intent name has to be what you're putting in, because each intent is a plugin, as part of the API. So I need to type in what's your favorite game. So that question mark is going to cause me some problems. And so is this. Save. So this needs to be what you put into that field, because this will map this plugin to that particular intent, and that's how the webhook is going to work. OK? Yes, I want to confirm. Yeah, all right. And then it created me a file here, which I will open up for your viewing pleasure. Shut up a button, you know. If anybody's going to give me an accident, add it to your button. OK, so it uses an int name space to use this, blah, blah. And it sets you up with this barbecue. One of the sample demo extends this. And then here's the response function. So you set your intent response, which in this case is how it works. So I'm just going to change it to here where Drew pulled a little north. The display card, I actually don't know what this does. I always just set the value to the same thing. It seems like you can give it variations, I guess. Usually it just reads the first intent response, though, so. All right. And if you remember earlier, the whole naming of the stuff. So my favorite part of Drupal 8 is, OK, so we have these annotations above this class function. And you can see here the intent ID is actually been put in there. So that's why it's important to actually get the same name that you have in the intent to make that AI as you do inside of Drupal, because this is how it does the mapping to that function. So if you love annotations, good for you. All right. So exit that. And if I go back to here, and I'm going to enable fulfillment with the webhook speed s. Oh, that's another thing. Has to be SSL. So whatever it's talking to, it has to be valid SSL certificate. So if you use let's and correct or something like that to get yourself a valid cert, I would give you .cfms.ca slash, oh my god, I don't remember. But I have it set up on that other thing. So give me two seconds here. Also finding this URL in their document, it was nowhere. So I had to actually go look through the code, figure out. So if there's anything I'm going to add to there, it's that freaking callback URL. Basic auth, we need to copy it. I think it's demo. Sure. Now we'll find out. Headers, it's applicant content, dash type, application, slash JSON. You have to do it. And you want to enable it for all hit save. OK. If that typed in the wrong password here, then we will find out in a second. So I'm going to go back to my intent. I'm going to go back to what's your favorite game. I'm going to update the fulfillment. I'm going to say use the webhook. Kind of hit save. And it shouldn't, if it actually reaches the site, whatever I ask it, it should actually spit out hello, jubilant, if the authentication works. Otherwise, it should give me a failure callback. So what's your favorite game? Yeah, OK, so that password was wrong. Anyways, so as you can see here, once I've connected to the webhook, I'm using the webhook for fulfillment. So instead of actually going through this workflow here, it's going to ask Drupal instead and come back. So that's the basics on how to set up a first intent, I guess, as it were. So one other question that I thought people might ask is why not just use if this and that? Everybody here familiar with IFTTT? OK, so why not? You're dependent on a third party service. So you got that. Two, I really wanted to customize the workflows. And I couldn't do all of the customizations I really wanted to do with IFTTT. Some manufacturers, like for instance, the Lightbulbs I have at home, don't work with IFTTT directly because TP-Link doesn't want their Lightbulbs to work with. I don't know. So I've sort of reversed engineered some of the web calls it needs to do now to Drupal to talk to it. But IFTTT is much better for sharing with those. So if you do know it and do want to use it, I highly recommend it works very well. Yeah, OK. So let's get to some demos that I actually wrote that actually work. Let's switch to barbecue. So I'm a big fan of cooking. It was actually what I was going to do instead of going to computer science until I saw how much it costs to go to culinary school. So then I got a practical degree, apparently. So what I've done is my Drupal site. So what I've done is I've set up a Drupal site where I'm storing information about recipes that I like, but also about certain ingredients that I like using on the barbecue. I've also stored some information about barbecues themselves. So the Drupal entities you see here, they sort of map to the entities I have set up on the API AI site. So I've set up various meats in a taxonomy. So I've got chicken, beef, beef brisket, pork, a lot of that sort of thing. I've set up some barbecue grills. So different types of things you want to cook on the barbecue are much easier, much better to do on certain types of grills. And in the content section, I've created a couple of recipes that are linked to the type of meat you would want to use and the type of barbecue you want to use, the type of temperatures you would want to hit, the cooking temperature, the instructions, and a brief description. So the angle being so that if I want to cook something and I can't make up my mind, and my wife gives me the stock answer, it's like, well, I don't care. You just pick something. I can just be like, all right, fine. Google can decide. And then I just ask it. And then everybody's happy, or everybody's unhappy, depending on what it chooses. So I'm going to go back to here. And I've enabled the integrations with Google Assistant. You can see here. There's some nuance with that. So for you to publish any of this stuff publicly, it actually has to get approved by Google, because it goes into their store of things that you can actually get it to do. So if I do want this to work globally, I actually have to set up the site to allow, I guess, other users somehow. I haven't got to that yet. But it does have a test mode. So I'm going to turn on the test mode and say, OK, I'm in test mode. Let's go. And here's the test simulator. So one thing to note, if you buy this in Canada, or if you win this one, the language that you have here in the test application, CLS is English-BUS, this debug mode only works if you're US English or UK English. For some reason, it doesn't understand Canadian English. So I had to switch it to the angrier Google lady, I guess, as it were. They get very subtle tone differences in them. So the first thing, and it's connected to this, so I should be able to just talk to the Google home that's actually here, but I have to trigger test mode. So here's where your phones lose their minds if you didn't follow the warning at the beginning. OK, Google, talk to my test app. Since I couldn't verify your voice just now, I can't connect you to my test app at the moment. You can either give it another try, or go to the Google home app and retrain the voice model. OK, Google, talk to my test app. Here's the test version of my test app. It's grillin' time. What do you want to cook? Say that again. Hold on. Sorry, can you say that again? OK, what's the best temperature to cook pork tenderloin to? A pork tenderloin is typically cooked to a minimum of 54 degrees Celsius. All right. So if we go back to my Drupal site, you can see. Sorry, could you say that again? Yeah, OK. If you go back to my Drupal site, you can see here in taxonomy, under meat. And then under pork, I have pork tenderloin. And I've programmed in target temperature of 54 degrees Celsius. So she went. She did the mapping from the entity that I have named tie.ai and mapped it to here. So let me show you how that works. Do you guys still hear me? Or do I have to turn the mic back on? You're not being recorded with the mic on. I think you're. No, yeah, this thing right here. Oh, thank you. OK, so if I go to my entities, you can see a barbecue grill and I have meat. And inside of meat, I have all of these examples. So you can see here I have pork tenderloin. And I also have a few sort of variations on it. So if I ask it what temperature should I cook a pork medallion to, it'll actually, when it makes the API called a Drupal, it's not going to use the synonym value. It's going to use the actual defined name values for pork tenderloin. So and that's important because in the code that actually runs on the Drupal site, let me just open up a Q-Marver. Nope. Which one is it? Target temperature. There we go. If I scroll down. So when it receives the request, I get this intense loss. So this is the variable that the context that's been set when I ask it the question, that gets past the Drupal. And it does a taxonomy term load on the name of the meat that I just asked about. So it goes, gets the root meat type entity from APIDI. It happens to match the actual name inside of Drupal. I check to see if it's actually a rare. I actually got something. And then I put a message through the t function here because you should consider internationalization. And it has the whole sentence here. It sets the intent response, sets the intent card. And then the chatbot API takes care of returning the response back to Google or to the APIDI stuff, which then talks to Google. So if I do another test here. OK, Google, talk to my test app. All right, let's get the test version of my test app. It's grillin' time. What temperature should I cook brisket to? What kind of meat are you cooking? Shouldn't get that one. OK, let's try it again. OK. OK, Google, talk to my test app. Sure, let's get the test version of my test app. It's grillin' time. There's actually more responses to that, but she doesn't like it. What can I make with brisket? You can make root beer brisket. This braised brisket recipe swaps the slow cooker for the barbecue. It's sweet and spicy at the same time. And you can use smaller, leaner cuts of brisket and get a great result. Still takes a while to make, but about half as long as a normal smoked brisket. This recipe comes from bakedbree.com. OK, I got a little wordy on that one. So the way that worked, you know I just said the word brisket. But if I go back to my Drupal site, which I didn't get that. OK, all right, I get it. I get it, I get it. Sassy robots. No, yep, OK. You notice in here it's actually called beef brisket, which is subtle difference, but it's still a very important difference when you're talking about machines. So when it asks the question through here, actually I'll do it through here. What can I make with brisket? OK, so there it is. So you can see here in the context you have meat and the value turned into beef brisket rather than just the word brisket that I actually asked it. So this context value gets sent up to Drupal through this JSON object. And then here's the fulfillment response that came back from the webhook call. So yeah, any questions so far? So is there any way to manage those synons actually from the Drupal site? Not that I've found, but I'm sure there is. I'm still really new to that. I had two presentations suggested for today. And then this was the other one that I thought about doing. And then Pat's like, no, do your other one instead. I said, OK. So I'm only like two months into playing with Google stuff. But I'm sure there must be some sort of like there's, you don't actually have to do everything through this UI. You can actually download like a copy of this configuration and then start playing with it in code. There are libraries for all sorts of different languages. And I'm sure in there there's got to be something that they can do it. There's also this training thing. I don't know what it does. And analytics, I also don't know what it does either. Presumably something to do with analytics. Yeah, so if I go back to my Drupal site, I'm going to show you the, so that recipe select intent is a little more complicated than just the straight up ask me for a taxonomy term. Because I mean, that one's kind of easy. Send it this text value, have it match taxonomy term, and spit back what was in the actual, one of the taxonomy term fields. The pick in a recipe one is a little bit more complicated but not that much recipe. So in the process function, I have the request, I get the meat value, I do the thing, I do the logo, blah, blah, blah, that sort of thing. And then I actually call views get view result. So what I did on the Drupal site is I set up a view that just with the, I don't know why I'm telling you about it, I could show it to you. Let's do that instead. Back to here, structure, going back to views. And I have where did it go? Recipe, there it is. So the view actually just, it takes the taxonomy term ID, the meat type as a contextual argument. It grabs me any published content of type barbecue recipe and it randomizes the order and then it spits back exactly one value. So when I ask Google, give me a recipe or whatever, it pings Drupal, Drupal randomly picks a recipe and then delivers that to me so I have something to do. Which is pretty neat. And that's part of the reason why I wanted to use Drupal because I can build these more complicated workflows and reactions and things in Drupal, keep the conversations and the entities and all that kind of stuff inside of the api.ai stuff, pretty simple, but still do some really, some more advanced stuff. Yeah, like for instance, one of the things I wanted to do is if I ask it what can I make with this meat on this grill, I have a second contextual filter, which is the barbecue type. So it can give me a sort of optimized type of cook, like I said, I'm just using a camping stove. Don't tell me to cook a beef brisket for 12 hours. I'm not gonna be able to make that. So I can add some extra stuff in here to try and make things a little bit smarter. So the other thing that I did with it, I'm not gonna demo because I didn't get time to finish the hardware required for it. That's right, hardware. Let's see here is my Drupal side again. So at home, I actually have a barbecue thermometer. That is RF and it monitors every 12 seconds. It'll report back to this other barbecue monitor that attracts the temperature of the barbecue and the temperature of the meat. And what I wanted to do is pick up that signal using an Arduino and then with a little RF receiver and then have it make a webhook request to the Drupal site and then register the temperature of the meat at that time. And I do that with the message API. So I'm gonna add in a message here and say, let's say the barbecue temp is at 350. No, not Celsius, that's too hot, 175. Food temp is at 62 and great. And then I get a message constant, the barbecue is currently set to 170 degrees. See the food is at 62. And now if I go to latest reading, which is another view, it stores the time stamp, the barbecue temperature and the food temp in that reading. So this view gets called by another intent that I have on a different account. And so I could continually sit in my living room and say, okay, Google, what's the temperature of the barbecue? And it would tell me. Are you? Yeah, okay. Yeah, don't do that. Or I could ask you what temperature the food is at. And then the other thing I wanted to be able to do is have temperature trends. So I have a chart on the website. I could track to see if my barbecue temperature's doing this. Well, it's like nice and level, so I haven't ruined the food. And then also be able to just ask Google, let him get up and go do it. Lazy, but it's fine. Yeah, so those are the two active projects I'm sort of doing with Google right now. So some other ideas I've had, now that I've sort of unlocked the power of Drupal to work with my API.ai stuff, I wanted to link in some other services. Like I said, that my light bulbs aren't supported by TTT, so I'm just gonna make Drupal talk to them because they're all IP based. I bought a Grad door opener that runs its own little web server that if you just ping it, it'll actually open and close the door. So I want to make it do through the thing, through Drupal, through the whatever. Some Raspberry Pi stuff, I don't know, Dave will probably end up doing those ones for me. I want to try and learn a little bit more about some more advanced conversations to have more involved, use the intense in context to have more, I don't know, just want to get better at it. One thing I really wanted to do it for today, but I just couldn't get it to work in time, was to be able to ask, okay, what's the status report for my website? So I could just say, okay, Google, how's Drupal doing? And then it would be able to respond saying, oh, you have like three warnings on your status page, you should go have a look at it. The graph's door state. And the eventual goal, like the demo we were doing this earlier is, I have like four or 500 old video games sitting in my basement. I have the burden of choice now. So I want to be able to just say, hey, it's just like with the recipes, we'll be able to ask you, okay, what game can I play? There's two of us, I want to play a racing game, and you just sort of pick something for me. So it's really just to offload some brain power and just have the internet decide things for me. You know, what the hell? Why not? So the next big thing though that I want to write for that chatbot API, as far as code improvements go is integration with rules. I really think that having like a rules event where the web hook gets triggered have the conditions to actually check to see if the intent or the entity parameters have set up right and do some checks and then have reactions where I can, it can decide like what to do in like, basically use rules, you know, if anybody hears use rules before, you can do a lot of business logic-y sort of stuff. And I would really, I really think that would be really neat to sort of like sort of do what the IFTTT stuff does, but like really advanced inside of Drupal. Also be really nice if we could set up some of this logic through the UI right now to go through Drupal console. The other thing that I'd like to do is try some other chatbots. Like as you saw here through the API interface, you can actually try it there through the actions for Google. Like I can just type in, you know, here in my hands down. Okay, here's the test version of my test app. It's grillin' time. Yeah, so anyways, because you can do, I don't know what she, the other day she was picking random, like it's starting things all over the time and now she's just picking the same stupid one through. Much funnier ones. So to actually integrate it so that I don't have to necessarily like talk out loud to Google, I could just like send a message to like when they eventually release the stupid Google Assistant here in Canada, iOS, or type the Slack or type the Facebook Messenger or something like that. And the advantage is with API.AI, all you have to do is go to the integrations page and then just choose the one you want to turn on and then enable it. So you can see there's a lot of stuff here that's available for you to sort of integrate this thing with. That's what I mean by the SDKs, by the way, there's a lot of them back here. So that's the sum total of my presentation. Super impractical, but thank you for coming anyways. You got any questions, you can answer them now. My lingual. Actually, it doesn't really care what language it is other than like I said, this test app stuff won't work in anything but, okay fine, English, Australia. Really, you like the Australian English? You don't like ours? Come on, man. So debugging it, you'd probably have to do it in English but like we did in the Drupal side, we actually wrapped the responses in the t-function so you actually get a French response if you want. Because there's other data in this query, right here it says locale, English US. You could just check the locale on the request end and spit back out the right language so that you could actually have it work. So that language is for speech attacks but can this be any kind of language? So this thing will understand French, Canadian, English, Canadian, English basically anywhere but it can only operate in one language at a time so when you set it up on your phone, you have to tell it what language you actually want it to listen on. So you can't just like have an Orleans, French conversation with it where you're going back and forth from English to French. But the request data, I haven't tried it in French so I don't know if it's going to translate it back to the source language or not but I guess you guys can let me know and then see what happens there. But I definitely know you do get the locale and you can customize your responses based off of that. I just didn't take the time to do it. Yep, yep. So how do you like, is there a way to get around using the test interface or are you stuck using the test interface for like about two hours and you want the world to know you better? That is research for next week. Yeah, I'm pretty like, because if I go here, if I go back to the settings and I say update draft, it says you've updated your actions, blah, blah, the current API configuration, visit the console to finish things. So I hit visit console, it brings it here. I have to give it a name, the actions added. I have to give some information, the location targeting and a bunch of other stuff and then I have to submit the draft review. I don't know what that's gonna do yet. So I'm just gonna try it and see if people says yes or no. And then find out. So like if I do have to run the site so that it's global for everyone, well, you know, I build web applications for a living. So I probably set it up so it works. But yeah, so if you can't do that, it's only for personal projects that would kind of, it's not for personal projects, it kind of suck. But I'm still curious to see if I can get it to go. So there can be multiple context active at a given point. So the natural language then can figure out whether I'm talking about it or he and distinguish which context I might be referring to. Yeah, and that's one of the things I wanna get better at, but I can show you here, but do the recipe select. So you see how there's a counter? And I think so each context has what's called a lifespan. So it'll daisy chain into a further context up to five times. So after a certain point, it just gets, I think the decision tree just gets too complicated or too CPU intensive for it to figure out what the hell you're talking about. So, but you can have, as far as I can tell, there's no limit on the context, the amount of context you can have between one ball truth or the other, but there is a limited lifespan. The other thing you can do, and I forgot to mention, at the bottom here, here we go. You can actually have specifically to Google, because I enabled it, you can actually have it and the conversation right there. So this intent is meant to like finish it. It's like you're just done, forget about what we're talking, don't try and pass it through, just end the conversation there and walk away. So, yeah, Mike, do you have a question? Yeah, I just have a question for the patient. So Mike, are we gonna be telling him if my food is ready or if I work for you? Not as far as I know, but there are plenty of other things that I didn't. Yeah, it's always initiated by the user. Yeah, I'd have to ask it, because if you think about if they had push notifications on it, like, you know, you'd have ads being pushed in your living room, I would imagine. It would kind of be annoying, because like I could have, like there's, that's a whole can of worms that I think Google might. Yeah, maybe, I don't know, I haven't found anything about push to those things. I think that might be on purpose. But, no, I mean, if I wanted to like push a thing to my phone, I could probably just use push over or something like that, just say, hey, I'm done. Don't, it's on fire or something like that. That's the rules. Exactly, like, if the temperature reaches this temperature for the love of God, do something. Exactly. Yeah. Any other questions? Yeah, yeah. Is that hard work, I think, or could you send me an API just like a web file? Well, whatever integrations you want, it'll talk to you. So that webhook data, that webhook payload is not Google specific. So if you wanted to talk to Twitter, you can somehow get it to talk to you. You can use the Twitter API to talk to the JSON thing. Am I understanding a question right in my, yeah? Yeah, okay, yeah. So it doesn't have to be Google. It can be Alexa, it can be whatever you want it to do. I think Alexa's a new course. Or Cortana, there it is, and Alexa, there you go. I think what's gonna be the stack having all of that moving in from a huge asset and then being able to ask? Yeah, well, see, and what's nice is on the Drupal side, you don't care what they're talking to you through, right, you're just getting a webhook and you give it back an answer and then you're done. You might be able to tell which one you're talking to in case you want to adjust your answers because of it. I haven't looked to see if that's in the payload or not. But yeah, you could set it up and then you could have it work with Alexa and Cortana and Google just as well altogether, which is really why this API I think is really neat. So, anything else? Nothing, even after the game? Yeah, no questions, no, you're good. Okay, well, anyways, thanks for your, thanks for listening, thanks for sticking around and I guess we'll see some of you at the after party, which by the way is today, not tomorrow. What? Yeah, well, there's another thing tomorrow, but like the thing at the golf place and like the escape room, whatever it's tonight, I thought it was tomorrow, I might have been the only one who thought it was tomorrow, but it's apparently tonight, so thank you.