 Okay, this is part of a series. Be sure to check out the annotation on the screen for the full playlist. I recommend watching the previous videos because we're already moving along here. I'm already logged into my Cancun smart plug through SSH and so far we've been accessing it as if it was its own wireless access point, its own network, but we need to get it hooked to our wireless router so that we can access it from a computer or really anywhere in the world if we wanted to rather than having to disconnect from our network and connect directly to it. So the way you do this, I have some notes right here that I got from a website which there'll be links to the credits and these notes in the description of this video. So first thing we need to do is look, we need to look for this file. Etsy config wireless so you would just vim that file. I'm not going to go into it because within it in plain text is my WPA key but basically when you go in there there's going to be some things and there's going to be a section called config wi-fi interface. So you're configuring the wi-fi interface here and by default it's going to look like this and that's set up so that you can access it as an access point. So what you're going to do is you're going to delete all that and you're going to change it and replace it with this information which again check out the link in the description you can copy and paste that in there and then with this you're going to change two things. You're going to change where it says ssid to be the name of your network so if your network's called linksys you're going to put linksys in there. If your network's called bob's house you're going to change it to say bob's house. Whatever you see when you go to connect to your wireless network from your tablet, laptop or phone you'll put that in there and then you'll also put your WPA key in here. At this point you save that file by hitting if you're using vim control or sorry escape colon wq and hit enter and then we need to go into another file which we will actually go into here and so vim etsy config network. So in here you'll have all this already in there and what we're adding is these last two lines. So this is telling the the smart plug which is a computer at time of boot start up these networks the loopbat network I don't really know what the global network is and a LAN network there's no physical LAN plug you can see on this thing but it appears that there is a ethernet chip on it I guess directly you crack it open and probably solder a physical connection on there but there is a chip in there because it is showing up with if config and then here we're saying okay at start start up this interface wwan the wireless network and we're just going to put option proto protocol DHCP this is saying okay when you boot start up this interface and use DHCP which means ask the router uh that you're connecting to four IP addresses so you can do that you can also do something if you look at the example up here for the the ethernet plug you can set yourself some static uh IP address so instead of DHCP you can say static and then assign yourself IP addresses uh because you are going to want a static IP address but I choose to do DHCP on this device and then my router actually has an option called reservations DHCP reservations where I can say okay anytime a device with this MAC address connects to the network assign at this IP address and I just chose to do that uh this time uh with this device so either way you can either set static devices down here or you can go into your router even if you do DHCP most routers will assign the same IP address to a certain device every time it connects although if you don't tell it to do that specifically it may occasionally change and then you'd be like oh I have to search for the device again anyway so we're saying turn on this device at boot time and uh then use the protocol DHCP to get an IP address and then it's also going to look at the other file there for other settings that we already set at this point escape colon wq enter so we saved and quit out of it and now at this point uh you would restart your device so we could type in reboot and I could do that because I've already done this on my device and um if I have config you can see not only uh do we have here this is uh the bridge land deal we got the ethernet we got the loop back and then we have our will and zero and it's been assigned an IP address so now I can take that IP address go into my browser type it in and it will bring me to the index which I've added stuff here that we're going to look at in the next tutorial but that is how you connect to the network now after making those changes you restart the device um and let's say it does not connect to your wireless network what do you do at that point well if you watch the last video on troubleshooting hold down that power switch on the on the plug itself for five seconds or so let go and it'll factory reset it we'll take about 20 seconds or so to reboot and then you can connect to it as an access point again and try again so you don't have to worry too much about screwing this up really at all with what we're doing here because you can always factory reset it um if you keep trying and it's not connecting then you either type in something wrong or there's something wrong with your settings on your wireless network um but no need to fear about screwing up the device because you can always factory reset and connect to it as an access device but hopefully once it reboots it'll connect to your wireless network you can scan for the ip that it's at and then connect to it just like we have been either through the web browser or through the ssh connection next video we're going to look at we're going to take uh a look at making a nicer web interface we've already played around with that a little bit but to make something that's nice for a touchscreen so you can turn the light on and off with ease or whatever you have cooked at the plug uh you can turn it on and off with ease with a tabular phone just by clicking a button so i hope you're enjoying these tutorials on the the smart plug again for 15 to 20 it is a great little device um and like i said even it has a pretty full version of busy box on here with pretty much all the tools you would need and um it's just i like i said i'm loving it a lot better than some arm devices that are a bit more limited uh out of the box so thanks for watching please is it filmsbychris.com that's chris the k there should be a link in the description also links to the notes and scripts that i'm using in these tutorials so you can go to that link and get hub and get all the information that we've gone over in this tutorial and previous tutorials and as always i hope that you have a great day okay this is an introduction to filmsbychris.com i'm chris that's chris the k that's me right there my daughter ember and my wife jennifer we pretty much live in the swamps of florida i'm a firefighter by day as well as by night we work long hours but that's not why you're here you're here about the videos i put up on youtube these videos are mainly about computers and programming which means most of my videos look something like this and if that's what you're interested in great if not that's all right i do videos on other topics too such as video editing special effects photo editing 3d design and music creation if you are one of my viewers and you enjoy my videos my patreon page is a place we can go to help support my videos so i asked that you take the time to go to my patreon page and look at different levels of rewards you can receive four different levels of backing there should be a link in the description of this video if you were watching it on youtube otherwise you can visit patreon.com forward slash metal x1000 and i thank you for your time and your support have a great day