diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index 0a66137..b199d6c 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -76,7 +76,7 @@ boolean reconnect() { #endif trc(F("connected to MQTT broker")); // Once connected, publish an announcement... - client.publish(will_Topic,Gateway_AnnouncementMsg); + client.publish(will_Topic,Gateway_AnnouncementMsg,will_Retain); //Subscribing to topic if (client.subscribe(subjectMQTTtoX) && client.subscribe(subjectMultiGTWRF)&& client.subscribe(subjectMultiGTWIR)) { trc(F("subscription OK to the subjects defined"));