-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 connection not always working #79
Comments
I recompiled with version 3.9.17 and used the same user_config.h and it is working as it should! |
Today, I've seen this errors again. Error messages on the sonoff device: Firmware is not changed. |
I think the keep-alive pings are sometimes not sent This is what i see on the broker side Client DVES_82579D has exceeded timeout, disconnecting. |
And when the connection is accepted on the broker, the sonoff dos not always respond 1487600218: New connection from 10.0.250.72 on port 1883. |
Still need to investigate but did you make any changes to pubsubclient.h define MQTT_SOCKET_TIMEOUT? I used it as set to 2 seconds for a while to satisfy non MQTT users but I will now set it back to 15. Can you verify your compiles did use the 15 second value and still observe the problem you see? |
The library defines it to 15. This problem is not constant, and i begin to think actions in the web interface of the sonoff sometimes are causing this. |
I think it is webserver related too. Did a rewrite of the page refresh using ajax. Let's see if it was for the good. Implemented in version 3.9.21 just released. |
Yes, I think it is better now. |
Is it possible to increase MQTT_KEEPALIVE from 15secs to 60secs from Web-Console with MQTT command? |
i need to increase MQTT_KEEPALIVE to 60 secs, which is arranged 15secs in Sonoff Basic Tasmota FW? |
My MQTT broker (on Pi) MQTT_KEEPALIVE's setting is already 60secs |
@Sunrise17 Please open your own thread so it can be discussed in there. |
3.9.21 20170224 * Add ajax to web root page and web console (arendst#79) * Add commands SwitchMode1..4 and enable user switches 2, 3 and 4 (arendst#84, arendst#88) * Fix MQTT upgrade when webserver is active
Update from Tasmota
I am sorry to re-activate this issue @arendst but I am seeing the exact same problems like @lucwuyts on my Sonoff-Tasmota 6.6.0 (which from what I can tell is way newer than 2017).
After reboot the system will work well for some hours and then continuously fail with these errors. Any ideas how to solve this? |
Please, address this to the Tasmota Support Chat. The chat is a better and more dynamic channel for helping you. Github issues are meant for Tasmota Software Bug Reporting. Please check the Contributing Guideline and Policy and the Support Guide. Thanks. Support InformationSee Wiki for more information. |
When i restart the sonoff, the MQTT connection is immediately ok.
But after a few seconds i often see these messages:
MQTT: Attempting connection...
MQTT: CONNECT FAILED, rc -2. Retry in 10 seconds
Return code 2 is Connection Refused, identifier rejected
during this experiment there was only ESP device active
Is this a configuration issue on the broker ?
The text was updated successfully, but these errors were encountered: