 OK, we're good to go. Hello, everyone. Oh, come on. It's early, I know. Hello, everyone. There we go. I thought I was going to have to tell one of my famous developer jokes, then. Do you want to hear it anyway? All right. All right, let's go with this one. How do you come for the JavaScript bug? You can solve it. That's what happens if you don't give me a big hello. I tell you awesome developer jokes, and I have an entire list, so be warned. So I am Stephen Cooper, also known as Developer Steve on loads of social media networks, even on Weibo, which is Chinese Facebook, for those that don't know it. I'm the developer advocate for PayPal and Braintree. May have heard of those two companies. Do a quick introduction with them. And thank you. Awesome turnout. Thank you for coming down to see IoT commerce. And I do have a Drupal commerce module that I've built and will be releasing. Well, it's already on my GitHub, but I'll get to that in a little bit. So two companies that I'm from may have heard of this one. It's been around a little while. PayPal. Of course, everyone's got a PayPal account. Almost everyone has a PayPal account. Some amazing APIs. We've got loads and loads of APIs. Everything right through from basic transactions, right through to chain payments, and some really cool stuff. A company you may not be so familiar with. Everyone heard of Braintree? Yay. It's getting traction here. So Braintree is really cool. It's built by developers for developers. And it lets you take PayPal, credit card, now Apple Pay as well, when that launch is in Australia. All in one little easy integration. It's like 12 lines of code. It's all secure. No credit cards are stored on developers' websites. Everything's stored on Braintree's side. You get a token back. It's really cool. It's the easiest demo I do in a minute 20 in front of loads of people. So heaps cool. And of course, last year, we also announced partnerships to do Bitcoin. Really exciting. So Bitcoin's coming. Yay, Bitcoin. Everyone loves Bitcoin. But today, I'm going to talk to you about something I really love, Internet of Things. And as a full-stack developer, Internet of Things basically allows me to take my digital world and move it offline and allow users to break it in whole new ways. But it also allows me to build some really cool interfaces. And particularly in e-commerce space, it allows me to build some really good interfaces and ways to interact with users in, quote, the real world. But to understand where we've come from, to understand where we are, we need to understand where we came from. And for the most part, and I know it's kind of debated a little bit, but the most part, the internet began here. So in 1969, when two computers were connected, host to host for the first time, yeah, they spawned the internet. And it's a fun place. As we know, we live it, we work it. We do everything inside this digital universe. So the internet, in effect, has become the world that we reshape as we see fit. As long as we can create it, as long as we can think it, we can build it inside the internet. And we've gone into whole new ways recently with the whole virtual reality and virtual worlds that we're creating. But we've hit on a limitation. So the internet's become our digital universe. But just like Alice, there's a screen in the way. There's a barrier between us being able to physically be part of this digital world. And we really want to be part of our digital world because it's our world. And we reshape it as we see fit. Mobile's been a great way for us to make the internet mobile. But again, there's limitations between us and our world. And augmented reality, which I absolutely love, like it's the geekiest thing ever, is a great way for us to interact with that. But it becomes a window into a world we can't touch. We can't feel. We can't be fully part of or immersed into it. Ooh, there's a dropout on the mic. And of course, virtual reality. So this is metaspace. It's similar to some of the other augmented reality experiences we've seen. Only that it has basically like an elite motion or sensors in the very top part of the device. So you can reach in and touch and sort of interact with what you can see through the glasses. But again, we can't fully feel or be immersed into that world because you can't feel anything. It's digital. You can see it, but your brain's going, there's nothing there. I can't touch it. Anyone here used Oculus Rift and some of their headsets? Yeah? Yeah. First thing you do when you put that on, like you do the roller coaster or some of the basic demos, your brain's going, wow, we're going really fast. And your legs go, no, we're not. Because you can't fully be immersed into that. So welcome to the Internet of Things. The Internet of Things is a fun place. You took the red pill, right? And so here's some examples of some of the cool stuff we've seen coming out of the Internet of Things recently. And I absolutely love this. When I saw this one, I was like, please, take my money. This is the Nixie. So the Nixie was recently demoed at CES. So the Nixie came out of an IBM Intel hackathon about a year ago. It was one of 20 finalized projects. It started off as a pair of glasses, you can tell, right? Ended up as a wearable drone watch. So you literally wear it like a watch, unstrap it, you throw it out, and it follows you. So it's constantly taking, it's the ultimate selfie stick. It's constantly taking pictures, constantly taking video. You can control it from your phone so you can detach it from you and have it sort of fly around wherever. Oh, there was another slide I know we put in there. But recently, I kind of had a thought about this. And everyone's really interested in this. At CES, there was a load of noise being made about it. Ever remember five years ago when conferences, everyone had their smartphones out, and there was pictures of entire audiences doing this and just a sea of screens? We're going to have swarms of little Nixies flying like everywhere at conferences. It's going to get crazy. We're going to end up having no fly zones around stages. It's totally going to be a thing. And drone wars, that's a whole other thing. Conference drone wars, there'll be casualties, no. Brad the toaster, now extras, I've got a load of swag. I have an entire bag of swag here because evangelist, advocate, that's what we do. 45 kilos of luggage and 20 of its swag. Anyone that can tell me where this is from as I go through it, but this is Brad the toaster. So Brad will do everything he can to get you, or it can, to get you to have toast. It'll wiggle its little handle, it'll vibrate across the desk. If you ignore it long enough, it will actually contact other brads in the area to find out how often their owners have toast. If you still keep ignoring it, it will actually contact the postal service and get it delivered to a new owner. Anyone know what show that's from? Yes? Yeah, come see me after. I've got special swag for you. I never put that slide in because it's a bit of a cult show and, yeah, anyway. Yay! So this one, sorry. They did, but everyone loves Brad. So this is something really cool. I found this, I love going to maker spaces. You never know what you're gonna find. I went to the one at the Foot Screen Maker Lab about a month ago and there was a full-size mech sitting there on the floor and I was like, wow, okay, sure. There's a full-size robotic mech. But yeah, they found this in Singapore. So Maker Space in Singapore teaches students how to make smart tables. Now that's just an off-the-shelf IKEA, I'm not gonna try and pronounce the name of it, but that's just an off-the-shelf IKEA table you buy for like $60 with Arduino's built into it so that you put advertising material on the table and as people take the material off, it knows how many it has left. Send you an alert to tell you it's getting low. Not only that, you lift it up off the floor and an alarm goes and it tells you, hey, I've been picked up, someone's taking me, help. But yeah, great way to teach students how to build something that they can expand, build on, like create whole new things, whole new internet of things is gonna spawn from just something so basic, so simple. And so the opportunities are endless. By 2020, 50 billion IoT devices on the planet. Think about what that's gonna be built into like around us. These things are gonna know more about us than we know about ourselves. It's basically going to be 26 smart objects for every person on this planet. So these things are going to be everywhere. They're going to be in fridges, in brad the toasters, in Nixie's, in cars, well, CES this year, we saw a load of new internet of car things sort of exploding and being able to swipe and interact with your car in whole new ways which is gonna look weird in traffic. And one thing I guess developers are starting to realize is you don't know whether you're going to be interacting with a fridge, a brad, a Nixie, a person, or people are going to be trolled by their fridges in whole new ways. And so e-commerce, which has been absolutely massive until now, like in Australia, the numbers are huge for e-commerce usage. Interacting with internet of things or IoT commerce, as I like to call it, it's whole new opportunities, like whole new ways that users can be interacting with things. And so here's some ways that my team's been building payments into IoT, instead of playing. So this colleague in Spain, IoT Candy Dispenser, which is really cool. I should really speed this video up, though. It's a little bit long. So essentially this has a Spark Core built into it, tiny little computer, it's about, what are they, about $60, $70 to buy here. Responsive app, of course, gotta have responsive, everyone's mobile these days. Window into the internet. That's the V0 integration right there. So you can put in credit card, you can use PayPal. And he's actually integrated Twitter as well, so you can put in your Twitter name. No, now no one copied on that credit card. That's our secret developer credit card. It has unlimited credit. Candy will come out. It's a pretty sweet machine. Aha, that wasn't what I prepared earlier. And then it will actually send you a tweet. Go to the next slide. Yeah, there we go. So colleague in Brazil, I haven't got the specs on this one yet. But basically it has a Raspberry Pi and a Arduino built into the remote control car. And you use an app they build on Android, iOS, to rent the radio controlled equipment. So you can actually drive the rent, pay, plug in with your PayPal, do a transaction and be able to drive it around, be able to, yeah, it would work for just about anything. You could build that into drones, Nixie's, Brad the Toasters. Yeah, really cool. And so something that I've now taken through, what's been through, seven countries down here, so I couldn't get any higher. I've taken an Arduino yarn and a thermal printer and credit, okay, magic word. Open sesame, I hope there's toys in there. So yeah, I've taken Arduino yarn and a thermal printer, $120 off the shelf, 99 cents for the high quality box, and built a e-commerce printer so that you can take an order on a website, in this case, Drupal Commerce, woohoo. And as soon as an order comes through, a receipt prints out. So for cafes, this means that they could have little box sitting on the shelf somewhere in the kitchen or where they do their order processing. Receipt prints out, okay, sure. See, internet of things, woohoo. Yeah, so as soon as you get an order through, receipt prints out, wow, is this room possessed? Is that Brad the Toaster trying to tell me what's toast? If it catches fire, I'm out of here. Yeah, so as soon as an order comes through, receipt prints out and they can fulfill the order, like really, really simple, really quick off the shelf. So how that's built? I have, there's two components. There's the website side of things, HTML, JS, and PHP, of course, well, in this case, it's Drupal. API, I'm using client token to generate that funky little box that you saw load with the PayPal credit card and I'm doing a transaction, of course. Hardware side, I've got PHP and a C++ sketch and API transaction search. So the data that actually gets saved, the cart data that gets created on the website side, that's storing as part of the brain tree transaction, which I'll get into, and then it's pulled back out again on the hardware side and basically decompiled and prints out. So the website, yeah, you didn't think I was actually gonna do a review website for you. It would have been thrown out of the room. So yeah, it's Drupal, of course. I've kept it really, really standard, really, really stock. As you can see, it's the default. And yeah, I've built a Drupal V0 module, which I'll run through. It's available here. Please go get it, make it a whole lot better than I have. Break it, tell me about it. Tell me that it's broken. Yeah, anyone that wants to grab it, it's there right now. I haven't quite finished the read me yet because it's the last thing developers tend to do. But yeah, the module's all there. It's ready to go. It's integrated. I should turn my phone off. Silent. How I built that, I've got a submit form. Anyone use Drupal commerce? Yay, of course, yeah, yay. Anyone built Drupal commerce module before? Yeah, okay, cool. Yay, thumbs up. You get special swag. So yeah, submit form. I've got the drop in UI being created. And then the form validation. I put the actual transaction into form validation just because I wanted to bring back if there was any errors, which generally there isn't too many, but users, you can never tell. A little bit of an extra thing I'm doing. So when a brain tree transaction creates on like some of the PayPal ones, you can store cart data, item data in a PayPal transaction creation. With brain tree, you can't. So what I've done is brain tree has this thing called custom fields where you can create a custom field inside a transaction and store anything you want in there. I'm just storing the cart data as Jason kind of made sense. It was really easy to do. And basically that saved me having to on the UN do a notification to say, hey, there's a new transaction and then contacting the website and going, what's in this transaction? Everything sort of stored in there on the UN itself. I can just pull that out. Decompile the Jason, print a receipt, easy. The code. I'm actually gonna try a live demo. And as we all know, live demos sometimes don't quite go to plan. But yeah, I've got the code here. So at the very top, do I have an else? Yes, I do. At the very top here, I've got... Don't go to the next slide. So the connection's happening here. I've got a reusable function that it can initialize when I need brain tree transaction. All this pulls in from settings, which admin user sets up before you start collecting all the money. And then to generate, I need to generate like a custom token that I put in the drop in UI. That's to make it nice and secure and brain tree knows who we're dealing with. And that all goes in here. Now the drop in UI, I did have a little bit of problems with. I got that working. It's not clean, but yeah, it did the job. It works. Please go make it better. Tell me about it. The PHP side, again, I'm just kept it nice and simple. If there's a custom field available, which is an optional field, you can set in settings. Then it uses that to drop in the JSON. Otherwise, it's just a straight transaction. So the YUN. So has anyone used Arduino YUN or any Arduino equipment before? Oh, there's a few, yeah. And some of the Drupal commerce people. Woo-hoo. Yeah, so the Arduino YUN. I went for this, and it's a nice little board. It's about YABIG. I've got it currently running inside there. I went for the YUN originally because I thought, oh, it's got Wi-Fi built into it. It makes sense. But it's an interesting experience with the YUN. So there's two sides to it. There's a Linux side and then there's the Arduino side with the bridge in between. The bridge, I pulled so much hair out from the bridge. It's got so much latency. It's essentially a temporary database where you can transfer stuff from the Linux side to the Arduino side. Works in theory. It's a great idea. In practice, it's got so much latency and so much delay. When the Arduino side realizes there's variables in the bridge, some of the variables won't be loaded when you want them to. Some of them will be loaded before you want them to. It's just a complete nightmare. What I ended up doing is, on the Linux side, I basically do, that's where I do all my scripts to get data in. So I'm contacting the Braintree server, pulling data. I dump it into a temporary file. Basically, I create my own bridge just below it. And then on the Arduino side, I pull that back out and print. Really, really easy. Essentially, yeah, I created my own bridge just because it made sense and it worked. It did take me two days to realize that, to do that though, the bridge itself is, yeah, complete. So I originally tried to do the Linux. I love the memes. The Linux side, Python's elegant though, it's nice. The Linux side basically comes built in with Python. So it made sense to use it, except it's a version of, there was an open WRT, which is basically like a Linux server, but scaled down a whole lot. So there's a few things that I really needed to compile in there that just weren't going to compile. So I use PHP. Probably not the best thing to use PHP for, but again, it worked. It did the job. So essentially I'm running this script. It just pulls, it's running on a Chrome job. It just pulls Braintree. And if there's a new transaction in there, one that it hasn't already seen yet, it pulls it in. What I'm actually running, so I tried to use the bridge to essentially store variables of transaction IDs that I was getting back from Braintree, so that I knew which ones I'd done yet, which ones I hadn't done yet, wasn't able to store them inside the bridge latency. So I'm using SQLite between the two, microphone dropped out, to between the two, to be able to know which ones, which new transactions are in and which ones were already processed. And SQLite, you can run on both sides. I wouldn't store thousands of transactions in there, but it's enough to, you can poll the last 24 hours, know which transactions are new, know which ones were already processed. This is a good meme too. So anyone that's already dealt with Arduino, you use C++. It's quite straightforward, it's easy to pick up. Variable types will basically drive you nuts for anyone that's gone from PHP to Arduino. You never know whether you're dealing with an intro of VAR and yeah, you always need to know that. But yeah, so all this code that you see here, all available on my GitHub, you can go get it, you can make it better, change it to what you need it to do, but yeah, everything that's available here is available. And now the demo. So going to my trusty Drupal commerce website, here's one we prepared earlier. So really basic, I'll reload that again. Is that a good size? Yes, it's a good size. All right, so I'm gonna go to add a product. This test product seems like a good one. Go to a cart, and I'll do a checkout. Loading, oh, we're good. And so there's the V zero box. So I'll type in credit card. I could accept PayPal, Bitcoin. So where that little PayPal box is, Bitcoin will appear there once that's available here, and Apple Pay can appear there as well. Like anytime we start adding new wallets and there's some really cool ones coming, they'll basically just be available across the top and they essentially do that. Ta-da, now let's go. Ta-da, and then we'll go continue to next step, which will basically trigger the transaction, fingers crossed, it did. And in under a minute, I should see a receipt print out on here, fingers going crossed and the demo gods appeased. Now you can actually speed this up to make it quicker than a minute. You can basically run a script, have the script run for a minute, and then inside that poll a couple of times, you can also do socket connections. So node, you could do socket connections. You can do socket on PHP, you could do it. It doesn't tend to like it too much, but you could do it and then have a job kickoff. You could also run it through a shell. There's a number of different ways you could get this to connect. I'm just using PHP because PHP is still pretty awesome. Yay, the demo gods are happy today. Ta-da, that's it. So basically whatever you put into that cart, will come out there. What's my point? So I built this wonderful little high quality cardboard box mid last year before I went to PHP New Zealand. And I put little screen in the front because I thought larger audiences would be able to see that some sort of interaction happening. And I kind of wrote a little sketch that lets you play space invaders, but that's another topic. But yeah, I built this wonderful little box because I thought, yeah, easy with everyone to see. And then I looked at it and thought, I need to take that through international customs. Maybe a little bit suspicious. Thankfully, I haven't been stopped and I've been through some interesting countries so far with it. It never goes in on the plane with me. It always goes in check-in. And yeah, they seem to leave it alone. To something else, I've been talking about, after I finish, if everyone wants to come up and have a look, it's all here. The LCD screen, you normally need like a little dimmer pop for it. I kind of lost that through, I don't know where. It was somewhere, it just vanished. And I think I've burnt the screen out, but it's basically still holding together. I ended up simulating the dimmer pop by plugging into one of the output ports on the Arduino U1 and then trying to work out which value is best, which I think I said it a bit too high because it kind of went dark on one side and I was like, ah! But the good thing with any of this sort of hardware stuff is most of the time it's kind of forgiving. There's a bit coming up, I think, where I talk about the shirt that caught fire but we'll get to that in a second. But yeah, something else I've been going through the region talking a bit about is e-textiles which is a great whole new sideline of IoT which is basically gonna allow us to interact with clothing, which is pretty cool. So this is a company in New York created LED fabric that uses Bluetooth. You can put anything you want in there, temperature, advertising, tweets, like whatever. And so as part of my travels I started building my own shirts last year so I could stand up and turn things on and have everyone standing back. This one's, no, this one's not wired. You're safe. But yeah, interacting with clothing in whole new ways. But to get an area large enough to do sort of what I was looking at doing last year, they were like, oh, you're fine, we just need to tether you to a wall to get enough power to you. And I was like, yeah, not so much. But yeah, so this is one of the shirts that I built last year. I don't have a picture of it in here but this was the first one. And it uses a conductive thread. This one's using an Arduino jammer which is a little tiny board about Yebig. Two little coin, watch coin batteries. It's about three volts, four volts. And I was standing in Malaysia doing a keynote at an open source conference there last year. And Malaysia's a little bit humid. I didn't have the wires insulated. And yeah, it keeps you lively on stage when you're getting a three-volt shock. It was fine, you know, push through it. The things we do for our art. So this year we had Battlehack Melbourne which is a hackathon we run in cities all over the world. And this is the team that won. They built an IOT jacket, essentially, for cyclists. They did this in 24 hours. You buy the jacket with PayPal and you buy extra functionality from the jacket using PayPal, of course. So part of the hackathon rules are you have to use PayPal, Braintree, inside what you build. They've had a lot of interest for this and they were actually really close to starting a kickstart for it. So it's KnightRider.org. So essentially it's got an accelerometer in it. Soon as you start slowing down your bike, brake light comes on, blinker. They did this in the streets of Melbourne at five a.m. on a Sunday. Now, to get the actual footage that you just saw with him riding along, one of the teams actually got a GoPro taped to a broom handle and he's running behind him. Wasn't at all suspicious. So yeah, they're currently looking at how they can take this into mass production, which is really cool. Yeah, so put your arm out, blinker comes on. It has directional lights in the wrist so you can program in via an app where you want to go and as you approach a corner, wrist will start flashing and you can turn. Great idea. Okay, go to the next. There we go. All right, so the other thing we've seen, actually I was really surprised with this, but CES this year, I don't know if you're following CES, but Internet of Car Things was massive. Basically every car company has a new way to interact with the car. I knew sort of function built into the car. The car's alive now, almost, soon, soon. But yeah, in particular, car diagnostics was of interest. So I was talking last year with an insurance company, a big insurance group in Melbourne. They had an internal hackathon and I went and did a talk at it. But one of the things I was saying to them is cars are gonna know more about the way you treat the vehicle, the way you drive the vehicle. It's the new Brad the toaster. It's gonna know more about the car and how your driving habits in whole new ways. And for insurance in particular, it's a way for us to have a tailored product and a tailored quote based on how you drive your car, how you maintain your car, how far you go in the car. Like it's gonna be a whole new way for us to create a customized quote. I think we're gonna start seeing a bit more of this. I think some companies have already started doing it now. The double AMI has got that app that you put in the car and can track how far you go and how fast you're going. It's slightly scary, I know. But again, these things are gonna know about all this stuff about us anyway. The more functionality we build in for our convenience, the more things they're going to have to track and more ways they're gonna have to know what you're doing, where you're doing it and how you're doing. Slightly scary topic, embedded tech. So we started to see a little bit of this and as I think we've probably seen with some of the wearable glass type products recently, probably not ready for it yet. This is similar to Google Glass, it's called iOptic, but yeah, little heads up display in a contact lens. Apparently, this company actually has something that they're trialing, but it's not on sale yet. Interestingly though, a week ago, a week and a bit ago, I saw an article about a new zooming contact lens where you blink twice and it zooms in times three. It's coming. And interactivity, I mean, we've seen that this is a little bit old now, but the digital tattoo, the Motorola digital tattoo, it's more of a sticker. It's not really a tattoo, kinda similar, but it basically uses your body's vitals to determine that you're you. So it uses heartbeat and biorhythms and stuff to know that it creates a unique signature so that when you touch your device, when you pick up your phone, it unlocks automatically. So if someone else picks it up with another tattoo or even without one, who wouldn't have one? Yeah, it won't unlock. So the possibility for the internet of things is endless and particularly when you're dealing with something that small, so this doesn't have a name, this is 8266. Of course, you're thinking, I knew that. Has Wi-Fi built into it and a temperature sensor, 32 bits of memory, $3. You can buy this like right now, three bucks straight off eBay or some of the other sites, but yeah, particularly with this type of thing, but the possibilities are endless. You can build this into almost anything from apples to toys. And I actually thought about building this on Apple just because. Digital Apple. But yeah, the opportunities for developers to integrate IOT moving forward and have it talk to your website and having user experiences happen in whole new ways are endless. And that's me. Thank you. All the questions? No questions? Okay, there's one. Yeah, and that's something, yeah, that's definitely being looked at for being an issue for a while, particularly when you're dealing with something that small, like how does that encrypt something and then send it to somewhere else to do some analytics with. There's a lot of different protocols which are currently being looked at. There's a bit of an issue in its own self, but a lot of different protocols for encryption, for passing data around at the moment. At this stage, I think it's still up in the air, pun intended, just because yeah, there is so many different protocols and so many different companies looking at ways that they can interact safely. But yeah, it's definitely is a big topic and when building a lot of this stuff and particularly, I don't know if anyone's seen a lot of the watches coming out, like this thing knows so much about me. It knows how many steps I take. It knows my average heartbeat. So encrypting that sort of data and sending it over a Bluetooth protocol, over a Wi-Fi protocol. Yeah, it's definitely in my mind all the time and it's definitely something I'm seeing brought up more and more by the industry as well. So to answer your question though, it's definitely very, very important. Yeah, and yeah, definitely, yeah, definitely extremely important. And again, it comes back to, there's a lot of plays in the protocol space at the moment. Oh, okay. Brad, the toaster's back on my computer. Yeah, it's definitely something which is in the forefront of, which protocol's gonna dominate? I think having so many different protocols or so many different ways and functions that you can have inside, like the Arduino platform, for example, it is good in that you will be able to sift out which one is going to work best and which one's gonna be the most adaptable. At the same time, that's a problem in itself at the moment, cause there are so many protocols. One will dominate or a combination of a whole bunch will dominate. And we've seen that already with a lot of the HTTP protocols and stuff. Like there was a lot of different variations and a lot of different, IE wasn't gonna support this, well, IE wasn't gonna support everything. But we've seen the happy marriage of that in the end, almost the happy marriage of that in the end. I mean, WebGL, great example, they weren't gonna support that for forever and everyone was like, but why? It's so amazing. It's the same thing with the IAT world at the moment. There's a lot of, I'm not gonna say fighting, a lot of big brands sort of trying to dominate this space. I think we're gonna see a happy marriage of that at some point, as for when? Yeah, soon. Anyway, I'll be around for the entire conference. Skipped right to the, okay. We'll go back to there. I'll be around for the entire conference so please come up, say hi. I have a bag of swag that I need to get rid of. So please come see me. It's good swag. Yeah, and I've got loads of stickers and I've just come back from Battlehack LA so I have loads of partner stickers from like Sangrid and some really awesome companies so more than happy to sort of trade those out as well. Yeah, that's me. Am I on time? Think I am? Anyway, cool. Thank you.