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
Permanently MQTT Reconnects #5146
Comments
Hi, the real fix was that he uses core 2.3.0. Some routers are better for core 2.3.0 and some others for newer cores. |
OK, I'm running a Fritzbox 7590 wit 1750E Accesspoints in MESH Configuration. The link above shows for CORE 2.3.0: As I'm running a Fritzbox Core 2.3.0 shouldn't be a solution.... |
If you look into issues you will see that fritzbox has issues with the Arduino core. |
If the Fritzbox is the cause, it's more a WIfI issue, than an MQTT issue? I also turned off mDNS, until now the issue doesn't occured on that devices any more.. |
The mqtt reconnections are for socket error. Sockets are managed by the core. The core 2.3.0 may give you the solution. Please please test it. You can just do an OTA with the precompiled bin. TasmotaMQTT is deprecated and no longer supported. It will not solve your issue. In fact it will give you under some circunstances software watchdogs restarts. mDNS is unrelated to mqtt and sockets. |
After studying My "plan" is like that: I keep you informed... |
Setting sleep 0 isn't really an option as the Load grows dramatically. |
Great! Downgraded to: for now. |
Looks like I did not get a single disconnect since downgrading. Should be a measurement change, not some actual change, right? I'll leave it this way until tomorrow.
|
The change in VCC measurement is a known issue of the old core. Don't worry. It is ok. |
Disconnected Shelly2, giving again Feedback |
I had a single disconnect since installing the Core 2.3.0 version. Were the now disconnecting devices having issues before? |
@helmar74 can you config your router to use a fixed channel? |
@AndyPuettmann : Yes the Devices, which are disconnecting now, had also trouble before Will provide feedback......... |
I have a FB 7590 and 7490 (mesh repeater) so 2 strikes for me but the 2.3.0 core is 100% stable here. 2.4.2 and 2.5.0(beta 2 or 3) were an absolute nightmare! 2.3.0 is rock solid. I was also previously using auto for wifi channel but did fix that to a static channel... haven’t tried 2.3.0 core with auto channel.. |
Okay. Well. I the cause known exactly or pinned down specific parts of the Fritz-Box? |
Nice to know that fixing the wifi channel in the router and using core 2.3.0, the reconnection issue has been improved. Anyway, this is a known issue of the core that it is outside the control of Tasmota. Closing this issue as it is not a Tasmota bug, but anyway, feel free to ask and comment on this trying to find a better way to workaround this core problem with fritzbox routers. |
OK, will do so ;-) Here's the weblog of a 2.5.0 CORE Device, when MQTT Reconnect occurs: |
I increased weblog level to 4. Now I'm getting the following messages in webconsole: Will post update, when the reconnect occurs..... |
After about 3:30 hours it seems that the reconnects occurs more often. |
Helmar, Do you have a system where you can set up a syslog server? If so, it may be prudent to do so and to configure your devices to send their logs there so you don't miss any details. YOu can set the same level of logging (SysLog 4) and perhaps back down your WebLog level since it will be redundant once the detailed information is being sent to the server. Mike |
When the MQTT Reconnect occurs, the 2.5.0 Device is logging this:
|
During the night (about 14 hours) all Devices on CORE 2.3.0 hadn't any disconnects. Waiting for any results... will provide Feedback. |
Had reconnects again. Now (of course) the load get's higher.
|
I've done the following with one of my core 2.5.0 S20s which was having permanent MQTT reconnects:
Will provide feedback.... |
Sleep 0 prevents the cpu from going to sleep. This may make a difference on your bill for electricity if running a ton of those devices. |
I flashed a few S20 by wire. First I erased flash with esptool like suggested here: After a while a few of the S20 reconnected, others didn't.
Will see, what happens.... Provide again feedback |
Hi,
I do have permanent MQTT Disconnects/Connects in my mosquitto MQTT Broker log:
1549537348: New client connected from 192.168.1.XXX as S20Steckdose5 (c1, k10, u'DVES_USER'). 1549537348: New connection from 192.168.1.YYY on port 1883. 1549537348: New client connected from 192.168.1.YYY as S20Steckdose4 (c1, k10, u'DVES_USER'). 1549537349: New connection from 192.168.1.ZZZ on port 1883. 1549537349: New client connected from 192.168.1.ZZZ as S20Steckdose7 (c1, k10, u'DVES_USER'). 1549537577: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
I had this issue when using CORE Library 2.4.2. I updated to CORE Library 2.5.0, but the issue still persists.
Does anyone know, how to fix this issue?
I also found this interessting articles:
https://community.home-assistant.io/t/constant-mqtt-devices-disconnections-socket-error/83477/50
He fixed it like that:
He raised KEEPALIVE and TIMEOUT Parameter for MQTT connection.
Is this "recommend" to fix the issue, or is there an other solution?
Thank's a lot
Helmar
IMPORTANT NOTICE
If you do not complete the template below it is likely that your issue will not be addressed. When providing information about your issue please be as extensive as possible so that it can be solved by as little as possible responses.
FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED
Make sure these boxes are checked [x] before submitting your issue - Thank you!
status 0
:(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: