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

Disconnected from MQTT server #250

Closed
js903801 opened this issue Mar 3, 2019 · 17 comments
Closed

Disconnected from MQTT server #250

js903801 opened this issue Mar 3, 2019 · 17 comments

Comments

@js903801
Copy link

js903801 commented Mar 3, 2019

Hello, my original ESP RFID Relay board sporadically loses the connection to the MQTT server and does not reconnect automatically. Only after a reset is the MQTT will connect again. I read that I should use the version 0.8, here is the same problem. Just like the version 1.2. What can I do?

@omersiar
Copy link
Collaborator

omersiar commented Apr 5, 2019

Can you please share mqtt logs?

@omersiar
Copy link
Collaborator

omersiar commented Apr 5, 2019

MQTT Code should be revised. #256

@cyberhasse
Copy link

cyberhasse commented May 18, 2019

Changing line:142 in main.cpp to unsigned long interval = 55;
works for me!

Great work btw.
Regards.

@omersiar
Copy link
Collaborator

Interesting, this shouldn't be problem unless there are some rate limits on the server side. Thank you for sharing

@moneybag
Copy link

moneybag commented Jun 13, 2019

Can you provide a new bin file or update, i dont have platform io

@Marsx79
Copy link

Marsx79 commented Jun 13, 2019

Changing line:142 in main.cpp to unsigned long interval = 55;
works for me!

Great work btw.
Regards.

How can I adjust that? Is an Upadate planned? I also have the problem.

@cyberhasse
Copy link

Compiling the dev version seems to fix the issue!
I can provide a bin file when i get home.

Regards.

@Marsx79
Copy link

Marsx79 commented Jun 13, 2019

Compiling the dev version seems to fix the issue!
I can provide a bin file when i get home.

Regards.

That would be great. THX

@moneybag
Copy link

thx

@cyberhasse
Copy link

cyberhasse commented Jun 13, 2019

The bin file is here:
https://drive.google.com/file/d/1fJ6QaL5geuwFs9yN2COBUVS5Ai8Jo2dy/view?usp=sharing

I also added : SPI.setClockDivider(SPI_CLOCK_DIV8);
wich helps with longer cables.. mine is approx. 1m
Regards.

@moneybag
Copy link

moneybag commented Jun 13, 2019

Thx, i flashed it successfully.
lets wait and see
edit: it works!
https://www.youtube.com/watch?v=yy6OEf5QdMQ

@LEJOUI
Copy link

LEJOUI commented Aug 13, 2019

This solution worked for me. In v1.3.3 this problem was still there and caused a lot of mqtt disconnections.

@LEJOUI
Copy link

LEJOUI commented Aug 13, 2019

Seems I was too early. Still having disconnected from mqtt after a few hours.

For now, I'm testing this solution in v1.3.3, coming back with results..

@cyberhasse
Copy link

I bought a new router and after that the problem is better.
Regards.

@LEJOUI
Copy link

LEJOUI commented Aug 14, 2019

Yes, still no luck over here.. It would be nice that after a drop in wifi or tcp disconnected there would be a few attempts to try to connect to the mqtt server again, or a setting that when tcp disconnects a restart will take place. For now my solution is to disable wifi after x minutes so it reconnects to my mqtt server again. Downside is that i've to scan the tag twice after a long time not in use.

@drthanwho
Copy link

drthanwho commented Sep 29, 2019

Also on v1.3.3 and I'm getting MQTT disconnected after a few hours. For now I've set it to reboot every 24 hours but still not a solution since it disconnects after 3 - 4 hours.

Anyone worked any possible solution for this?
image

@Hini2001
Copy link

Hello and good Day to you All.
I have the Same Problem. I had esp rfid (actual ver 1.3.1) on a Node mcu and use it to control several Things over mqtt and IOBROKER. But After different time the mqtt Connection is closed. In the log file i could read:

WARN mqtt Disconnected from MQTT server
Additional Data TCP_DISCONNECTED

No wlan issues and no wlan disconnections. Just the mqtt Connection is closing. Every other mqtt Client is still connected with the mqtt IOBROKER Server.
After a reboot of the esp rfid it establish the Connection again for sometimes hours or sometimes 1 Day...
So i hope you can help me fixing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants