Home Automation based on Local MQTT server using Raspberry Pi and NodeMCUBoard | ESP8266 Projects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] hello everyone till now you have seen the automation related projects on my channel which are mostly based on either program really brokered in which we can control home appliances globally from anywhere in this world why I internet cool but now let's take this to a step back and now and this video I'll let you know how you can control home appliances and also monitor multiple senses data locally without using internet by just using a Raspberry Pi board as a local impurity server so watch this video till the end and I will let you know how to make this so let's get started [Music] let me give the overview of this project so in this project we will be using a Raspberry Pi board as a mqtt broker and we'll be using an Odom seaboard as M critic lying on which we will be attaching some relays to control appliances and some sensors to monitor data now if you don't know how I'm going to work that kindly watch out this video in which I have explained the concept and working of M DD T protocol that's it so let's start with the making first of all let's configure an Raspberry Pi board I ordered my Raspberry Pi 3 weekend from one website computer source now just search for the skete on their website and place the order you will be receiving this kids trade at the doorstep link of buying this kit is available in the description of this video so first of all go to the website and download the latest version of the raspbian Jessie OS I already have the previous version of this OS so I will cancel this download then you need to insert the SD card in your computer and open up this application called SD card formatter then for this application is in the description of this video open that and format your SD card then open up another application called echar link for this app is also attached in the description of this video here select the image you just downloaded then select the SD card port and click on this flash button it will take some time flashing the image and validating it after that insert the card and your Raspberry Pi board and boot up your device after booting up first of all connect your Raspberry Pi board with Internet by entering the Wi-Fi credentials of available Wi-Fi network then open up the terminal enter these all commands one by one all these commands and mentioned in the article on my website whose leg is also attached in the description of this video after successfully following all the steps you are done with installing the mosquito and curative brogre on your as vary by world okay great we successfully installed the broker on our pile now let's test if it is working or not for that open up two terminal windows and in first window the subscribe to one random topic with this command and on another window publish will random message on that same topic by using this command if you receive that same message on the first window then everything is working perfectly fine now you don't need to do anything on the Raspberry Pi board side now let's just configure and nor MSU board as an impurity client now for explaining this local m23 concept I will be using these all components which includes and node MCU board for relays to control for different appliances a dht11 sensor to missile temperature and humidity I bought this node MC board from highlight ghost or friend on Amazon the board worked perfectly fine for my project I'll be attaching the link of this board in the description of this video now the connection of all these components is something like this I got my own PCB design for this particular project from GLC PCB calm ordering PCBs from GLS a PCB is as simple as uploading photo on your Facebook profile just upload the gerber file on the website and submit your order you'll be getting this amazing PCBs with premium quality at very low price at the doorstep so try out jlc PCB wants to make it projects look neat and well arranged now one by one i shouldered all the components on this PCB and after shouldering all these components it looks something like this now let's jump on damn good EDA client code used for this project so this is the code for MB DT client so for using this code first of all you need to download and install this library was link is management in the description of this video in this code I'm interface for relays which subscribe to these different topics and the sensor which is subscribe to these two topics here the topics name you can choose on your own but make sure on the other side from which you are going to monitor sensor and control appliances should also be subscribed to exact same topic otherwise it won't work at all so the only change you need to do here is give your local routers or mobile hotspots credentials then enter the IP address of the Raspberry Pi board which you can get it from the PI by opening up the terminal and type in ipconfig so here is the local IP address of a Raspberry Pi board simply copied and pasted it on the arduino code that said discipler this code and we are done with a node MC of board now the only thing we are left with is our mobile application so go to the Play Store and download this app called M credited dashboard open up that app now click on this plus button here type a random client ID for example 1 but here you need to provide the IP address of your Raspberry Pi board which you already entered previously in our Arduino code then the port for immunity is 1 double 8 3 and leave everything and click on this create button now go inside this first client ID section now as you can see it is showing connecting to broker oh it failed to connect has a raspberry pi is not at all powered up so let's this power of the Raspberry Pi board so that a broker will get active press this cloud icon ok so as you can see it was successfully connected with a broker one thing to note here is that the phone the Raspberry Pi board and the nor MCU board all should be connected with one common router or a hotspot otherwise this will not work at all as all this is happening within local area network without internet so here we can subscribe as well as published date on two different topics let's first subscribe to one topic so click on this plus icon first new a friendly name for example temperature write down the same topic name which we have written in the code for the temperature sensor which was slash feeds slash temperature living everything as it is click on the create button likewise make another for humidity but make sure the topic name should match with that in a hardener code ok let's make topics to publish data click on this plus icon and select switch dear friendly name for example relay 1 then again write down the topic name for the relay 1 from an arduino code which was slash feed slash relay 1 then for on text send 1 and for off text send 0 then click on create likewise make other switches for other relays ok so we are done with the application so everything is properly configured now let's just see everything in action [Music] so yeah this is it about this project I hope you enjoyed watching this tutorial and if you find this tutorial helpful then do give a big thumbs up subscribe my channel if you want to learn more interesting projects regarding IOT automation and electronics so wait for my next tutorial and then explore learn share with me techie SMS [Music]
Info
Channel: techiesms
Views: 54,363
Rating: undefined out of 5
Keywords: raspberry pi, smart home, home automation, mosquitto mqttt, mqtt raspberry pi, automation using raspberry pi, mosquitto raspberry pi, mqtt
Id: 64UCR2NNVKQ
Channel Id: undefined
Length: 10min 0sec (600 seconds)
Published: Tue Jul 31 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.