ESP32 MQTT not working ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Vincenttor
New user
Posts: 9
Joined: 15 Jan 2020, 19:56
Location: Netherlands
Contact:

ESP32 MQTT not working ?

#1 Post by Vincenttor » 22 Feb 2022, 13:19

Hi all,
hope it is in the right forum.

I used to use only esp8266 models but since i wanted to make a led dimmer with more then a few pwm ports i thought of moving up to a esp32 board.
Flashing and everything went alright and the board is running..

I can controll all the pwm ports when entering a http://10.0.0.173/control?cmd=PWM,19,500 command and i get a notice in the logs.
When i want to control it by mqtt ( yes i have the correct subcribed topic ?) then it does not work.

For example i made this small video, at first where you see that a mqtt command is working , this is a esp8266 which responds.

The esp32 does not, only to http commands.
Could this be a bug or ?

https://youtu.be/Hb7BlMG5ZAQ

From 00:00 second till 00:20 is a ESP8266
Build:⋄
20116 - Mega32
System Libraries:⋄
ESP32 SDK v3.3.4-432-g7a85334d8
Git Build:⋄
HEAD_f162ebf
Plugin Count:⋄
47 [Normal]
Build Time:⋄
Dec 24 2021 14:57:55
Binary Filename:⋄
ESP_Easy_mega_20211224_normal_ESP32_4M316k
Build Platform:⋄
Linux-5.4.0-54-generic-x86_64-with-glibc2.29
Git HEAD:⋄
HEAD_f162ebf

Are there any ideas what could be wrong ?

thanks

TD-er
Core team member
Posts: 8846
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 MQTT not working ?

#2 Post by TD-er » 22 Feb 2022, 15:21

Is there any task configured to send anything to this controller?
If not, then I am not 100% sure it may (re)connect to the broker. (have to look in the code, to see if I already fixed that or not, it was at least an issue once)

Vincenttor
New user
Posts: 9
Joined: 15 Jan 2020, 19:56
Location: Netherlands
Contact:

Re: ESP32 MQTT not working ?

#3 Post by Vincenttor » 23 Feb 2022, 18:33

Hi thanks for the reply.

I do have a few sensors that send information to the controller which also arrives constantly if this is what you mean with "task" ?
But receiving seems another story.

I have tried another firmware also but seems to be the same , not receiving the mqtt commands that i am trying to send.

User avatar
Ath
Normal user
Posts: 3643
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 MQTT not working ?

#4 Post by Ath » 23 Feb 2022, 19:44

Which MQTT Controller are you using, and how is it configured? I can't deduce that from your message or yt.
/Ton (PayPal.me)

Vincenttor
New user
Posts: 9
Joined: 15 Jan 2020, 19:56
Location: Netherlands
Contact:

Re: ESP32 MQTT not working ?

#5 Post by Vincenttor » 27 Feb 2022, 12:11

Here is the settings i have :
i copied everything from the esp8266 which does work so assumed this would do as well.
Image

Vincenttor
New user
Posts: 9
Joined: 15 Jan 2020, 19:56
Location: Netherlands
Contact:

Re: ESP32 MQTT not working ?

#6 Post by Vincenttor » 08 Mar 2022, 21:41

Is there anyone that has the same "problem" or has a solution, or better see's where and what i am doing wrong ?
Tested other firmware but it seems to be the same thing over and over :oops:
Really like to get this working to have some of my lights around the house being controlled :)

Thanks

TD-er
Core team member
Posts: 8846
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 MQTT not working ?

#7 Post by TD-er » 08 Mar 2022, 22:22

Today I've been working on this, without this topic in mind.
See: https://github.com/letscontrolit/ESPEasy/pull/3971
I just created a pull request for it (feature is not done yet, but it does work) so you can try the test build as soon as it is finished to see if it may fix your issue.

Vincenttor
New user
Posts: 9
Joined: 15 Jan 2020, 19:56
Location: Netherlands
Contact:

Re: ESP32 MQTT not working ?

#8 Post by Vincenttor » 13 Mar 2022, 08:04

thanks allot , i will follow this

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests