Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT Disconnects after a few minutes with the WS2812FX library and the device reboots after several retries. #134

Open
my-reminiscence opened this issue Jan 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@my-reminiscence
Copy link

my-reminiscence commented Jan 19, 2024

Description of the problem

  1. When I use the sketch without ws2812fx.service(); in loop() then everything works fine for several hours but when I include ws2812fx.service(); in loop() then MQTT disconnects after few minutes.
  2. Then it started to try reconnecting, after several minutes it says "MQTT!: Can't connect to broker after too many attempt, resetting WiFi".
  3. After several retries connecting with wifi, it reboots the device.
  4. I tried the same ESP01 and ESP12F.

Versions

  • ESPMQTTClient lib: 1.13.3
  • PubSubClient lib: 2.8
  • Arduino ESP32 / ESP8622 core: ESP8266

Hardware

  • Board type : ESP8266
  • Board model : ESP01 and ESP12F

Logs

MQTT!: Can't connect to broker after too many attempt, resetting WiFi.

C++ code

void loop()
{
  client.loop();
  ws2812fx.service();
}
@my-reminiscence my-reminiscence added the bug Something isn't working label Jan 19, 2024
@my-reminiscence
Copy link
Author

MQTT: Retrying to connect in 15 seconds.
11:36:34.274 -> MQTT!: Failed MQTT connection count: 6 
11:36:47.171 -> 
11:36:47.171 ->  ets Jan  8 2013,rst cause:4, boot mode:(3,6)
11:36:47.231 -> 
11:36:47.231 -> wdt reset
11:36:47.231 -> load 0x4010f000, len 3424, room 16 
11:36:47.231 -> tail 0
11:36:47.231 -> chksum 0x2e
11:36:47.231 -> load 0x3fff20b8, len 40, room 8 
11:36:47.231 -> tail 0
11:36:47.231 -> chksum 0x2b
11:36:47.231 -> csum 0x2b
11:36:47.231 -> v00060050
11:36:47.231 -> ~ld

@EdJoPaTo
Copy link
Contributor

Can you recreate this with PubSubClient directly (= without EspMQTTClient)?

It doesn't seem like its related to this library directly to me…

@my-reminiscence
Copy link
Author

Same issue with PubSubClient. I found that when I'm connecting with a mobile hotspot it's working fine but when I connect with a broadband (Airtel Fiber) router then it's occurring. I checked unique device id, client id, hostname but it's happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants