-
Notifications
You must be signed in to change notification settings - Fork 307
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
Fixed device not reconnecting after MQTT connection loss #611
Conversation
Tests need to be fixed first. |
"Error: The program size (435040 bytes) is greater than maximum allowed (434160 bytes)" i don't really think there is much i can do about that |
I tried to fix the tests for pull request #577 . |
please help me understand: i literally deleted three lines. how can that affect the outcome of build teste in that way? |
I would let pass. It's the esp01 which lacks memory. I don't know how CircleCI handles things, but for esp01 one should test without config or mdns enabled to lower memory usage. |
@bertmelis I switched from esp01 to esp01_1m in pull request #577. This increases ROM from 512K to 1M and compiles do work again. We can then discuss somewhere else, whether we want to stay with esp01_1m or disable config mode for esp01. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not test the code but it looks reasonable.
The resulting image size dynamically depends on the used libraries and their versions. Especially the Arduino framework seems to grow with every release. Please see issue #471 for the according discussion. |
I am sure the code used to work once, i just don't get why onMqttDisconnected() should be called twice. Is there any scenario where that would happen after a disconnect? |
I will try to test that by blocking the MQTT port of my MQTT server, so I can bring the devices into the problem, that a second connection retry becomes necessary. |
Jup, exactly what I did |
I think this is also issue in homie-esp8266/src/Homie/Boot/BootNormal.cpp Line 764 in 51aa5a6
|
* Fixed device not reconnecting after MQTT connection loss * formatting (cherry picked from commit edb5d62)
I cherry picked it to branch |
MQTT was not reconnecting after a loss, since BootNormal::_onMqttDisconnected had to be called twice in order to periodically try to reconnect.
In my tests it got called only once, leading to only one singe reconnection attempt.