Open maiquiISA7 opened 4 years ago
Can you enable debugging and post the output of your serial terminal?
Are you using multiple devices? I noticed that my Mosquito MQTT server disconnected every few minutes when using multiple ESP8266 devices with the same client ID.
This was a solution for me, but works only if you have multiple devices:
String clientId = "ESP8266Client-" + String(random(0xffff), HEX);
client.connect(clientId.c_str(), MQTT_USER, MQTT_PASSWORD);
Hello @Erriez,
I can confirm your previous experience with clients from multiple devices. I've never lost connection (to an internal broker) after ensuring unique client ids are in use (and disabling the SD card, if any).
Kind regards.
My solution was to add a call to loop() in the callback function. The initial collection of topics after a new subscription was way faster and prevented disconnections.
Hello, congratulations on your work!
I'm having a problem maintaining the connection with the mqtt broker. The connection is terminated during data transmission. I'm using a sim800 and Esp8266, the WiFi works normally.
Do I need to change any keepalive or timeout parameters?