LIVE: ESP8266 & WhatsApp

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello i do magicians welcome again and good morning good evening good night and whatever time is there is in your location so here i am today again i hope you are enjoying our live sessions where we are understanding new technologies we are understanding new uh things new that will be useful for our future projects so today in the same series today we are going to learn how can we integrate whatsapp or how can we send whatsapp notification to from our esp8266 so first let me quickly see if i am live on youtube okay magician so i am live on youtube and now we can get started let me quickly share my screen with you and let's see what all i have for you today okay so magicians i think now if you are able to see my screen and today we are under going to understand how can we send uh messages using esp8266 to our whatsapp yes so our aim will be on pressing the push button our esp should send the current time and the joke of the day to our whatsapp so this is just a kind of sample information that i'm going to send to my whatsapp but you can send any other information like the sensor data or or anything or any alert message or any notification that you would like you can send that message but today in this session we will be sending the current time and the joke of the day to our whatsapp so before uh starting this project let me quickly show you what should we expect out of this session and let me just uh show you quickly show you the demo how will it look like okay so uh this will be our com port uh the serial ah the serial monitor i have opened it here and let me open my camera also so that you can see my esp so now you can see that i have esp over here and i have put integrated a push button with our esp8266 and you can see the serial monitor here so first let me quickly reset my esp and so that it will re-export the program so i will push the reset button so as soon as i push the reset button you can see that in serial monitor that it is trying to connect to wi-fi and now it has got connected to the wi-fi and got the ip address now it is saying the message that you can push button to send whatsapp notifications to this number so as i have used my number so i will be getting this whatsapp notification similarly if you provide your number you can get the notification on your mobile mobile whatsapp so let me push this push button so i will push this nf if i'll remove this you can see that it has sent some information uh here you can see whatsapp notification sent successfully and the messages some message you have received joke of the day and so on so let me quickly show you uh my whatsapp so still i have not received any message i'm waiting for the message so looks like i have received the message here so you can see that uh under imx whatsapp friend i have saved now this number in my whatsapp by this name so i have received a message joke of the day and the joke was why did the dog cross the road to get the parking lot yes and we got the current time as india time 12 28 36 p.m yes magician so this is how we get a whatsapp notification from our esp8266 so this is what we are going to learn today and uh at the end of the day you should be able to create such projects which will send a whatsapp notification from your esp okay magician so without any further delay let me open up my document which i am going to cover today so in today's session you will be seeing uh i have this document in front of you which is the six pages of document and if you need this document and if you need the code which i am using uh in today's session let me know i will provide you this document as well as the code my whatsapp number is already there in the description of this video and you can connect me to my facebook group or you can uh send comments on uh under this video so so the title is esp8266 sending messages to whatsapp and our aim is on pressing the push button our esp8266 should send the current time and joke of the day to our whatsapp okay so first of all joke of the day url from where you will get the joke so this is my personal url which i have created just for a demo purpose so if you will if you'll go to this url let me quickly show you if you go to this url and then you will get a joke after any random joke of the day and you you will get the current time also so you get the current time in json format and you get the joke also which is you can't trust items because they make up everything yeah so this is the joke for the day so it will give give us a random joke all the times i will hit this url and it will give me current time also so this is the basic url that i'm going to use but you can use any of the information as i already informed you can send some sensor data or any alert message that you would like okay so first of all let's try to understand how does this work how can we send any information to our whatsapp what all setup we need to do before writing the ino code now whatsapp has a developer program in which you can get access to their apis of course whatsapp is a very um great platform nowadays for sending and receiving messages and their developers who they do have the api access for their uh different services that yeah they are using but that could be used you can use those but however that is only intended for corporations and not for private person like us and also those apis are not free apis those are paid apis so this option definitely at this point i'm not gonna use i'm not gonna use their their apis but what we are going to do we luckily we have call me bot so this is a particular uh service or you can say a project uh which we can use or utilize to send a whatsapp notification in this project now we will learn how can we how can it work like a jar before moving ahead let's get uh get to know about this note which is very important to understand there is only one small limitation when you will use call me bot uh functionality or the service there is a small limitation for that you are at this moment only allowed to send 25 messages to whatsapp into 40 minutes which means one message for 10 minutes so for 10 minutes you can send only 10 messages this is uh sorry for 10 minutes you can send only one message right so the frequency of sending message should be every 10 minutes for real life purpose that is enough that that we know that we don't really don't really need if we are working in such kind of projects where we don't require to send information every seconds or every minute in that case this whatsapp notification sending program or technique can be used but definitely when you intensively test test it that might be a problem for you if you are sending more than one message for 10 minutes uh you might be blogged sending sending another message if you have crossed this limit so this is just a small limitation so just keep in mind so now what is call me what first let's try to understand what is call me board and how do we create an account there and how can we use call me board service in our esp8266 of course i assume that you already have whatsapp installed on your phone and you are familiar how it works and nowadays each and everyone having whatsapp on their phone and they have they definitely know how to use the whatsapp and this is just i am presuming that you already know how to use what's happening to send messages to whatsapp from your esp8266 or esp32 this can be used uh this program or this technique can be used either from esp32 or esp8266 you can use this in any of this microcontroller you need to make use of a service called call me bot and that is free yes yes magicians of course this service is free and just i as i already informed you you just keep uh in mind that keep in mind that you are limited to send one messages per 10 minutes don't send more than one messages for 10 minutes now in all you can say you can send 25 messages total input to 40 minutes okay so you can find their website here so this is their website if you will go to their website let me quickly show you uh to their website also so this is call me bot website you can go here and you can read a details about about this website about them so if you just want to know about them let's try to check on that what all they have this is just the ad and here you can read uh more about more about them and let me see if i can get something interesting for you yeah so here they have given the all the setup steps but don't worry i have i have ex i will explain all this thing in details here okay so if you are interested you can explore more this website and get to know more more things on that as taken from the call me board website i have just taken out uh one liner a couple of lines describing call me bot so who we are hmm us it is only the bot and myself this is what they have written in their website this project has started as a personal need for my home automation system then my friends and colleagues wanted to use the same feature from api then i developed so i decided to share it with them when i realized about the high interest and adoption i decided to invest on aws google cloud and ifptt developer plan to make it more reliable and accessible to everyone this is a hobby and all the donations are used to maintain the servers on cloud and pay some fixed cost for ifttt or hosting and so on thank you for your support note call me bot has no relationship with telegram whatsapp facebook google cloud amazon or aws so this is what they have mentioned about themselves uh in their website okay so call me bot uses bot which can be freely translated as a software robot as we already know what they bought is it's nothing but a software robot uh which i had already explained during our telegram bot creation when we integrated our esp with the telegram and we were able to send commands or receive commands from our telegram if you have not checked out that video and you want to know how can we send or receive messages from our telegram using esp do check out uh in my facebook channel you can find projects there so this robot or you can say this call me bar it operates as an intermediary between your microcontroller or and your whatsapp so you can you can think of this call me bot um or a software robot it acts like an intermediary uh person between your microcontroller your computer or you and your you know whatsapp this sounds complicated but really it is not if it is something complicated to you now uh first thing first how do you activate the call me board you need to you need to get some uh you need to perform some actions in order to receive the api keys and you need to add the number so such things we need to do before using or before activating call me mod for your esp so how do we do that don't worry about that the steps are pretty straight forward and very simple steps are there in just a minute you can activate call me board in your mobile and then you can easily receive notification from your esp so first thing is you need to add the bot to your contact list on your phone of course if you want to receive message from from a bot or from a software robot then definitely you need to add the board in your contact list and i am sure you know how to add a number it is just to the same the way as you would do when adding a new person in your phone's contact list you can give this contact any name now i gave mine so i gave the number as i i gave the name as imx whatsapp friend so as you saw my uh whatsapp so you can see that i have this contact name as image whatsapp friend so this is the name of uh my bot which i have saved and the number that you have to say that you have to save is the telephone number and you can find that number in their web page if you will go to their call me bot web page let me just quickly show you here so if you will go here in their web page so there in the setup section you can see they have mentioned their phone number what is their number you need to save on your phone okay so the same thing i have mentioned here in my document that you have to save this number the number is plus three four six double four two zero four seven five six so this is the number that you have to save in your contact list of your phone and you can give it any name as i have give given my name is imx whatsapp friend that's it uh this is the only thing that you have to do as of now and as you see that call me what website yeah you can see the same thing here so the reason why you need to do this why we are saving the number because as i already informed you because you want uh you are bought to be to be shown up in your whatsapp so as soon as you will add that number in your contact list you can see uh the bot on your whatsapp so here you can see easily now your bot so indeed now open whatsapp and search in the context if you search for the contacts as this and then you will get uh your bot over there okay so now the next important thing is that you have to get the api key for your bot or rather for your whatsapp number so how do we get this api key remember that this api key will be useful and you need to keep it safe and don't share that api key because we will use this api key in our ino program when we will write in esp8266 to send any message to our whatsapp so next step is after adding uh the bot in your contact list the next step will be you need to get the api key so how do we get the api key this is also pretty straightforward and very easy for this what you need to do is ah you just need to send a message to the call me bot i allow call me board to send me messages so this is a message if you copy this message from here and you will open your bot here so it will open your bot and you just need to let me first clear all the messages that i have here so for you you will not see any message it will be a blank screen over here and you can see that uh your bot is online and then you will simply send a message to your bot i allow call me box to send me messages so since i already have sent this message so i will not send it again because i have already received my api key but if you want you you will have to send this message to your bot and as soon as you press enter you have sent this message to your bot and after that just wait for some time then you will get your api key in within a minute uh but if you have already got the api keys in that case you might not get the api key like if i will wait i will not receive any api key because i have already received the api key so remember friends or remember iot magicians once you have that got the api key keep it safe because second time you won't be getting the api key again even if you will send this message okay so once you will send this message for the first time then you will receive a message similar to this so you are seeing here and you will when you will send the message i allow call me bot to send me messages as soon as you will send this your bot will reply something like this it will say that new api key created for call me box single api the api key created for you is so i have highlighted here with the red light with the red ink congratulations you now can send single messages from any device app or service use this and another you will get this url also so this kind of message actually you will get and the api key which you will receive is this the api key created for you is this so this will be a api key which you need to keep safe so after a short while you will get a message back this might take some time depending on how busy the service is when i activated this service it took almost two minutes before the board replied so when once i sent this message i allow call me bot to send me messages so i actually took two minutes for me to get me uh the uh api key so the rapid consists the reply consists actually of two messages the first message is your api key which will be uh in this form and the call me bond informs you that that your bot is activated for your phone number and your api key will do this so make sure that you save this api key in a safe place you will need it later on when you are going to send messages to whatsapp okay so and uh the second message tells you how you can use this api key to send message to your whatsapp the url format also it will show you a url format to send your to send any test message here so as i showed you earlier here so it will it will give you a test url also and then you can use this url to send any message to your bot so if you want to do the first test so you can you can do as i have explained here you can simply copy your url and paste it on any web browser and then you will receive a message on your whatsapp and if you don't want you can just skip this and directly uh move into our next step where we will write uh esp code to send or receive messages so now let's uh follow the below steps to upload the code into esp8266 now we are going to write a code for esp8266 so that when we will press a push button we receive message in our whatsapp so first of all we will follow the below connection scheme yes so the connection scheme is pretty straightforward since we are only interfacing one push button so it is first leg of the button so here you are seeing will be connected to 3.3 volt of esp8266 so you are seeing here the first button the first leg of our button is connected to 3.3 volt to our esp the second leg of the button will be connected to first leg of 10k ohm register so here you are seeing the second leg of your button is connected to the first leg of your 10 km register the second leg of the button again the same second leg button it will go to d0 or gpio16 in our esp8266 and yes the same second second leg of our push button this yellow jumper wire which is connected to d0 here in our esp8266 and the second leg of our 10k ohm register this goes to ground off esp8266 and you see here the second leg of the resistor is going to the ground in our esp8266 so this is pretty straightforward and you know we have used this uh interfacing button interfacing in many of our projects so that should not be an issue for you to connect our push button to esp8266 so this is how our physical diagram looks like so i have just used some small pins uh to make it little clear so that you you can so that our entire diagram or entire arrangement looks pretty good or it should be visible also so now let's uh follow the steps in order to execute this project connect esp8266 to your laptop identify the com port mine is com4 so first you need to connect your esp8266 to your laptop and then you need to identify the com port mine is com4 open arduino ide and select the board as generic esp8266 module and the port is comfort so this is the regular activity that we perform when we connect our esp to our laptop and we open the i don't know ide and let me do the same thing i have already connected my esp8266 to my laptop and let's open the arduino ide and next step you need to copy our code esp8266 underscore whatsapp underscore notification dot ino so this is the ino code that you have to copy so again magicians from where you will get this code yes so i will provide you this code and now once you will whatsapp me uh and uh please let me know in the uh in the facebook group and uh please comment another section under this uh comment section if you want and this code i will provide you and let me show you the uh coding code here esp8266 whatsapp notification so this is this is the code that you have to copy and let's follow the document so finally upload the code into esp8266 by pressing the upload button so but before that uh once you have copied our code you need to use your own parameters as shown below and save so this is this is the thing or this these are the parameters that you need to change as per your settings so let me show you here so in this line uh you have to use your wi-fi ssid and then you have to provide your wi-fi password and then you have to provide your phone number remember that the phone number uh should be plus and your country code and followed by your number there should be no spaces between any of these numbers and then finally you have to provide the api key remember this is the api key which you had received from your bot okay magician so once you have uh given all these informations you need to just save it and then finally you need to upload this to our esp8266 so finally upload the code into esp8266 by pressing the upload button at the top left once done open the serial monitor press the reset button on your esp8266 to re-execute the code and press the push button and observe the serial monitor and your mobile whatsapp you should have received the messages and see below as i have received so finally magicians this is the time now the time has come when we will upload it so to upload our code you need to go at the top left so this upload button you will hit this button and then your uh entire code will be uploaded to your esp8266 and once uploaded now is the time to execute this code so in order to execute this code we will open uh serial monitor so let me open the serial monitor here and let me first clear the output whatever output i have i have cleared the output here and let me open the camera also usb camera also so here's the camera screen in front of you so i have esp8266 over here and the com port the serial communication here so now you let me push the reset button here so that it will re-execute the code so you will see that now serial monitor is showing that connecting to wi-fi and it is wi-fi has been connected and now we can use the push button to send whatsapp notifications so now we will as soon as i will push this button you will see that i have sent it has sent a message uh some message to our whatsapp and you can see that the joke of the day is why do some like so this is the joke of the day so let me open my whatsapp and let's see if i receive some message from my bot so still i have not received any message yes so you are seeing here i have now received some message from my bot here so you see that the joke of the day i have received why do mushrooms get invited to all the best parties because they are such fungies and now you see that the current time is 1251.42 so you you see that just pressing this button our esp has sent a message or notification to our whatsapp let's do it one more time so i will press this button one more time so as soon as i will press this button and i will wait for uh my esp to send the message to our i'm bought and uh let's wait for a couple of minutes so like you are seeing that i have received another uh another message but this time yeah i got the same uh joke of the day maybe it uh it got it got the same random number in order to get the message but you can see here i have got a different time here earlier i had the time as 1251 but now i have got the time as 1252 but remember that you should not send more than 25 messages within 240 minutes otherwise uh it will be your number will be blocked and you cannot send you will not be able to send messages until you are until you cross the time limit so let me do it one more time i will press it again and let's see what joke of the day i receive now so as soon as you will receive the message we will read it what we have got it so it is typing and yes i have got the message and you see that i have got the joke of the day can february march no but april may so this is the joke of the day that i have received and you can see the time is the india time is 12 53 27 p.m so magicians you see that how easy it is and the same thing uh messages same message you can see in your serial monitor also so magicians this is the way how we send our whatsapp messages we receive whatsapp messages that we can send from our esp8266 if you need uh further clarification on that if you need this document or the code that i have used in this please let me know please whatsapp me or ask me in my facebook group or just write the comments section uh so that i will provide it to you so hope the session will be useful for you magicians and you can use this in some of your future projects so if you find any difficulty any issues let me know and take care of yourself magicians and arigato and now i am just going to stop sharing and going to end the meeting take care of yourself magician see you soon in another interesting practical arigato
Info
Channel: IMH Videos
Views: 354
Rating: undefined out of 5
Keywords: IOT, Raspberry Pi, IOT Course, Online IOT projects, Amazon AWS IOT, MQTT IOT, Wireless IOT, XBEE, Home Automation, Learn IOT Online, firebase, Realtime database, ESP8266, ESP32, Micropython, IoT Core, Webserver, ESP Webserver, Telegram, BOT, Telegram Bot, Amazon Voice Service, Smart Home Skill, Amazon Alexa, SPIFFS, ESP Filesystem, ESP FileSystem Uploader, ESP32FS, Interrupts, PIR Sensor Motion, PIR, ESP NOW, ESP 2 Way communication, CloudWatch, IoT Rule Engine, WiFiManager
Id: NHeYM8MSZK0
Channel Id: undefined
Length: 29min 6sec (1746 seconds)
Published: Thu Oct 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.