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

OTA over MQTT #64

Closed
ionciubotaru opened this issue Oct 11, 2016 · 1 comment · May be fixed by #78
Closed

OTA over MQTT #64

ionciubotaru opened this issue Oct 11, 2016 · 1 comment · May be fixed by #78

Comments

@ionciubotaru
Copy link

I tried OTA using test.mosquitto.org
The update works fine except:

    Serial.println("Clearing retained message.");
    client.publish(MQTT::Publish(pub.topic(), "")
                   .set_retain());

Client doesn't publish anything, so ESP update again and again
I tried:

    Serial.println("Clearing retained message.");
    client.publish(MQTT::Publish(pub.topic(), "")
                   .set_retain(true));

but it doesn't work - nothing is published on mqtt server.

@THKDev
Copy link

THKDev commented Mar 18, 2017

Remove pub.payload_stream()->stop();
Do NOT stop the client connection because the (WiFi) Client hold in class Publish is NOT ref counted. It is only a pointer. Closing it will count ref to 0 and close the TCP connection.

@Imroy Imroy closed this as completed in 1ae36b4 Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants