How I Automated All the Things - Raspberry Pi, Arduino, Fritzing - Everlanders Automate the World!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay google turn on the lights turn on the fan welcome back everyone I hope everyone is safe and well we're actually hunkered down here in the state of Oaxaca in the south of Mexico just limiting our time out in a boat and that gives me a good opportunity to get some time inside the truck working on some projects I've been wanting to do and staying in the nice air conditioning hopefully that doesn't bother you guys too much the wind noise but anyway a common question I get a lot in the comments and everyone who comes into the truck and sees that is how do I automate everything what do I use for automation and that's a really tough question to answer because I use so many little things little bits and bobs all pieces of the puzzle to make it work so today I have two projects I want to work on I don't know if I'll get it both done today but I figured I'd take you guys along for the ride and kind of explain some of the stuff some of the systems I use and how easy it can be alright so like I said there's a couple things I want to automate here today one of them being our maxxair ceiling fan it does have buttons here where I can push to start turn it on/off temperature or rather fan speed up and down and direction in and out and so on and the other thing I wanted to automate is our air conditioner which you might have seen in a recent video it lives back here behind this wall and it's ducted up to the vent there of course and it has buttons on the front is it that you can press to do various things but it's kind of cloudy to get back there and it came with a remote control which is handy except for usually sitting over here the remote doesn't work and even if you come here it doesn't work gotta get these bins out of the way and even then sometimes it doesn't work so those are the two things we're going to tackle today so let's get right into it all right so before you run off because you don't have that air conditioner or this ceiling fan this video is going to be very broad with the fundamentals of how to do a lot of this stuff that I've used for all sorts of projects automating all kinds of things so take it with a grain of salt just follow along even though this isn't something you're modding today I hope to just put a bug in your ear that one day when you need to automate something you'll remember this and look up some of these tools that we're going to use all right like I said I've used these fundamentals to automate all kinds of stuff friend of mine has a big shop in a farm with three garage doors on the on the shop and then one on the house and I built just a simple relay board with the way most module to remotely press the buttons on his garage doors that way no matter which vehicle or tractor or a piece of equipment they're running in you can pull out his phone and remotely trigger those doors to open and even fun stuff like this little Lemos module here with a little screen on it I built one of these into a 3d printed subscriber counter ornament for Levi Allen at left coast media I have one that we put a temperature sensor on and we put in our parents house so when they leave town for extended periods of time a few days or whatever they can check in on the temperature because their furnace sometimes is finicky and there's concerned that the that the heat is on all those sorts of things you can automate with another thing I've been wanting to do is install one of these little motor driver boards with the most module to control the fans in our freezer apartment so our freezer compressors in a compartment under the sink and it gets warm so I've installed a little case fence in fact this case fan this is a PC computer case fan but it failed and the new replacement ones that I was able to find here in Mexico sound like Harrier jets so I need two PWM those motors down to slow them down maybe turn them up when we're driving to Full Tilt for fun and turn them off at night when it's not needed all that sort of stuff so those are some ideas for things you can do alright so one of the reasons I've hesitated it's difficult for me to make this video is the topic is so broad I use so many little things for example a lot of the automation I've done at home when we had a home and the core basics in the truck are handled by a Raspberry Pi this is a PI 3 they're about 35 bucks 40 bucks now for the new ones this is a Raspberry Pi 0 a little it's a little version of the same thing fewer USB ports and not quite as powerful but they're 5 bucks the new ones with Wi-Fi built-in are 10 so that's that and one of my favorite go-to modules is the Wii most d1 mini I've gone through probably 50 of these I usually have 10 on me at all times and when I have less than 10 I get panicky and order some more so these are great they're three dollars and fifty cents for an 80 megahertz processor with Wi-Fi eight digital i/o pins and serial analog inputs pwms on four of the pins I think so they're amazing little unit they plug in with USB for programming and then you hook them up to whatever to do the function you need it to do alright so the function you need it to do most often it's switching an electrical load in the context of what we're doing here so this is a relay board ignore these three burnt-up relays that are missing it had nothing to do with the light show three videos ago this is a relay board they're cheap so cheap you can't buy the relays I think these are about ten bucks and they have optocoupler isolated inputs and so you can connect this or a Raspberry Pi or whatever flavor you choose directly onto these header pins thusly and then power it up and switch these loads using one of the methods I'll show you here in a moment so these are really great and I you could have used this you can certainly use this as to control my air conditioner I could have used this and I could have used this for the ceiling fan to switch the buttons but it's a little bit big if you're automating Christmas lights or you know the things in here for example I have two of these mounted beneath my seat in the electrical compartment they're great the great options but for our use they're going to be a little bit big and we need something smaller all right so there's some other bits and bobs that you will find useful perfboard is a fiberglass PCB material with copper traces on it they're they're really handy for prototyping I'll get back to that in just a moment but what you might find hand here is a breadboard like this and this is just a plastic block with pins and all the pins are connected this way but not this way and they're handy because you take whatever electronic bit you need jam it in there and then you need a relay driver chip get one of those jam it in there tada you got yourself a circuit sort of and then you get little jumper wires like this these are the fancy kind with pre stripped ends and little handles on them but you can jam them in there and make your connection from this pin to that pin and that's fine for prototyping proof of concept make sure your plan is going to work but once you know what's going to work then you'd want to use a board like this for a semi-permanent sort of installation so it's much the same the rows are connected this way but not this way so when you put a chip in there thusly and then you would solder it across the back then you've got good solid connections so that's a fundamental thing you kind of need to know about before we get into this too much I'm gonna glaze over some of the details this is not going to be an exhaustive how to automate something with how to solder and the the ins and outs of programming just an overview just so you can get your feet wet so another thing I really like about the way most modules is they're very low power so I can usually power them parasitically off of the appliance I'm automating so in the in the case of the air conditioner here I was able to take the voltmeter to the back of the control panel and just probe around and you can usually see pins on chips that are bigger than the others are the big capacitor next to them and find power now these run on five volts or USB you could alternatively of course just get a little USB power adapter from your old iPhone three plug in a USB and plug it into the wall and have it next to the item you're powering we're not doing that today but you need to find five volts of power so I've done that on that board so you have the five volts and then the second problem is the buttons so little diagram of a button here so there's some sort of magic Pixies in here and they want to jump this gap to over here but they can't jump the gap so there's a button and when you press down on the button it connects those two and all the Pixies go to the party and that's all well and good if you have a mechanical push button and you're thrilled with that but if you want to control it remotely we need to get those buttons pushed remotely now you could of course get a really long stick and poke the button with a stick but instead we're going to connect a switch in parallel with that other switch and so if you push this button or this button it's the same difference The Pixies will go this way or this way whichever way is most convenient for them taking this one step further we don't want it just another mechanical button so we're going to use an electrical mechanical button so this is the contacts in a relay this is not exactly how you draw a relay but suffice to say if a relay is basically this and if you put Pixies into this coil not both positive one has to be negative but Pixies into this coil the magnetic action of the magnetic electromagnetic coil pushes the button closed and so then you just need to put power into that relay and it pushes the button for you remotely if you know I relays work skip everything I just said now there are more complicated simpler ways to do that for example here's one board I wired up that uses optocouplers it turns out it didn't work and I won't get into why but it's basically the same thing as a relay it's a button but instead of a button there is an LED and the LED pushes the button that's not how it works but basically you put power here the LED turns on and closes the button that's really great because it isolates these two systems if you've got furious angry Pixies over here and you don't want them talking to your plate kinda Pixies it it has this layer of isolation that you don't have problems you know spikes feeding back into your IO stuff like that I'm not gonna get into a bunch of details I know there's better ways to do it that I'm going to show you today but I'm using what I have also I guess I will tell you the reason this didn't work is because the control board in that air conditioner uses +5 volts for a lot of the logic and negative 5 to switch the buttons and rather than trying to fetes around trying to make a negative 5 signal to feed to their little processor I'm taking the easy way and using little tiny relays so let's get into that so here's the basic premise of wiring this thing up for how we're going to do it we've got a we MOS d1 mini this is a 2803 it's a Darlington transistor array and basically this is exactly like the relays I just showed you or the optocouplers in that it uses a small amount of power to switch a bigger amount of power it's an amplifier and and the reason is these little the output pins on the way most aren't powerful enough to power the relays directly they just don't have enough power to switch them so instead we'll use the outputs from here to switch on the 2803 it has eight outputs so we can control up to eight relays and we'll use that to then power the relays i'll check out these cute little cuties found these 5 volt relays kicking around their signal levels so they can't handle a lot of current you wouldn't want to switch a light or a motor or anything with these I think they max out at 150 amps so they're tiny they called signal relays but they're cute and they fit the bill and they're tiny so I can drive a bunch of them on there and through the magic of TV swaps this is the completed module and now you can't quite see it because it's all soldered together but there is one of these 2803 chips right down the middle underneath the emos and then for relays down the side here one of them I had to turn sideways because I didn't have enough pins and that looks pretty Pro amazing the back not so much as I said these pads in the proto boards are all connected this way with the exception of these which go that way but they're all connected this way so that's fine you can run wires from here to there or connections from here to there but sometimes you need to go to the here to there and that's where wires come in and it turns into a big mess a rat's nest of wire this isn't actually that bad but something to to know you're going to you're going to need to place Sudoku or crosswords and if that's your puzzle you're gonna love this and so next step is to pull the control panel over the air conditioner great all right gotta make this quick cause it is hot out and without this board you see doesn't run so here's the unit single sided PCB makes it pretty simple and push buttons exciting so just to give you an overview of what I did to find power usually the last two pins on a chip usually our power but you get your voltmeter out and you probe around till you find power and I found five volts and I loaded it with one of the relays and it stayed on so that's enough for what we need to do all right so the next step is to find the contacts on the back of the board for the button that you want to actuate so these are very clearly on the back of the board here so you can hear as I push the button the voltmeter confirms that those do that sometimes going to the back of the button is the very easiest thing to do sometimes following it to a different trace or to a connector might be an easy way of doing it but I've done it already you can see here I've soldered just some legs of a resistor here and there and I use these quick clip clips just to clip on the Slee and then clipped onto our circuit board in the correct places and I verify it everything works so that's how I know this video it's going to be a success but now I need to actually do it so follow along in the fund you're gonna need a cheapo soldering iron this is a welder it's a reputable brand name middle-of-the-road quality sort of thing I'm going to desolder these resistor legs off of here amazing and I'll sort around somewhere so I didn't really show you this before but I installed a header pin connecter just one of the ones that came with filming most words they come in a baggie like this with various headers and pins so I just reused one of those utilized one of those for that all right so there we have it a bunch of little Inglot angley's on a connector and the next step is to hook them up to the Lord all right so then these are the output wires from the relays that is up the black wires up and the black wire is down the black way for fan control speed and of course black for power now let's go try it out because it's getting really hot in here alright so I've got the control panel installed back in the air conditioner unit you can see my header row here and I've got 1k one pin missing so it's keyed and I plugged the hole later so I can't plug it in backwards and it just plugs in obviously scavenges power from the control board and it's all powered up for aesthetic value I'll put the front cover back on oh so classy and then the current software I have installed on that Arduino way most board is the the advanced webserver demo which I'll show you more about later but suffice to say I just have a static IP address 192.168.1.1 and then if I want to [Music] push the volume down or temperature down button I would put the suffix down now of course just controlling it from a web browser at your computer and typing URLs and nerding out is it a practical way of doing it there are real reasons why you would do it this way they're called web hooks and I'll get more into that in the software later on in the video I did really glaze over a lot of the details of how I built this and how to wire it because it was mostly half done by the time I started recording this video but I do need to start now from scratch on the maxxair fan controller so it will have that detail coming up here next so let's go get into that okay at the maxxair fan now the first thing you need to do is figure out which buttons you want to press now on this keypad right here there's power open close fan speed up down and in and out and those are the buttons available before we get into that I just want to show you something on the control panel I rather the control board for this fan there are these Jack's provided for external keypad so you can purchase a volume up/down temperature up/down all those buttons on a little keypad that you would mount on the wall if your fan is too high or you want a convenient permanent button place and for that you would use a rj11 or the rj45 which is a Ethernet connection and it would just plug in there like that and while I could have bought one of those keypads with the buttons on it and reverse engineered it to figure out what was what I just got a dug out a cat5 Ethernet cable alright so having plugged in the Ethernet cable there I got one of these rj45 breakout connectors and it's basically just a a jack with the pins and using a breadboard like this we can plug it in there and then plug this in there and then get a little jumper wire like this and by jamming this in there and this in there like you can decode which wires do it do what and you know tell which buttons are which function unfortunately all the probing I did I can get on off to work and the temperature mode which just sets it to a temperature control so it just tries to maintain 72 degrees or whatever you set it to and it adjusts the fan speed to maintain that unfortunately I couldn't quite figure out how to get up and down fan speed working which is the most important ones to me and further I abandoned this whole method because you do me an up here you can see this cat5 cable whoops isn't gonna fit in here short of hollowing out a hole in my ceiling or you know butchering this cable somehow to get it to fit so I abandoned that pretty quickly so what I'm going to do instead is just hijack these buttons on the panel they come up to a point one header row and that just plugs in on the back of the control board here alright so if you're going to hijack some buttons you need to decode which pin is which button these are multiplexed which makes it one step more complicated I won't get into that too deeply right now but basically you get your voltmeter and set it to continuity test so that when the two contacts touch it beeps and then you connect the wires from your multimeter to the pins on the thingamadoodles and press the button and when you press the button if your wires are connected and don't fall off you can tell that pins two and three or rather two yeah two and three here are the power button on/off so then you would go through and and map that out and have that available all right so let's move now to the laptop screen I've got software called Fritzing and I'm going to show you how to wire this up welcome back everyone let's get right into it this is the software I'll be using called Fritzing I've used it in the past and got a lot of questions so and I didn't mention what software I was using so I will today Fritzing go look it up it's available for Windows Mac OS and UNIX which I'm using today and when you open a new project you start like this with a pin board red board and you can take your resistors and plug them in there and visualize what you're doing these are of course physical prototyping tools you can buy and have and I recommend having one but they start you off like that I'm not going to do that today but just to show you really quickly let's take a Lemos module zoom in a bit there and relay names relay and it's a bad example really but whatever and a 7805 regulator that's a nice one there and so positive voltage goes in here this goes to ground and 5 volts goes from the output to me Mouse you get where this is going connect all your wires and and visualize your connections and review them what's real also really nice is you can go to the schematic and see here the the bus lines and route whatever you need to wrote this way if you want to connect this to here which you would never do you can do that and then when you go back to read board mode it has this wire that it knows you want to connect but you have to then visualize it so that's cool and it does PCB layouts as well showing these vias you need to connect to you can route them however you want it even auto roads so that's that it's kind of a neat free program so go check it out now let's jump to what I already have a work in progress all right so this is the project we have for the maxxair fan controller button-pusher over Wi-Fi and I've laid out some of the components here just to speed things up but basically I've got a voltage regulator I've just prototype this with the 7805 although I will be using a switching voltage regulator I'll show you in person in a bit but the premise is the same 12 volts in here five volts out here and of course you need a ground that we most v1 mini shown here this is the 2803 Darlington driver array and the five relays shown to scale with all their pins shown the sleeve and the maxxair header pin we need to interface to so very simply this tool allows you to well first you'd go into schematic view and layout all of your lines you need to make so let's look at this relay this is part of the relay here is the coil and when it receives power it closes this switch so that's the part that's not really shown in the breadboard view it's kind of hidden behind the generic relay image but these two connections here I'll zoom in on this one this connection and this connection are the coil and so if you add power to one and ground to the other it will close the coil and make a connection between these two switched pins so we'll just we'll just do one two to make my point here so this what's happening is the Lemos will send out a positive voltage out of d 1 into this pin and that will switch a negative voltage out of here slightly amplified enough to power these relays and so that will come out of here a negative signal and negative voltage ground and then here on the other pin of the relay we're going to need to provide five volts okay so I just fast forwarded through that but you can see here on the red wire and providing five volts to each of the relays daisy chains from one to the next and runs back here to the output of the five volt regulator and then each of the relays will be provided to ground by this Darlington array and that's shown with these wires here and we need to make them real so we'll do that real quick and even though I finished the air conditioner circuit board without doing this step by drawing this diagram to visualize everything that did cause me some problems and remembering which pin was which and what was connected where so I'm happy to be doing it for this one it's gonna save me some time and help me illustrate this process to you guys so what i'm doing here is completely unnecessary but I've color-coded the wires just for clarity you can see D 1 D 2 D 3 and d 4 and D 5 are the i/o that will be feeding into the Darlington array again this voltage will go high 5 volts and then this Starling tune driver will amplify it and send a much higher current down these wires and flip 30 lights so when this pin turns on it turns this on which turns the relay on and then in turn the coils these two contacts on the other side of the coil will touch together so as I showed on the up on the bed there with the control panel off of the fan you need to map out what which 2 pins you need to connect on this header to achieve the function you want to do so I've written it out here on the list pin 1 is connected to pins 3 2 to push the temperature with a fan speed up button and pin four for the the down button it's either speed or temperature and gonna fumble all over that this whole time I suppose but let's keep this the right color it's going to be orange just to keep the function straight here in our heads and then in for is the down button and it is blue wonderful so now when this relay is actuated it's going to connect purple to orange or pin one two and three and that is up the fan speed up button and when this relay is powered by this blue wire when this relay is activated it's going to connect the blue to purple or pin one to P and four which is down so I'm going to go through this now and make the rest of these connections in fast-forward okay there we have it so 7805 regulator powers this Holstrom özil and the outputs go through the amplifier get amplified power the relays which click contacts closed and this whole maze is what is appropriate for my max fan that we're trying to control and this is a little bit too juvenile and colorful crayons and such but it's sometimes more simpler to read than a full-on schematic something like this which has overlapping lawyers and you can't quite follow stuff quite as easily so if you're starting out this is a great way to do it a great visual guide for when I go to actually solder this all together alright back to reality here everyone I've got the computer here with a diagram so I've just shown you I'm just gonna keep that up as a visual reference to keep me in check as I'm doing this for those who aren't following along with our whole journey we were actually in an RV traveling through Mexico so I don't have all of the perfect equipment along with me I'm working with what I have so I've got a makeshift solder stand out of a truck of angle iron here aluminum rather but this is what we're up to going to connect these five relays and the uon 2803 Darlington array to the board so there's show you a bit of that although I'm going to cut and maybe show you some interesting bits but I'm not going to make you watch the whole thing so that's good to hear all right there we have it the driver and the relays all wired up and at this point I like to take just a pair of flush cutters and nip all these pins right down to flush with the board and the reason for that is I need to go in between many of these pins with the little demo and a little die grinder and mill bit there and cut some of these traces in between for various other jumpers connections we need to make and sometimes those pins get in the way further they're sharp and pokey and they will poke you and also there's some risk that they'll cut through the you know any other jumper wires you have and what they might cut through the insulation so it's probably not recommended or taught in any other book but I like to do it okay guys there they are all Jim nice and flush and I will re solder go over resolder all of these once I've done closer to done but now I'm going to go to my drawing on the computer and note some of more connections that need to be made so in nine needs ground so I've just made a little note here to make a jumper from here to there and all of the relays you need power shown in the red wire on that diagram so those are all these pins so they're there so all of these little blue marks I've made will jump that connection from each of the relays to this horizontal plane which you can see is the five bold power so all the relays will have power and then I just need to connect from the output pins of the Darlington array to each of the pins on my relays but first I need to go outside and do some trimming so it's unibit alright guys so today is tomorrow I've got the circuit board all figured out here it is a little bit of a Sudoku word crossword puzzle to wire this because you're limited in one axes but I got it all wired up it's not the most beautiful board I've ever done but it was pretty tight getting it all on there as you can see I've got all five relays on the one side of the board there with the 2803 and it just worked out best to have the we most module back packed on pins on the back there one other little change I did was the circuit board for the max fan as the connector here on the bottom for the keypad buttons and I just soldered another row on the backside of the circuit board so that I can actually just plug this right on like that so that fits nice the only catch with this is the corner of the circuit board extends out past the edge of the original circuit board and it doesn't fit into the into the fan housing like that we could trim it but it's a very sensitive electronic alright so a few days has passed I've been fooling around having some fun with the programming as you can imagine it's all installed and put back up in the ceiling here and I thought we will get into the programming and the software here in just a second but I thought I'd show off some of the the functionality I have now so ok Google turn on the fan here's some fan action for you so as you can probably guess I've voice-activated all functions I can say set the fan speed to 8 it's already set to eat ok Google set the fan speed to 3 so if you have one of these fans you know that you can set the fan speed up or down and the direction to in or out but there's no indication as to what it's currently set to and and even for in and out it's hard to tell especially on the lower fan speed settings if it's blowing in or out and so I've added variables to all the states that are toggling so the on/off dirt fan direction and the lid which you can open and close the you can open and close them independent of the state of the fan so you can leave the fan running and close the lid if you wanted to we rarely do that but the other thing is the fan speed it's indicated and stored in a variable in Lumos and online that you can see what the fan speed is and that's really nice if you are away from the truck this is not so amazing if you're sitting here but if we're out and about and we want to check the temperature of the inside of our truck which we can do here and then say oh we need to turn the fan up then we can do that and see what the fan speed is and it's setting and the other nice thing is rather than pushing the down button seven times to achieve the the low speed that I like at night I've saved a variable with the fan speed setting so it knows what its current fan speed is and if I slide the slider to ten it hits the button nine times and and takes our 8 to 10 so that is that direction and I will - trust me it all works and the air conditioner I have wired to blink right now as well so we can close the ceiling fan turn on the air conditioner and if you heard a kick in there and set the temperature down it's already at the bottom so yeah it's all working good let's jump onto the computer here and I'll show you some quick code examples I know this video is getting really long already so I might need to give a fairly abbreviated explanation and if there's any interest make a supplementary video alright so getting into the programming end of things the we most d1 mini is an Arduino variant and to program that you will need the Arduino IDE it's a free download you can go and get it from the link in the description one in the first steps you're going to need to do is to use the Wemo sports is go to file preferences and additional board manager URLs is at the bottom here you're going to need to paste in that link from the description and basically what that does is just tells the arduino ide about all these extra boards that that you might want to use i'm actually using the d1 mini pro which is the external Wi-Fi connector on there but you can choose the one you have probably the d1 mini and the second little thing you need to do is include libraries so you would click under sketch include library manage libraries and it'll pop up this this fun times and you enter blink BL ynk and at the very top comes up the blank libraries and you install the newest version works fine click install I've already done it so it's grayed out for me and let's get right into a first example real quick click file examples basics and then blank BL I NK is in to blink and led as not to be confused with BL Y and K which is the the MQTT service we're using for this we'll get to that anyway on screen you can see a very basic 36 lines of code including 19 lines of comments and basically this has a setup line on 26 meaning this is the set up stuff that happens when we turn the thing on and all it's happening is it's setting the mode of the pin of the led built-in pin to be an output very basic and then a void loop which basically loops through that code until forever and what it's doing here is writing led built-in to high meaning it's turning the power to that pin high or on delay of 1000 milliseconds and then digitalwrite that same pin low and then another delay of thousand milliseconds so very obviously that's we've got a blink the LED once per second so I will up here click the upload button takes about 3 or 5 seconds to upload serial port not connected you need to go in here and our tools porch and check that you've got your serial port selected in my case USB zero you'll also notice at this time I have these network ports and I'm not going to dwell on that I don't have time in this video but another really really really really cool feature about the eight 266 based we most boards is they have over-the-air updates so even though I've installed this soldered it up and installed it up in my roof I can still update the software over Wi-Fi if I want to make any changes in the future so that's what you see here is the over-the-air update ports or Wi-Fi update ports for the air conditioner the max fan as well as the relay board that I'm just playing around with here yeah but for this one for right now I'm gonna click USB 0 and push this again should work better this time there we go connecting writing you'll see the LED blipping as it's programming and then blinking once per second as expected alright so for the next example I'm going to show you blink we installed the blink library already and I will put up this sketch on the website so you guys can download it and play with it if you want and but first and foremost what you need to do is go and get the blink app this is on the App Store and Google Play Store and it's kind of a cool building block deal where you can pause your program add a button and just a new button shows up here and you can drag and drop it and and fit it to whatever you want and then you go in here click on there click on Lemos module is the target thing you want to control pin actually I'm using virtual pins pick a fun one 27 seems like a good number and yeah it's a building block for making a little app that's really slick so you got that you get an off code when you set this up and they just send it to you by email and then you jump into your Arduino IDE in here you set up the constants of what you're controlling I'm just calling the relays one through eight you paste your auth token in here under the auth token line your Wi-Fi credentials go there and I'm not going to dwell on this for very long let's just show you you program it to USB just as I did and then amazing and if you want to go in here now and rather than having that a momentary button let's say it's your lights in here you want it to stay stuck on you'd click the switch mode to switch and then play again and then it sticks hopefully you guys can see and hear that relay clicking so that's that and that in fact is exactly how we do our lights in here and the other fun thing is web hooks so the trickery I was showing you before where I say okay google turn off the lights okay you can see it turns off that pin and so let's get into that next all right so how do I get it to work with the goggles with web hooks is the short answer you remember at the air conditioner there when I first demoed the advanced web server sketch you would just go to the URL or IP address 192.168.1.1 that little section of code to turn on the air conditioner now you could do that using the Google assistant if this and that method I'm going to show you in a moment but it requires you porting through a firewall and some other rigmarole so I prefer going through the blank API so going to the computer here blank has this API which allows you to set a pin value or write to pin value and basically you had paste in your auth token right here and whatever pin you want to do let's say ours is v1 and call that resource and you can see here that is the URL that you would call with the web hook so then let's go in here let's make a new Google assistant event thingy you click on explore it's super buried and this is the only little place where you you find it and it's not well indicated but click the plus button there and if this then that works on that simple logic if this and in this case we want Google assistants to be to this say a simple thing what do you want to say on another way to say it turn the and on another way to say it turn on the fan and what do you want the assistant to say boo or whatever you want it to say and then you press create trigger and then there's the that function what happens if that happens well that's easy web hooks make a web request and you just paste in the URL for what you want it to do now I've blurred this out because this is my off code so you want to keep that secret there is some chance that somebody could hack and and try every possible off code variation until they've turned on your ceiling fan so again you wouldn't want to use this for your starter motor on your engine or the self-destruct button at your house but for turning a fan off and on the odds of that getting hacked are pretty low your results may vary but anyway you put your URL in there that I just showed you how to get on this blank API page and get and then did a press create action and that's it now it is a little bit tedious because you need to go and do this for every possible function turn the fan up down you know power on power off all those things so it does take a little bit of time but not too hard and that's all it takes to do the webhooks and that's that's the funnest way to do it it's the most impressive all right guys it's got way longer than I intended and I know I didn't hit all of the questions perfectly on the head I did try my best given the time we have here so maybe if there's enough interest I'll do some more videos in the future you know one concise little project like our fan for the fridge controller for an example or you know just the relay board or something a little more concise about the Raspberry Pi and Python and how that's all controlled using blank it's just overwhelming how much stuff there is to talk about and how long winded I can can be so thanks so much for watching I be interested to see how many of you make it to this part of the video leave a comment down below saying that you made it here that would be a hoot oh I forgot about that other thing yeah I was going to show you how I was gonna do this yep this happens let's say we get a new YouTube channel member there we go new member so if you join our channel by clicking the join button down below let's do that let's do a web hook and change the state of our fan boop-boop-boop yep create action they're done this is very real I'm gonna leave this turned on until the end of April so if you join the channel by clicking the join button down below you're gonna turn our fan on Full Tilt alright back on the track here I'd like to take this opportunity to thank all of our existing channel members Colorado 4x4 van Lorie Berg Mike Fischer Scott the ozone guy hey-zeus Rodriguez Finn coaching and Tim rotunda I hope I said that right those are tier 2 & 3 channel members it's your contributions that's Pat us on the back every day and get us out of bed to make videos like this so thanks so much to them thank them down in the comments below if you got to this part of the video if you're interested becoming a channel member you can click this little join team member lenders button coming up here right away and thanks so much for watching we'll see you next time you
Info
Channel: Everlanders
Views: 88,892
Rating: undefined out of 5
Keywords: Automating with python, Automating with arduino, automating with raspberry pi, wemos d1 mini project, wemos d1 mini tutorial, Raspberry pi in car, raspberry pi in rv, how to solder, automation with IFTTT, Google Assistant Automation, ota program arduino, Hacking Maxxair, MaxxAir remote control, MaxxAir Pinout, MaxxAir RJ45, MaxxAir RJ11, Automating RV, Automating Overland, Arduino Tutorial, Arduino Relay, Arduino to push button, Blynk Tutorial, Blynk Arduino
Id: aS3BiYaEfiw
Channel Id: undefined
Length: 53min 14sec (3194 seconds)
Published: Mon Apr 06 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.