I found that OTA updates were very unreliable when the ESP8266 was connected to the MQTT broker, probably due to the fact that the MQTT keep-alives would interfere with the download of the firmware image. The Sming MQTT client class did not have the disconnect functionality, so I had to add that myself. Because all of the Sming MQTT Client class elements were private, I could not simply derive my class from theirs, I had to create a copy of the Sming class, KMKMqttClient, and add the disconnect functionality. It is a hack, but I now call the disconnect method before the OTA download, and it is very reliable.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.