How to setup MQTT for Raspberry Pi and ESP32 for IOT and Robotics projects

preview_player
Показать описание
Learn how to setup MQTT communication between a Raspberry Pi (or any Linux machine) and ESP32 microcontrollers for your next next IOT or Robotics project. Once you have grasped the concept explained in the video, you can setup and scale your MQTT netwrok by adding more ESP32 / Arduino(with wifi) or Raspberry Pi clients. MQTT is Widely used in Robotics and IOT, the demonstration & sample code provided below can give you a head start.

Project code

Article

IOT Projects playlist:-

Robotics Projects playlist:-
Рекомендации по теме
Комментарии
Автор

simple, direct and clear. Thanks brother

bda
Автор

Keep going !! You such a priest to me. Thanks for publishing. I'm subscribing now for sure !!

newmega
Автор

Excellent teaching and software you've! Please upload more videos to make us more Powerful as you're.

moinshaikh
Автор

Someone can help me?
I get the error: "Unsupported callback API version: version 2.0 added a callback_api_version" when I I am running the python Script.
What can I do?

filipe
Автор

I keep getting a "Attempting MQTT connection...failed, rc=-2 trying again in 2 seconds" error message printed on the serial monitor. The python codes seem to be running fine on the RPi but I don't seem to be able to establish a connection between the ESP32 to the broker.

Laplace
Автор

Thanks for your tutorial but I faced some difficulties while applying the scripts.
I always have "ConnectionRefusedError: [Errno 111] connection refused" when I I am running the python Script. I am using the raspberry as Broker and client and I ve tried both to publish and Subscribe to a topic as defined in the script but with out any positive result.
I ve checked the IP-adress but I dont think thats the problem.

soumaorokante
Автор

Hi Jitesh helloworld,
what a great project! It works properly.
I would like to setup a MQTT project with one ESP32 as a subscriber and another ESP32 as publisher. The broker should be a local RasPi standalone as Broker-Server creating its own WLAN without connection to the Internet via Router or Access Point.
Can you give me hints how to do this?
The handling of the ESP32 should be easy. But with the RasPi I have got my problems to combine the installed Mosquitto and the WLAN-Server capabilities.
Do you have this setup described in one of your courses? (Please without NodeRed.)
Thanks!
Oli

os-channel
Автор

You explain very well but you haven't try Raspberry Pi as a Client. Do you have code or tutorial to use Raspberry Pi as a client?

muzammilszabist
Автор

To the point. Very welldone.
I have one stupid question.
1. Can we implement MQTT client & broker with esp01 with AT commands firmware?If yes how? if no why?
Thanks

gapguy
Автор

For me its constantly showing connected disconnected and trying to connect. Can anyone suggest how to solve this issue. Nice video. Keep going

gautamnayak
Автор

Hi. I'm currently working on a project. In my case i need to get several sensor values using several nodeMCU modules. Then i need to send those values to the broker and the broker will make some calculations on those values. Then i need to publish the result to all Node MCU modules for taking actions. Can you guide me?. Is it possible?. Can i pass data in client_sub to client_pub?.

dinukamadhushan
Автор

hi i have a question if i run the program for 2 esp32 's i constantly says disconected coneccted

vortex_boy
Автор

will it work if they are connected to different wifi routers in different locations?

arinjayagrawal
Автор

Hi, does the esp need to be connected on same network as the brocker connected to?

alsamaraee
Автор

This is about my 1, 000 video having to do with literally any subject when it comes to home assistant. I will bet anyone a years salary this video will make 0 sense to anyone who isn’t already proficient in every aspect of home assistant

dangerdiesel