 it is thank you very much everybody apologize for the three-minute delay I am super excited to be giving this talk because while I do postgres for a living this is probably one of the more interesting things that I do when I'm not working my name is Bruce mom Jen I'm one of the postgres core team members I gave a couple talks on Thursday and Friday at the sort of postgres mini conference we had before scale started and I really I really enjoyed I like the new venue I think it's really nice Pasadena is a wonderful wonderful town and walking around the restaurants and everything it's really nice really nice so again normally I do stuff with postgres and we're friend of price TV but this is actually about home automation and it's something that's near to dear to my heart I hope that comes across to you we do have 73 slides so I'm gonna chug along a little bit but the slides are actually available to you right now if you go to that website right there and you pull down those slides it's under presentations I think general subcategory you can actually read the slides whenever you like in fact there's probably 30 or 40 presentations all on that website all his PDFs so feel free to take a look a lot of them have videos as well you can actually watch videos of me doing the talk but again we're here to talk about home automation and I think it's really interesting what I'm hoping to do today is to give you a background not only of some of the technical aspects of home automation but the technical aspects are actually not the hardest part personally I think the hardest part is figuring out how to integrate technology with your home life with the people who are in your household and and doing that in a successful way I know there's a lot of talk about the Internet of things and all these new light bulbs that are Wi-Fi enabled and stuff and that's interesting but one of the concepts I'm gonna go along here is that technology in home automation space has been around for a long time it hasn't been as good as it is now but it's been around for a long time and we still found it challenging to really get across and make home automation sort of a general purpose thing that families and households use I'm going to be giving you some data to that I'll show you some articles that have been recently published on this issue to give you sort of a framework but if you're approaching the home automation problem thinking it's a technology problem you're probably going to want to think about that again when you're done this talk because I'm going to highlight what I think are the real values to home automation in many cases they are not technological so what are we going to talk about we're going to talk about what is computerized automation what actually is that we're going to evaluate some technologies specifically the technology the dodies in my home for over 10 years but again it's just a sample technology we'll look at a sample deployment pick me my household which is growing steadily over the years we'll talk a little bit about but device programming and what's basically involved there and then we're going to talk about what is success that's actually a where we start to talk about well what do we try to do here what are our goals and then finally we'll talk about sorry I'm just not used to the microphone being way up there is everybody hear me in the back are you good great okay just checking and then finally we're going to talk about 12 home automation applications particularly cases where I wanted to do home automation and how I solve them okay do I think you're going to use any of the applications that I actually specify probably not but the goal is that you're going to have gone through a case of somebody who's gone through it and then you can sort of you know apply those as you go so be prepared once you've done this talk to kind of go home spend a day a couple days you're sitting you know in your backyard and thinking hmm I heard that home automation talk a couple days ago I wonder if I could X and that's usually the way it happens I've gone to home automation talks before and I sort of get ideas that kind of percolate my head and then I kind of like grasp onto them when I see a use case right away in front of me in my household okay I'm gonna take questions as we go because I think it's hard for you to remember them and I think it's more interesting to have you answering the questions sort of as we kind of chug along so feel free to raise your hand we'll be doing that okay so let's get started let me do that and that there we go so what is computerized home automation first off we have to talk about what it isn't what isn't computerized home automation timers the timer that has like the dial your plug-in and you stick the plug-in right it's it's automation but it's not really computerized week I think we can all kind of agree on that the clapper maybe I'm showing my age here but maybe I'm not showing my age because everyone's seen the YouTube hilarious video about it so anyway it's just kind of a it's not really computerized dust on sensors similar again a lot of people it's automation it's not computerized emotion sensors again these are fairly widely deployed particularly in outdoor applications and again they're not computerized what is computerized cases where device device the behavior can be combined think of programmatic inputs okay the idea of not having a distance simple limitation a lot of there's a lot of cases you're going to see here where the sensors in one place and the action you want to have happen is somewhere else okay that's not true of a dust on sensor that's not so true of a motion sensor in those cases the sensor in the action are right next to each other when they're separated then you have a challenge you've got to get something controlling all that you've got to get one sensor to be sensed and then send the information to some other remote sensor that's where it gets kind of interesting activity detection and other thing again usually distance it should be fully programmable scriptable at least I would like that not necessarily a requirement and it should have access to external data I'm show you some examples of that where you can pull data off the internet and have activities behave based on data you've gotten from the internet okay any questions okay so let's talk about home technologies again we've got seven sections or six sections right so let's talk I sort of alluded to this just a minute ago the idea of having the sensor in one place in the action somewhere else okay that's a challenge again motion sensor you put the motion into the bulb somebody moves the bulb goes on not really programmable not really controllable it works assuming the sensor and the activity are right next to each other but a lot of times they are and if they aren't you have to have some type of way these things communicate so I think in very in good home automation system you have some type of network that can actually control things and kind of harmoniously kind of set things up now this is a little awkward you're not really you're used to thinking networks as like ethernet and maybe wire wireless 802.11 Wi-Fi but there are some other networks that are available in your home and you should be aware of them don't don't sort of get stuck on the fact that I only want to put in 802.11 Wi-Fi devices in my home there are a lot of limitations to those in terms of cost in terms of what they can do in terms of sophistication and how hard they are to configure so don't get stuck on I only want to have 802.11 devices for for because you know it'll limit what you can do okay so what what networks do we have in our home well a lot of people aren't willing to we rewire their entire home to get started with home automation I'll explain why that's unrealistic in a minute but effectively you already have some networks first you've got the telephone is the telephone network in your house yes it is if I pick up one phone my wife picks up another one we can talk right yeah it's kind of awkward I'll hear the dial tone while I'm talking to her but it is a network okay in fact you might want to think of it more as a network that reaches out into the rest of the world and this is not necessarily one phone to another within your house but it is a connection to a data network in some extent I'm going to show you some examples of cordless telephone frequencies 900 megahertz 2.4 gigahertz 5.8 1.9 these are all networks that are available in your phone and some of the Wi-Fi protocols in fact do use these frequencies they may not be the same frequency data to 11 or they may not use the same protocol data to 11 but they are networks so you realize that you have wireless frequency all over your house that also can be used for communication you may have wired internet in your house good for you I have a little bit of it I run ethernet actually over some of my coax that used to be used for cable television so there's that option there coax or some type of ethernet in your home and of course 802.11 Wi-Fi is available that's network your electrical system is actually network I'll show you an example of that you might not think that's true and of course we have new wireless networks available okay so let's take a look at the that's sort of some of the standard ones out here and and these are these are a little this is not an exhaustive list so if you go to somebody's URL here at the bottom it would give you a better list of all of the networks that are available in your house one of them that I happen to use is power line control so it makes your electrical system a network there are some advantages to that there large number of disadvantages so you may not want to go that direction there's Z wave which is runs on the 900 megahertz band that's very similar to the 900 megahertz I've listed right here for cordless phones in fact it uses the same network Zigbee same thing runs on 900 runs on 2.4 it is an I triple E standard so the nice thing about Zigbee is that and they both start with Z Z wave Zigbee but the nice thing about Zigbee is that it is more of an open standard in terms of allowing devices to me to communicate with each other okay and there's some hybrid ones there's insta on that's actually too loud isn't it so just worried so again just think about the network that you have in your house and how you're going to use it you might want to standardize on one network type there are some very creative hubs that are now being produced which actually communicate with several different networks so you'll get a hub from somebody I know Staples sells one and there's a bunch of others where it's a it's a home it's basically a home automation center and it does 802 11 it does Z wave it does Zigbee it may do X10 it may do insta on okay so the idea is that you might decide that you want a hybrid network in your house you can't buy all the devices you want to use the same protocol so therefore you buy some kind of hub that you know that sort of synchronizes all that together okay so just keep it aware of because there's a lot of devices that only are available in one like for example door locks I think they're only like Zigbee or Z wave right and there's other things that are only X10 or some things that are only insta on so so if you're in that type of environment and either you have to have some kind of central server that understands all those at once or you're going to have to buy a hub that understands all those protocols and program everything within that hub and let that hub communicate any questions so far okay choosing a home network technology so again I've listed a bunch of them there's a bunch more they're coming out all the time some of them are proprietary they only have really you know household names but you have to think of a couple things you have to think of do you have open source computer control of this protocol okay if it's a closed source protocol you may not have a way of communicating from Linux or from BSD or from an open source operating system into these protocols and if you don't that means that effectively you you're locked into using the software that comes from that vendor and you're also locked into being able to interoperate that particular protocol with another protocol that's available so be aware of that kind of trap you want to try and find something that is open pretty much everything Mr. House supports which is written in Pearl is probably going to be good for you so if you go to Mr. House and you can actually it's been around for probably 15 years they have a whole bunch of protocols that they understand and that's actually an example of a tool that actually can integrate a whole bunch of different technologies together and give you a single platform upon which you can program okay you have to think also of what type of devices do you want I already mentioned door locks is something you might want and you might find it those only supported on certain protocols you may find that you want to put you want to control like lamps that's a pretty basic one turn the lamp off turn the lamp off dim it you might find you want chimes as part of your case you might find you need wireless remotes to allow you to turn lights on and off without actually going to the light you might want sensors you might want HVAC thermostat type of controls you may want 220 voltage controls okay so you want to try and get an idea of what devices you think you're going to need and then look at the protocol you choose and try and get one that hopefully supports most of the type of devices that you're going to use and if not you have to realize you're going to have to bridge networks you're going to have to get some kind of central hub to kind of bring all those networks together there'll be one of we have one all home automation system one protocol but there's a whole bunch of reasons that we don't x 10 years ago probably 30 years ago was hoping to be that it's been around since the mid 80s again as I was saying home automation is not like brand new we thought you know it's like it's like you know home automation is always five years away you know so in five years it's going to be five years away again that's effectively the way a lot of us who have been on home automation because the technological problems are really not have been surmounted long ago it's really more of the sociological problems and psychological problems have to deal with them that's I'm going to go into in a minute so there's simplicity device replacement I know a lot of new homes sometimes get a a built-in home automation system that's built into the home does anyone have one of those they want to admit to having one of those and the reason I say that is because I have talked to a number of people who had pre-built home automation systems in their home and the problem has been one of reliability the ability to expand as technology expands and the complexity of programming these devices and the cost so unfortunately a lot of pre-built systems which have basically been in the home automatically when they purchased it often within a couple years have fallen into disuse because they kind of had a very rigid structure they weren't able to change technologies they were very complicated they were often very proprietary very off-the-shelf I mean very customized but again the more customized the less testing that's going on and if you had to change the way anything behaves you had to bring in somebody to reprogram it and obviously that was a big you know a big kind of detriment to people sort of doing things with home automation we just to sort of step back a minute home automation seems to be fine in like automobiles like you know you drive an automobile it's a whole bunch of technology in it right why can't I have the same technology in my house well the reason is because the car comes as a closed system you buy that car you drive it off a lot every single part in that car is made to work with every other single part in that car you probably have before for three years five years maybe ten years okay and you don't live in the car right so you're not worried of it like locking the doors you can't get out or something like you're just you're you're not assuming your car has the same requirements of safety and sort of predictability I think maybe then a house does for house you figure it's gonna last seventy years hundred years you know technology going to change all that over that time it's not a house is not necessarily a technological vehicle so you don't think of technology sort of being part of it so it's kind of weird when you think of automobiles that they've been able to move in terms of automation very quickly because they are a closed system that comes pre-tested home automation by definition is always a one-off and that's made it very very hard for people to effectively get any kind of hold or momentum in this industry costs I talked about that's a big factor that's a big factor if you have to go to your spouse every time you want to add a light going on and off and it's going to cost you eighty dollars you're gonna have a conversation okay I don't know about your wife with my wife he's gonna see I I probably have you know I don't know 40 30 70 50 devices in the house at different places okay if I had that if that was all 80 dollars you know it'd be like you know my wife kind of jokes I got a little like you know X10 warehouse in the basement and the reason for that is because when you buy things I tend to see by couple I'll leave them in the box and then when somebody needs something I can go down the box pull it out and install it right away and I don't have to wait for you know shipping and pay shipping and so forth so I have a tendency have a little extra bit of stuff around and that's how it gets to be joke but the items are not that expensive so it's really kind of easy to have a couple extra round again as you get into the hundreds of dollars per device cost then you're like oh you know then you're gonna be able to be thinking and again there's a lot of buzz about this this is the whole motivation is really a subset of the Internet of Things it's the Internet of Things sort of brought into the home and and I you know I think the jury's still out on what it's gonna look like five or ten years from now I would have thought that home automation would have been here five years ago so yeah my prediction is completely useless because I assumed once the technology was available that it would be used very widely and in fact when I give presentations I'm not gonna ask for a show of hands there's usually a very small number of people in the in the audience who are actually actively doing home automation and there's a number stumbling blocks and I'm gonna cover this okay let's just take a look at a sample deployment I'm gonna go through these slides really quickly I started my home automation probably 2003 2004 so maybe 11 12 years ago at that time most of the devices that are available today for home automation were not available the only real sort of basic home automation thing was something called x10 it was very inexpensive it was also fairly unreliable but I figured I had to use it effectively what it does is it makes your electrical system into a network sounds crazy but effectively the way they do it is in a standard AC house they actually have a little spike of frequency that they send at the point where the phase crosses the centerline and they can basically send a one or a zero that way sounds really crazy you can only do 120 bits a second because the cycles like 60 Hertz and it crosses twice so really slow in terms of capability but if you only got like you know 30 40 devices and all you have to do is say on or off it's not that bad again very little you're not you're not pushing a lot of data through there to basically say that device I want to turn on that device I wanted him this is a little bigger example and again some of the codes x10 will support under 256 devices I'm not suggesting x10 I'm just giving it as an example there is a sine wave on the oscilloscope that's what it looks like when it sends a one basically okay so x10 standard this is very sobering for me designed in 1975 I can tell you when they designed this they thought this was going to take over the world and you know how many people really use it today probably like 0.001% if that again there's a packet and a protocol and so forth there's all sorts of problems with phases and amplifiers that allow you to bring the phases together you don't have to be an electrical engineer to do this but you have to have some kind of engineering smarts to kind of set it up in a reliable way particularly in a large home but the nice thing is the devices are fairly cheap they're both like 10 bucks maybe $15 a piece they look pretty normal here for example on the on the right is a normal switch on the left is an x10 switch and you'll notice it's a button because there's no definition of on or off it could be turned on and off electrically or electronically so instead of flipping it up and down you just press it this happens to be for an out-by-light this is a flat switch a decor switch they call it this is a three-way switches this is a wireless switch kind of weird this is how actually I like to got started with home automation I had an electrician in the house and I said my wife wants to switch right here to control the light over there he's like whoa well okay the problem is the switch you want to switch on the second floor but the light is in the ceiling of the first floor if I have to run the wire down and over to that thing in the middle of the ceiling I'm going to make a whole bunch of holes it's not going to go well I don't think you want to do that I said well I said you can try x10 I'm like what's that I've heard of it but I don't know like I remember the obnoxious x10 marking that's all I knew yeah so I hope you remember that I think it was the first pop-up ad to believe or not but in fact that's what it was that is a switch that will send a 900 Hertz signal to a receiver which then will send a signal across the electrical network to a switch that actually controls the light so it allows you to basically stick a switch anywhere kind of interesting that's what the receiver looks like so this ends at 800 mega signal picks up by the receiver the receiver sends it through the electrical plug through the electrical network in the house the switch which actually controls that light also is an x10 switch like that one like that one and it will turn the light on kind of cool you can have a remote that's kind of cool I'll show you an example of why I use that you can have multi-key remotes that's a big button on the bottom there won't go to that this is an interesting case when I start when I bought my house we had one of those intermatic dials I've any engineers who probably know what it is like a big yellow dial with like little screws on it to do anybody get in this yeah okay little screws you move around right so that's the pool right so I if you need to turn the pool pump on you have to open this little box and you have to flick a switch to turn the pump on so you're basically you get out of the pool somebody wants to the pool pump turn off for some reason so you've got wet hands okay yeah wet hands and there's this metal intermatic dial right with some yellow paint on it and then a little plastic flap down here and then you're supposed to touch this and I'm like this is just an accident waiting to happen 220 volts okay I'm just I'm like this is not good so one of the things I did here was to actually put a X10 switch here which for safety reasons alone is cool but I'm going to show you some example later of how that works I actually use an open source program called hey you to control X10 again just in protocol you'd have to find a different application but it has a whole bunch of things it can do here's an example of a cron tab if those of you know what that is that effectively turns different lights on and off depending on whether it's getting dark whether the pool should be on turns all the lights off at night to me this is really where home automation takes off because it's one thing to have a motion sensor it's one thing to have like a QT little thing I know there's some home automation things like every time you get a Twitter feed like the light changes color you know right you know that that's cute I think it's great to show off the people but practically not really you know it doesn't really turn me on not that this turns me on either but it actually was useful and the reason it's useful is effectively I now have programmatic control of my entire house so from a command line from cron tab from a shell script I can do virtually anything and that's really where home automation to me takes off now I'm an engineer I'm not expecting every homeowner to start have a Unix server and connect it to X10 and start running cron jobs but I do expect you people to do it I don't think I'm asking too much here okay because you do it for work but you come home and there's not a whole other nation there now I'm just being facetious to me I found it interesting but it is kind of cool I think and my family actually does like it I'll explain why that is in a minute but you can get an idea of kind of what's going on here we have the ability for example to dim things right here okay we have this is kind of interesting it actually goes out it goes out and it finds out how the visibility at the airport how how much cloud cover is over at the airport and then what time is sunset and it computes when the lights should go on in the house because if you have a normal thing go on at 5 p.m. or go on at 6 p.m. every day hey it doesn't account for dust so you maybe you can use a sensor but the cool thing is it kind of actually looks at actually how dark it is and computes it that way so there's some other cool stuff in here we'll talk about in a minute but that's just sort of a sample of sort of the I would call a master console that allows you to now programmatically do stuff okay how does the computer communicate to X10 that might be your really interesting question like how does it get onto the wire wired power network remember I'm using a power network again if you're using ZigBee you would have a ZigBee controller connected to your computer but effectively what this is here is you've got there's the server there's a effectively a telephone wire and this is a serial port so to the server it looks like a serial port it basically plugs in I use the USB to serial adapter and this is just a little serial cable that comes out it goes into here and this plugs into the wall plugs into the power and that's how it can not only send it controls out but it can detect activity coming in that's the other issue not only do you want to control what's going out onto your network and turn lights on and off but if you have any sensors in your network you want to be able to detect those and take appropriate action on in your in your service so it's both in and out but you want to be able to do this is actually what in looks like to me okay this is just a log of of of hey you or X 10 activity and you can see various things happening here's a motion sensor here is somebody turning a light on with a remote so you can you can actually record this and then you can create a shell script or some type of pearl script or something there's always reading that activity and taking actions based on that activity again you can kind of see where I'm talking about computerized home automation when you actually can computerize it okay and you can actually control it from a shell script from Unix from Linux and actually sort of create your own world of control you can do all sorts of things so for example it's in a loop and all it's doing is reading the output of the log and every time for example it sees somebody hit the remote bed it's a button it's a remote control it turns some lights off where it does a dust thing or it does a kitchen touch here's a here's an example we hit a button a wireless button and it actually sends a signal out to all of the terminals in the house including the slideshow that shows up and says hey we want it ready to eat and it also sends a chime to all of the in different parts of the house to tell everyone you want to eat the house is fairly large we try we tried one big bell in the kitchen you know what happened everyone in the kitchen became deaf and nobody else in the other house could hear it okay I actually had yeah I used to have my server that would that would actually make the sound of a bell everyone in the office who we were the server is would have like a heart attack every time it went off and then nobody else in the house could hear it I'm like this is not working well so we actually got a little x10 plugs that make a little chime sound you put them in different parts of the house and you don't hear this huge sound in one place you hear sort of ding ding and it sounds the different parts of the house everyone kind of hears it they still may not come to dinner but again you get it lately you can say you've tried you did hear it I didn't hear it yeah you do hear that occasionally so my point is that you sort of moving into step four we want to talk about what are we actually doing what things do we need to look for so you should be thinking and when your terms of programming is what are your inputs what type of things you're looking to happen and then what is going to be your output and and again I'm going to kind of be going through this input output thing pretty regular let me take some questions before we move to the next section yes sir I'm sorry do you PS is interfere with this signal they absolutely interfere with the signal yes there is actually a and I didn't show it but there's actually a specific x10 isolator designed to be plugged between something like UPS and the power system to prevent the dampening of signals which is what the UPS is designed to do okay from interfering with the rest of the network yes so in fact I do have like a filter that sits there and you have to have it yes sir so that's a great question so if I'm starting out today what would I actually do when I racked my brain on that one I'm not sure actually what I would do and the reason is because a lot of my requirements and I'm going to go back to that earlier slide where I said what's your cost you know what's your cost profile what type of devices you need to interface to and what type of actions you need to take so for me I needed a 220 control for the for the pool I needed some type of chimes okay I need some type of remote that would send a signal into the X10 network from a remote okay I didn't really need the bulb the light bulbs that change colors okay I didn't need a lock that unlocked for me I just didn't need that so I've looked at some of the technologies I probably would have a hybrid system at this point I probably would still be using some X10 because there's a lot of the devices particularly but you know like an X10 chime is like $8 or something like that right and and if I don't I don't know anyone who makes anything like that even at that price point I think what you have to do is you have to take the device then you have to add somehow a chime on top of the device whereas right now it's just a little block it just sticks in the wall right the other cool thing is if the device breaks do you want to debug something just unplug it it's like not that hard right you know you don't have any I had a friend who had a home automation system and like every month he would be having to replace a switch in his house like an outlet because he had him in the outlets and obviously they were very sophisticated they broke and he would have to rewire these things you know whereas I have only had like maybe two devices fail in ten years but I don't really feel like rewiring my house to do it if I decide I don't want X10 I just pull out pulling out of the outlets a couple of the wall outlets I got to do but the plot of the switch is but in general I would probably be doing some Zigbee stuff although again it has a tendency to be a lot more sophisticated than I even care about in most cases what I want to do is pretty simple turn the light on turn light off dim the light tell me somebody said a remote I see a lot of the home automation today is very targeted as specific use case like a lock but there's very few home nations I system I've seen that have sort of a breath of sort of a toolkit approach where you've got a whole four of things that all talk to each other all use the same protocol so I don't know I've looked at them I've talked to some people there's a PLC power line control thing that's supposed to be very sophisticated I don't know I really know no protocol has really you know extends on its way out but I don't I haven't seen any single protocol really kind of take over is being done the fact that with this point and I would try and I would like to try and avoid a hub where I've got one hub thing and I've got to interface to that hub all the time because then I don't have I don't have computer control of it anymore in a certain way other questions yes benefits using parallel number Wi-Fi so the best benefit using parallel of Wi-Fi is simplicity device and low low low cost of device usually once you do Wi-Fi then you've got to have a very sophisticated like like I don't know how you would make a little remote tiny remote control that did up Wi-Fi right because it would just drain too much battery like just being on the network all the time so a lot of it is simplicity I think is what drives it I'm going to hold on questions at this point I want to get through the applications and we're going to come back to it again I'll be up here for half an hour after I knew that was going to be a big question what you know where do you go and I I'm basically telling you I don't know where I go I know where I've been I know how hard x10 is to get working reliably but I don't know absolutely where the new technology is going because I feel a lot of the new technology is very siloed very siloed your application is not and when we get to the when we get to the application section you'll see what I mean in terms of the breadth of what I wanted to do okay I will close with a with a with a funny story I was reading a Wall Street Journal article about home automation they've had a number of home automation articles if you want to take a look and and somebody was talking about one of these light bulbs or something you know and and he was explaining that to turn the light bulb on you you take your smartphone and you open the app and you hit a button the light goes on and off and he said he said if we had started out with smartphone control of our of our light bulbs and somebody had come along with the idea of putting a switch on the wall we were thought it was a genius okay and that's that's very sobering to me and it really tells me it gets back to the what I'm going to talk about a minute what kind of problem you're trying to solve if it's cool that you're using your cell phone to turn on the light then you can solve that but if it's easy to use so phone might not be the best way to turn your light on right and I think that's unfortunately emblematic of a industry that still has to figure out where it's going so inputs what type of inputs do I need again we're talking about things that what so I want to be able to type commands of the command line okay I want to be able to do sort of a clock time I wanted you know you might want dawn dust sensors wireless remotes caller ID telephone dialing websites pulling information from the internet in and then you got output things like turning lights on turning motors on appliances I'm going to talk about a coffee maker in a minute sounds make sounds like the buzzing everyone's time to eat broadcasting network information to your family slideshow all again useful things you could do this is an example of the first floor of my house what you see here are the circles are actual lamps or lights okay the and again you might need to look at this slide later and sort of pick it apart but effectively what we have here are different things that are happening so for example we're walking through a case where right here we indicate that it's sunset and it sends a wireless signal to a device it then goes to through the circuit breaker to a different phase it arrives at the computer x10 interface it goes into the computer it comes out of the computer and it turns on this light right there so that's and this light right here okay so it actually is I'm going one to eight in how a dawn dust sensor effectively goes through the computer then and then schedules an action to trap and later okay that's an example of the dust sensor so let's talk about number five what is success and you know when I had this slide I was almost going to like give you an empty slide I was like I'm just going to put up the question I'm not even going to answer it to any because because there's what you think you want to success and there's actually what success is so you really have to define this again back to that can I turn my light on for my smartphone yeah I guess you want to I don't know right so this is what success is to me so for me success was adding was improving my family's home environment that was that was the goal okay the other issue a suggestion is to start slow make incremental changes I'll give you a story here I bought some x10 stuff and I think I've done something with x10 I don't remember what it was the first thing I did was some particular case I needed x10 for very simple and I probably went three months and my wife comes to me said you know it would be nice if this x10 thing could turn on the light in the family room when it gets dark so I'm like yeah I could do that three weeks later I decided I'm gonna do it why I wait three weeks okay because effectively they had had x10 in a very limited siloed situation okay that they understood and they got used to it and then the family would say you know I could use this other thing could you make it do something and I'm like yeah I can do that and three weeks go by because if I did it right away I'm basically like I'm over eager okay I'm kind of like showing my hand like well I want to you know I'm I'm expecting we're gonna have 100 devices at the end no no no no no of course not so I wait a couple weeks and I put it in and it works and I waited another three months okay and then my wife comes to me she said oh you know I really like the outside lights to come on when it gets tough right because again if you've ever seen the non x10 controls are always very awkward and you every time you lose power you gotta anyway they're kind of yet and we have a whole bunch of lights outside so we take a lot of work and I said oh boy I said I'm gonna have to like bring an electrician because it's it's it's a three-way switch left in a which side it's hot there's a whole bunch of design involved in putting in x10 in a three-way switch situation probably took me two years to do the outside lights and finally got a man like okay good and then and then the pool pump we did the pool pump and then we did a whole bunch of things so I guess my point is that when I did it I did it in a very sort of slow way okay I also accepted that some home automation tests are just impossible you know there's like what could you make it do this I'm like I don't have any inputs I can really use there's really no output that like I can't there's no logic that would tell me when to do that and yet to say oh I guess you know I guess we can't do it you know you just have to accept that you don't don't don't feel bad there's a whole bunch of case you can't do but you know you're succeeded when somebody asks for more in fact this some this Wall Street Journal article there at the bottom smart home gadgets still hard to sell that's not from two years ago five years ago that's from like two weeks ago okay and if you read that article you find some very interesting statistics indicating the difficulty of of really getting home automation into the home probably only 9% of households are interested in home automation and that number has not changed in the past two years okay so they do the test every year and it's pretty much way way well there's a lot of people love to sell it to you there's not all people want to buy it there's a whole bunch of reasons for that why what are your challenges change people don't like change you know I'll give you a class example Philadelphia we had a smoke stack next to the training station it was used for the power station for Pennsylvania railroad have been there for 19 since 1930 and it was not used I mean the electric that the the the railroad has not been generating their own electricity for a long time okay it's been a long time but smoke that was still there and they got rid of smoke stack about 18 months ago and I'm coming down the train and like the smoke stacks going I'm like where's the smoke stack right a lot of people don't like change even though maybe the smoke stack look hideous when it started if there's like 70 decades of smoke stack everyone's expected that smoke stack to be there when it's not there everyone is like something happened okay so don't don't don't expect your family to be just rushing to home automation because you think it's important reliable operation you know people just don't you know that's their home that's their castle they do not want unreliability that switch on the wall works every time folks if you can't match that most people are interested let's face it they don't want complexity device longevity again if you put something in your home particularly it's hardwired is it gonna last for the life of your home if it isn't are you gonna be able to change it easily you gotta think of that maintenance how how you know how much you're gonna be able to change this thing what's the cost do you have to have a server running all the time like I have a server running all the time I hope it does a bazillion things so having automation added to it's not a big deal but if you don't have a server running all the time okay how are you gonna do this you're gonna make a little you know one of those not adrena with the other one though that's my pie yeah you could gonna make sure you get the serial port on there and a whole bunch of things you could probably do it it's not a whole lot of power involved but again you have to think of that and also security privacy this item here at the bottom again from a week ago actually I made a mistake I'll have to fix that the URL here and the URL here are the same so something's wrong anyway the reason you can just search for these titles you don't even need my my thing nest thermostat bug leaves users cold this is anybody ever see this article yeah okay it's stop where they did a firmware upgrade and all of a sudden some users experience the problem I think some means all I have a feeling okay because if they're not given numbers then it usually means all everybody's got that upgrade and and they're worried about houses who maybe are not occupied or found our vacation residences now the they have no heat anymore they got drive 450 miles to figure out what's going on nine-step process to reboot it and get it get it back online that's scary people don't like that so you have to offer something that makes it worth that these these changes and these disadvantages so let's get let's get to the beat let's talk about actual applications okay and again I'm gonna run through 12 of them but again yours are gonna be completely different okay first one telephone interface I told you about the idea that the telephone effectively is a network okay so what I do this is unrelated to extend at all I just take a modem this is a US robotics modem believe it or not you can still buy these things okay and as you can see it's got a serial port here here's where the telephone call comes in here's where it goes out to the computer and we have a little loop that's always looking to see activity coming and this is the activity this is what the extent this is what not extent this is what caller ID looks like in the raw to a modem you basically turn on caller ID to the modem you tell the modem I want you to listen for caller ID and all of a sudden you start to get these information the date the time the telephone number and the name you can then take the telephone number you can look it up in your address book and bingo you get Christine Momjin from Bruce's cell phone and you have my telephone number right there okay which happens to be on my website so it's not secret at all okay if you call it'll buzz in my in my pocket right now so the point is that yeah with 20 people calling me the point is that I've done a couple things here first first I've gotten information from a network second I've added smarts to it by looking up the telephone number see if it's in my dress book enough as in my dress book this description is going to be better my description in my dress book is going to be better than what I'm getting from caller ID and it actually comes up with this beautiful message it shows up now on everyone's terminal and it shows up on the slideshow and it shows up on a laptop in the kitchen with X message just the whole screen becomes telephone call from whatever right and everyone loves it this is my daughter's idea the X10 the idea of coming up on the screen because last time we'll be eating dinner at lunch somebody will call I'll be like who is it right and some of them have like it'll talk to you but that doesn't help because it doesn't check my dress book right so everyone like will be eating the phone call ringing will look over and say oh it's X person and right away we know exactly who it is we know what they're calling from your cell phone or from home and we can call them back or whatever we want okay in fact I even have the system set up so I can dial out from my dress book so I never dialed the phone to call anybody I just say rollo and the person's name and I say dial call the house call their cell phone call their work and just pick up the phone and it's dialing for you because the modem go happy to dial for you right yes need to tell it to do it and also I have to a system where if I call the house it actually makes a little ding dong sound and it makes a ding dong sound so everyone or no this is not an ordinary call this is your husband calling or actually any family member it'll ding dong to distinguish it from an ordinary call from somebody who isn't in the family which you're going to answer but not maybe as quickly so it kind of is an introduction to life so it's a combination of the caller ID on the modem the address book and X10 to do the chime and X message to send the message on the screen I mean it's kind of hilarious if I call my house and I'm not going to do it now but if I call my house effectively what happens is like when I'm in the hotel and I call my house and I have a terminal open it effectively I can see myself calling myself like you know you see the terminal saying Bruce is calling I'm like yeah I know I'm calling I'm here so it's kind of funny so again you can also dial out and again it's happy to you can happy to do that as well automated okay this is how it works the caller ID comes in it checks the the Rolodex and then sends a chime and sends a broadcast message and logs it as well I have all the calls that come into the house for the last like 12 years I can pull them up outgoing calls again I can force the system to dial directly from the address book second home automation would be would be the first floor so this is basically a list of all the lights we have all the wireless remotes the coffee maker I'll talk about in a minute the computer as you can see this is pretty target heavy target rich environment this is the second floor again has lights pull pump is on the outside obviously different remotes in different places so again this didn't start at once it kind of grew over time you've seen pictures of these but again as these need became somebody family member will come to you and say I would like to have a remote that does x I would like to have a switch that does why I would like this like to go on in this circumstance and so forth and then you work with that individual to add and this is sort of a list of some of the devices that you have so X 10 you have a config file you name the devices you can say X 10 off on you know family room and all the lights go on I have a button that turns off all the lights if we're going to watch a movie you know these type of things okay this is what yeah X 10 on cash turn the couch light on turn these on turn this is the one where you're gonna if you're gonna watch a video it turns off all the lights in the area of the video again the idea of using crime to do stuff we talked about that already this is again that same screen where we talked about different things happening at different times don dusk activity what I do here is I actually I actually go out on the internet I find out like when sunset is and I figure out how overcast it is and I determine when the lights are gonna go on okay as I said before X 10 also story supports of remote so there's a bunch of remote applications this is one of the cooler applications that I've done I have we actually seven up from the house so my aunt was there this and everything so when it gets up she kind of sets the coffee maker and then when my wife comes out of the shower she presses that button and the coffee maker comes on and then by the time she comes downstairs the coffee is ready okay I'm not a big coffee guy drink tea but she loves it my aunt loves it in fact it's so funny because my antle get up and she'll kind of set the coffee put the water in and everything and then she'll plug it in but there's no power to it right and then she'll kind of go back to a room or whatever and my wife presses this button it'll turn the coffee maker on but the problem was that my aunt didn't always know when the coffee maker went on so there's an a separate X 10 chime in my aunt's room so when she presses this button it turns the coffee maker on and it makes that special chime in my aunt's room so she knows that the coffee has now been turned on and she goes and pours it and does whatever she does and that's her thing that she does and and she loves it okay if you thought that wasn't crazy enough and this is kind of how it works that you hit the item it turns on for for I think 10 15 minutes I think only says 30 minutes it turns for 15 minutes and then it turns off again because you don't want to burn the coffee right so it turns it on for 50 minutes and then turns off and that's usually enough time if that's not crazy enough my wife has an icon on her phone on her mobile phone or some smart phone okay it's connected to xv connect which is an Android application that does SSH with you know secure keys and so forth and effectively what it does when you press that button it makes an SSH connection to the house it runs the coffee command from the command line and then it logs out okay so my aunt gets her buzz the coffee maker goes on she arrives and the coffee is ready yes I know my wife's the princess whatever it's the kind of thing it wasn't that hard to do it makes things easier for them sure why not right this is something you do you're 10 okay this is not something you do your one but as your family gets more used to it you start to get into these type applications and and again the house starts to do cool things for you okay that you may not kind of get used to doing so it is it is pretty cool so this is how it works that the control with smart phone uses xv connect bot runs SSH doesn't need a password because using an SSH key and it runs the coffee command from the shell prompt and then logs out not that hard to do once again all these pieces together all of a sudden they work really well pool pump I'm going to cover this a little bit the problem with the pool pump is that it uses a lot of electricity and you don't have to run it as much when it's cold out when it's hot out you gotta run a lot so hey we'll just go out on the internet we'll find the temperature outside and based on that temperature we'll run the pool pump for two hours or four hours or six hours okay automatically just go out in it how what's the temperature and then just control it that way and you can control it yourself you have shell scripts you can control and so forth of you if you're doing something special but again I'm not sticking my hand in that border thing with the dial and those pliers and also the the I don't think I don't have to move those little like rod those little like knobs and get it to the right time it's all confused control from the activity screen we actually have a screen that shows like everything is going on so it's like a slideshow and then the calendar and then all sorts of activity again when something comes the weather if somebody calls on the phone if there's an event you have all sorts of stuff sort of all together in one place okay we have a button which is basically a button that you hit eat and then a broadcast I talked about this tells everyone it's time to eat I'm gonna give you the last one which was actually my most hardest one this is one I stood about for a long time my wife was like when somebody comes home can you tell me when they open the garage so I know they're coming home instead of them just walking in the door like why can't I know when a car is arriving in the garage this is really hard and it took me a couple years to get to the point I think just walking through this will give you some understanding of how bizarrely complex this is again I'm running out of time so just give me two minutes to wrap this up so you have a bunch of things you could do it with lights motion distance you can do it with activation the garage door garage position but you also have to take a new account that somebody can be taking the trash out that's not a car arriving and you also have to really somebody could open the garage door to leave or they could do it to Ross the same action okay so one thing I thought about was like maybe using like a detector so here's what I end up doing I took the garage door I put a switch up there near the garage top of the garage door and X10 controller and this allowed me to identify when the garage was open so this is the garage yes it really is that clean believe or not my son my Peter put up his shelves which are fantastic so basically you have a garage you have three garage base here okay and right up here you can see there's like a little switch I'm gonna blow it up actually this is a better probably a better shot okay so this is the garage and here's the switch and right here is a little you can see a little bar it's hard to see but there's a little bar there and then that connects to a switch which connects to an extent control which connects to the power so when the when the garage door goes up it actually and it's hard to see you it actually trips the switch and it the X10 identifies the switch has been closed and it actually sends a signal to the X10 monitor identify somebody came in the problem is you don't know if they open the door to come or go how do you fix that well you could use some kind of sensor maybe Arduino distance sensor and I was like this is going to be really complicated really expensive so I end up going like super simple see it up there that's a door sensor see it up there that's a magnet okay when they open the door there's a wire that goes from here along the wall into an X10 sensor so I know when the door has been open okay if they open the door and then they open the garage door they're leaving okay they're leaving they're all they're gone the garage door opens and nobody has opened this door for five minutes prior to that they're coming home okay so it's the kind of case where it took me two years to think of it I didn't want to get into a whole complicated thing but it actually works to put icing on the cake somebody said it would be neat if we knew who was in the car when they came home well I'm like everyone's got a cell phone and every cell phone has a MAC address and the way I set up my network every cell phone every MAC address for every cell phone member in the house is registered to a particular host name where I put a little DNS comment in there of whose cell phone it is so when somebody leaves when somebody leaves five minutes later I'm like you know I had ten MAC addresses ten five minutes ago have any MAC addresses disappeared in the past five minutes or ten minutes I think and when I identify that somebody's left and a MAC address has disappeared they were in the car and when they come back I'm like I don't use that in that car because I know who's in that car when they left and I basically say Van has returned with Christine okay and that's like the newest thing that I had kind of working so conclusion this is yeah I know I'm four minutes over but anyway yeah this is this is sort of the scary of why you don't want animation but as you can see if it's done right and it's done in a balanced way I think it can be really powerful and I think you as engineers certainly have the potential to do that if you want to and if you feel that your family would would appreciate it I know mine certainly has I've enjoyed implementing it and I know they're enjoying using it so thank you very much I'll be up here for questions