retain online message

This commit is contained in:
Ronald Schaten 2016-02-24 09:52:58 +01:00
parent 1ce18124f0
commit 12c641a43d

View File

@ -154,7 +154,7 @@ void mqtt_reconnect() {
if (mqtt_client.connect(wifi_station_get_hostname(), topic("online"), MQTTQOS1, true, "0")) {
Serial.println("connected");
// once connected, publish an announcement...
mqtt_client.publish(topic("online"), "1");
mqtt_client.publish(topic("online"), "1", true);
// ... and resubscribe:
mqtt_client.subscribe("inTopic");
} else {