ESP IDF MQTT Publish and Subscribe via Mosquitto broker for esp32

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello in this video we will show the final combination of previous three three videos which show the ability of esp32 to communicate via mqtt protocol in the first video we talked about mqtt broker installation on pc in the second video according to the following example we showed the subscription of the esp32 and the ability to receive a message where the broker from the from the esp to pc and in our third video we showed the opposite the communication via mqtt broker from the pc to the esp32 in this example we'll combine all those three examples all those three videos in one we will do we will open our same example of expressive and the simplified code will look like this the same headers same wi-fi connection same main and the same mqtt start and the main handler the only changes are in the mqtt sub handler which is initiated here the in the state machine what we will do is a is en enable on the after the mqtt connection a subscription to my topic and publication to my topic inside the following broker which we took from the expressive example the exclups broker this is the free broker that we use from transferring mqtt messages so on the connection we will subscribe to the topic and also send the message to the asp those two lines enable us to to see the data that was received that was received during the subscription just to see that our subscription is working ok so here first we will take our pc and subscribe to a topic okay now we have subscribed then we will flash the we will flash the program to the esp build flash in monito and we expect to see the subscription and to receive a message here because remember after we connecting to the mqtt broker we immediately sending a messaging we will expect to see it here okay let's see wi-fi was initiated okay and we have published the message hi fro it's all from esp32 this is this message now after we check that this line is working we want to see that also the subscription is working in order to check the bi-directional protocol which we can send and receive messages from different different clients okay now we are sending publication to our topic from the pc and we will expect to see it here and here okay we now got high from is from hi from pc and also we got it here on my topic hi from pc so in this video we we showed the final code which enables bi-directional communication of esp32 via remote broker by mqtt protocol thank you
Info
Channel: SIMS IOT Devices
Views: 8,747
Rating: undefined out of 5
Keywords:
Id: l31o3GfaSNU
Channel Id: undefined
Length: 4min 44sec (284 seconds)
Published: Tue Sep 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.