 Hello and welcome to this video by filmsbychrist.com. It's Chris the K, there's a link in the description. In the last video I talked about a script that I had that allows me to highlight and copy URLs to videos such as on YouTube or direct links to videos. And with a few keys, send them to my Kodi box on my TV for my kids to watch. And that's great for getting the videos playing, but how do I control it? What if I want to skip ahead, rewind? I want to control the volume and such stuff such as that. Well, I have actually created my own web interface that's running on my web server. So here is my phone. Let me go ahead and adjust this so that it's hopefully in focus. And I'm gonna hit this Kodi icon here and it brings up a little web app that I have. And here I can select stuff and I can start playing videos. I can quickly control the volume like this, which is great. And I just put the basic functionalities on here. If you can see these, let's bring it in a little closer. Can we focus this? I'm gonna go a little further back. Okay, I can do on screen display to see the information on the video. I can go jump ahead a little bit, jump ahead a lot or back. The back and select is for controls to the menu so I can hit back and back and it should start bringing up the menu, back. I can go select to select an object from the menu. I can use up and down to select different things. You can see it's very responsive and it's just doing HTTP request to the web interface that's already built on there. So I do have the web interface on Kodi enabled as I talked about in the previous video, but I hated the interface. I tried three or four different ones and maybe there's a good one out there but I couldn't find one that I liked. I can go down, I can go up, I can play, pause and I can stop videos. So that's what I have. So that's great for controlling the Kodi box. And I control the volume on the Kodi box. I can again do all this functionality. But what about when the TV's off? Do I have to get up to go turn the TV off? Also I should also mention, let me go ahead and play a video here. If you can see this at the top, it actually, did I select a video? Oh, select. I actually have a timestamp there so it tells me how long the video is and how much is left, how much is played. But again, there's an issue here. If the TV is off or on the wrong source, these top five buttons actually control the TV. Well, how do I do that? It's not really a smart TV. It is running Linux, but it has very limited functionality. Well, that's where hardware comes into play. So right here, I actually have this little plastic box which is the box I had. And inside it is an ESP8266 which is a cheap little $3 microcontroller that has built-in wifi. It can be used as a server or a client and it can receive or send HTTP requests. So basically I have it set up so that it will receive an HTTP request with a code for the remote control. So again, the TV normally has a remote that has IR. So I have this little infrared admitter LED. So I have a $3 microcontroller hooked up to a cell phone charger, a USB charger, which is probably $3 and a little LED that costs pennies. So I have about $6 worth of hardware here. And now I can use HTTP requests to send codes to this that control the TV. And the codes aren't hard-coded into it so that if I get a new TV, I don't have to make any changes to this. I just change my web interface to send different codes to it. So now with my phone, let me get that out again, I can do things like the volume control. Before I was doing volume control on the Kodi box. Well now I can do volume control on the TV. I can bring up the menu. I can do source to change the source. Or the one that I use the most of the time is this red power button. And when I press that, it turns the TV off. Essentially, allowing me to control everything from one interface, both the Kodi box and the TV with this one web interface. Now again, I've been doing this from my phone, but since it's a web interface, there's nothing I have to install. I just go to a URL. I'm gonna click the power button. And I can be anywhere in the house and press this. It, the little red light's flashing. It takes a second for the TV to turn on, but it is turning on. And, but here is my Chromebook here. Let me turn off autofocus and try to focus in on this. And it's the same exact interface. So I can have this on my desktop, laptop, anything that has a web browser, I can go to this. And if you look right here, that's the URL. You can go to this right now if you wanted. Filmsbychrist.com, forward slash scripts, forward slash Kodi. You go there and you will get this interface. So you might not be thinking, oh Chris, anyone control your TV? Well no, because in the code is the IP address for the Kodi box on my local network. So if you're not on my local network, it's not gonna be hitting my box. So if you want to use this interface, all you have to do is set up your Kodi box and give it the IP that's in this code or download this code and change it to point to your IP of your Kodi box. And then you can control your Kodi box with your devices. That's all you have to do. You don't have to install anything. If you look at this code and actually let me go ahead and bring up the source code here. And so, so yeah, right here, let's go ahead and try to focus on this. Again, this is running on my Filmsbychrist server. But you can see there's an IP for the Kodi box, an IP for the ESP8266 and what port we're using on those devices. So if you set up your devices on the same port, same IP addresses on your network, you don't have to change anything to this code. You can just go to this URL, save it and now you can control your devices. If you do have different ones, you just download this HTML, put it on your own server, change those IP addresses and you can now control your devices on your local network. And it's very simple to do. So I hope that you enjoyed this video. I use this remote daily, multiple times throughout the day and it's great that whether I'm laying in bed using my tablet at my desktop computer or with my phone, I can control my TV. I know what videos are playing. I can fast forward my mind. And again, Kodi has its own built in web server and you can get different, different, what's the word I'm looking for? They're not really templates, but different interfaces for it. I just never found one I liked. So I just wanted something very simple that looked like a remote and that's what I did here. And with an ESP8266, which I can't talk enough about how much I love those devices for $3, I feel like I'm very low in the camera. For $3, you have a web server or client that can control devices. And again, for $6, I can now control my TV. That's not a smart TV from any web browser as long as I'm on the local network. And directly, if I was anywhere else in the world, I can tunnel into my local network and use the web interface. And of course, it's HTTP request, so I can use WGet or Curl or whatever shell application I like to do web requests. And I can actually turn my TV on and off with a few shell commands if I wanted to. So I can SSH in from anywhere in the world, Germany, China, into my local network and turn my TV on if I want. And it was $6 worth of hardware. So if you don't have an ESP8266, definitely go to filmsbychris.com and search for it on my channel. I have a few videos on setting it up. It's very easy to use. It's very much like in Arduino. You can use the Arduino IDE and you can program it and you have a $3 web server slash client that can work as an access point or connect to an access point. So I thank you for watching. I hope you find this useful. Again, filmsbychris.com, forward slash scripts, forward slash Cody, all lowercase, will bring to this web interface and you can actually see it exactly as I have it. And again, it won't control my TV unless you're on my local network. So, but anybody if I have guests over, I give them access to my local network. I can be like, here, go here, you can control the TV for some weird reason. Anyway, I do thank you for watching. And as always, I hope that you have a great day.