mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
MQTT start sent with retain flag disabled
This commit is contained in:
@@ -435,8 +435,9 @@ void MyESP::_mqttOnConnect() {
|
|||||||
mqttSubscribe(MQTT_TOPIC_RESTART);
|
mqttSubscribe(MQTT_TOPIC_RESTART);
|
||||||
|
|
||||||
// subscribe to a start message and send the first publish
|
// subscribe to a start message and send the first publish
|
||||||
|
// forcing retain to off since we only want to send this once
|
||||||
mqttSubscribe(MQTT_TOPIC_START);
|
mqttSubscribe(MQTT_TOPIC_START);
|
||||||
mqttPublish(MQTT_TOPIC_START, MQTT_TOPIC_START_PAYLOAD);
|
mqttPublish(MQTT_TOPIC_START, MQTT_TOPIC_START_PAYLOAD, false);
|
||||||
|
|
||||||
// send heartbeat if enabled
|
// send heartbeat if enabled
|
||||||
_heartbeatCheck(true);
|
_heartbeatCheck(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user