(Beginner Friendly) Home Automation using ESPHome & Home Assistant | ESP32 Projects | Raspberry Pi

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
who welcome everyone to another episode of home assistant series and in this episode we'll be making our own home automation project without writing any single line of code yes by this project you'll be able to control up to four ac appliances using mobile dashboard and also web dashboard using an integration in-home assistant and you can control those appliances from anywhere in this room within local area network only so this video i'll be guiding you everything about how you can make it without having any knowledge of coding so sit back and enjoy this journey let's get started now before starting the video let me tell you an amazing feature of our sponsor ltm which is a pcb designer based software company and that feature is called as interacting with customers using ltm you can easily share your pcb design file maybe 2d or 3d and even schematic by just adding that email id in the list the client will receive a link using which he or she can easily visualize your schematic and pcb files without downloading any software on their system isn't this hassle free well even you can try out this and many other features of ldm designer software for absolutely free by clicking on the link mentioned in the description yes by clicking that link you will be getting an access of a free trial version of ltm designer software and if you find it interesting you may purchase it later on okay so coming back to the video so here first of all we'll be configuring our home assistant dashboard account because we need to add an add-on to support it for the home automation project and what's the add-on and how to add that let me guide you so first of all i'll go to my home assistant dashboard page by typing home assistant dot local colon eight one two three now here it will be asking me for username and password so i'll quickly log into my account now in case you don't know how to install home assistant uh what you can say image or what you can say os file onto your raspberry pi board to watch out our first episode of the series in which i have guided everything about this particular installation part okay so here i am logged into my account which is pretty neat and clean because i haven't added any of the widget except this weather widget okay so now to add the add-on you first need to go to the configuration option and here you need to go on to the add-ons part go to the add-on store and here are the add-ons that you can add to your home assistant account to you know make any of the iot project okay so here i'll search for esp home now esp home is such an add-on to home assistant which will help you to you know control your home appliances and not only that you can also monitor the sensors data and visualize it into this home assistant dashboard and this is open source as well and the most important and the most uh what you can say amazing thing about esp home is you don't need to have any coding knowledge no python no c no c plus plus nothing it's very easy to use it's it's beginner friendly as well as it doesn't require any prior knowledge okay so we'll be using the esp home platform here so after clicking on this you just need to click on the install button i'll click on the install now it will take some time to install it so i'll quickly fast forward this video okay so it is successfully installed onto our account and here uh it will be starting on board and that is tick mark here and that we want of course and we also want to show in sidebar that means here okay so i'll click on this button and as you can see the esp home option appear here so it will be easy for us to configure it so i'll turn on this button that's that's pretty much it now you can click on the start button so it will start running the esp home onto the raspberry pi board okay so it got started running so now i will click on the open web ui button which will take me inside esp home okay and now here we can add devices so let's start adding the first device so click on the new device button click on continue here we need to name our device so i'll name it as esp okay click on next button now we need to select which esp board we are using so we are using the esp32 board in our case i'll select this only click on the next button and congratulations uh you have successfully added a device here i'll click on the skip button here now here i'll click on the edit button which will open up kind of a text editor you can say which is written in dot y a ml format now what is this actually so this file contains all the details about what sid name and password you want to connect your esp device with and what uh which pin you're using as an output which pin you are using as an input everything we need to mention in this particular file which after writing it it'll be uploaded inside our esp32 board okay so it's not a coding it's kind of defining every input and output and credentials okay so here first of all what we need to do is we need to define the board name here which is defined as esp32 dev board but here we are using the do it david v1 board so we need to type in that particular format now in case to check which uh what what is the tag of your particular board you can go to the esp home website i'll quickly take you to the esp home website okay so esp home dot io is the url and here you can go inside the esp32 board and here click on this link okay so here they have the list of devices and their particular tags so you can copy from here and paste it inside the yaml file in my case i'm using this particular board so i'll click here to copy and i will paste that id here completely fine okay so that's my board which i'm using after that here to provide the siding name and password which is right now inside my secrets file okay if i open the secrets folder in a secrets file it is mentioned here so what happens is whenever you are initializing this esp home for the first time it will ask you for this asset name and password as i already initialized this before starting this video it's already created in my secrets folder okay so if you're doing it for the first time it will definitely ask it to you if it is not asking to you don't worry i'll still let you know how to do that okay what you can do is here you can remove this line and add your own sad name and password of your wi-fi router that will also work completely fine okay so i'll quickly write that credentials here great okay so we applied the wi-fi credentials we have provided the board name and now we need to provide which pin we are using as an output now as we are controlling four ac appliances we need to provide four different pins here and you have to declare it as an output so how to declare it well everything is mentioned on the esp home website i'll quickly take you to that particular page so here we have different type of sensors here so if we are using any of the sensor you can just click on that particular sensor and you will get a ready-made script for that particular thing i'll let you know one example okay so here's the ct the current uh or what you can say the current sensor basically if i click on that current sensor uh it will open up a page on esp home website and here is that script that you to mention inside that particular code to read the data of this ct sensor okay in our case we are using a relay which is nothing but a binary device we can turn on the relay we can turn off the relay so what i'll do is i'll go to my uh what you can say light component and i'll click on the binary light option okay okay so here is the binary light option and we need to write these particular things to add a button inside our home assistant dashboard using which we'll be able to turn on and off a particular gpio on our esp32 board okay so what i'll do i'll quickly copy this thing and go back to my home assistant page and here i'll paste the thing that the simple uh lines you need to add to make your home automation project so by writing this line you can easily control the gpio16 using the home assistant dashboard via a button okay but what we what we want is we want four different buttons to be controlled or four but different relays to be controlled so how to add the four different devices let me guide you okay so first of all let's just modify this thing so i will remove the name as a desk lamp i will rewrite is at light one okay similarly what i'll do here is i'll write here as gpio15 okay now to add a next button okay what we can do is we just need to copy this particular line of code we can see but it's not code actually i'll paste it here and similarly i can write light 2 similarly i can write light 3 and similarly i can write light 4. okay pretty simple we have created four different uh light variables you can see similarly for the output side we need to change it here okay uh also i forgot this thing it will be light to output one light output two light output three light output four now here you notice something there's a cross icon appeared here so this particular yml file is kind of you know checking the errors in real time while writing the code itself so it says there is one error there is no such light one light output one declared inside the output side okay so that's the error but it will be soon solved if i write output one here as you can see this error got solved similarly what i'll do i'll add four different output part as well for four different gpio pins okay it will be light output two which will be at gpio2 similarly i'll write a light output 3 which will be at gpio4 and similarly i'll add light output 4 will be which will be at gpio22 as you can see there is no such error on this particular yml file and this uh this these lines you need to add to control a particular gpio pin using home assistant pretty simple right so yeah that was all about wanted to do on the home assistant side uh talking about the script okay but as i mentioned this 15 to 4 and 22 gpi pins so why like how i and how i decided these pins well i already designed my own custom design pcb for this home automation project whose order i gave directly to jlc pcb so even you can try out jlcpcb for your custom pcb design uh project orders by just uploading the gerber file of the pcb project select the color masking if you want it and just pay for your order obviously like the fastest delivery option you may get the pc was delivered within seven working days so do try out glc pcb for your next pcb purchase after receiving the pcb you one by one shoulder all the components on it and well if you select the smt assembly service of the glc pcb you don't even need to shoulder any components on it because they will give you all the components already shouldered on the pcb we already ordered one of that pcb with assembly assembly process so stay tuned and subscribe the channel i'll be soon making a video for that as well okay so yeah we got the pcb ready by shouldering all the components which look something like this so as all the relays are connected to this respective gpr pins i have mentioned those pins here okay so i'll now let's see how to configure the home assistant dashboard okay so first of all i'll click on the save button here and now i'll install this into my esp32 board now how to install it well you first need to connect that esp32 board with the raspberry pi board on which the home assistant server is running okay after that just click on the install button and select this third option called as plugged into the computer running the esp home dashboard okay so i'll select this now here is the port on which the esp32 is connected i'll click it and as you can see it started compiling that particular code and it will soon start uploading the code onto the esp32 board but make sure you press and hold the flash or the boot button on the esp32 board so that it can initialize uh the upload process okay okay so now as you can see the code got uploaded successfully and it started running the code as well here as you can see it got connected to the wi-fi network which is nothing but the sms underscore go5 okay so not successfully connected it's successfully running as well so the esp home part is kind of completed now you can click on the stop button and by clicking stop button you're not actually stopping the esp home or home assistant or esp32 here just closing this log you can say okay click on the stop button here inside the notification ma i can you can see we have discovered new devices so the new device is already discovered by our home assistant platform and you can check it out here let's check it out and here is our esp device that we have configured click on the configure button to add inside the dashboard click on the submit button and yeah it found one device i'll add it to a new area called as a studio click on the add button and i'll select a studio still didn't appear let's just try once more time click on add studio is already in use wow great but studio is not visible here let's just go with the living room and click on the finish button you can see one device with four entities is added inside our home assistant platform okay and four entities are nothing but the light one light to light three and light four and now we can add this inside our dashboard let me show you how click on the overview button uh click on this icon and uh let me just show you okay click on this icon to add a dashboard click on add card and here as you can see the entities appeared here i can select this which will help me to turn on and off the three different lights or i can select this to individually set the light let's set every light individually i'll click on this button click on the light one option only okay and yeah everything is pretty much fine click on the save button as you can see the light one widget added successfully and similarly i'll add the other three lights as well okay so we successfully added all the four lights and now i can click on the done button and we are done with configuring everything inside the home assistant dashboard and with the esp home as well now what i'll do i'll quickly take out the esp report from the raspberry pi board and insert it into the pcb project after that i'll connect all the appliances with the pcb project and now let this power up the project and let's see this in action now when i tested the first demo there was a little problem which was when it turned on the appliance from the phone it was turning it off and it was happening vice versa so there was a problem of inward logic so by adding one single line the problem was all and that single line was here i went inside the esp home section and here i clicked on the edit button and on the output side i just added this line called as inverted colon true in all the four output devices and by installing this code the project was working pretty much fine so let me show you the working demo of the project come along with me okay so here i have downloaded the mobile application of home assistant whose link i'll mention in the description of this video and here is that hardware setup so let's try to control all the bulbs using this phone one two three and four so as you can see i'm able to control all the four bulbs using this mobile application and the latency is very very very less and it should be very nice because this is all running in the local area network only and we can control these all bugs using the web dashboard as well using a laptop let me show you that as well so here's the laptop dashboard and as you can see i'm able to control the lights from here as well and the real-time response of this is happening reflecting inside the mobile dashboard as well so we can control from here and from here we'll be getting the feedback on both the site so that was all about the project so that was all about making your own home automation project using home assistant without writing any single line of code and while writing those descriptive lines is not considered as a code come on right and yes we are still left with so many things to be made using home assistant like controlling appliances google assistant cd alexa and so many more also do let me know your suggestion about what should i try in home assistant like what add-ons what integration should i try with home assistant and let's make different iot projects using it so do drop your suggestions your thoughts about what should we make next on home assistant and i'll definitely try to make it just for you guys also do click the like button if you love this home assistant series and yeah that being said i'm just ending this video here and now just wait for my external explorer and share [Music] foreign x second [Music]
Info
Channel: techiesms
Views: 40,469
Rating: undefined out of 5
Keywords: techiesms, electronics, electronics projects, home assistant, esphome, home automation without coding, ESPHome home assistant, ESPhome ESP32, ESP32 Projects, codeless home automation, home assistant automation, getting started with ESPHome
Id: DfiFL-n3hBk
Channel Id: undefined
Length: 16min 21sec (981 seconds)
Published: Sat Apr 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.