EspMQTTClient
EspMQTTClient copied to clipboard
MQTT Disconnects after a few minutes with the WS2812FX library and the device reboots after several retries.
Description of the problem
- 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.
- Then it started to try reconnecting, after several minutes it says "MQTT!: Can't connect to broker after too many attempt, resetting WiFi".
- After several retries connecting with wifi, it reboots the device.
- 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();
}
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
Can you recreate this with PubSubClient directly (= without EspMQTTClient)?
It doesn't seem like its related to this library directly to me…
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.