platform: arduino: mqtt: make config message persist
This commit is contained in:
parent
10bbcd6786
commit
439a456d1a
@ -83,7 +83,7 @@ MQTTTelemetry::handleEventOnline(const InputEvent& evt)
|
|||||||
char buf[1024];
|
char buf[1024];
|
||||||
serializeJson(configJson, buf, sizeof(buf));
|
serializeJson(configJson, buf, sizeof(buf));
|
||||||
Log.verbose("Publish %s %s", configTopic.c_str(), buf);
|
Log.verbose("Publish %s %s", configTopic.c_str(), buf);
|
||||||
m_mqtt.publish(configTopic.c_str(), buf);
|
m_mqtt.publish(configTopic.c_str(), buf, true);
|
||||||
m_mqtt.subscribe(m_cmdTopic);
|
m_mqtt.subscribe(m_cmdTopic);
|
||||||
} else {
|
} else {
|
||||||
Log.warning("Could not connect to MQTT");
|
Log.warning("Could not connect to MQTT");
|
||||||
|
Loading…
Reference in New Issue
Block a user