mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
external sensors minor changes in display settings
This commit is contained in:
@@ -389,10 +389,14 @@ void MyESP::mqttUnsubscribe(const char * topic) {
|
||||
|
||||
// MQTT Publish
|
||||
void MyESP::mqttPublish(const char * topic, const char * payload) {
|
||||
// myDebug_P(PSTR("[MQTT] Sending pubish to %s with payload %s"), _mqttTopic(topic), payload); // for debugging
|
||||
mqttClient.publish(_mqttTopic(topic), _mqtt_qos, _mqtt_retain, payload);
|
||||
// myDebug_P(PSTR("[MQTT] Sending publish to %s with payload %s"), _mqttTopic(topic), payload); // for debugging
|
||||
uint16_t packet_id = mqttClient.publish(_mqttTopic(topic), _mqtt_qos, _mqtt_retain, payload);
|
||||
|
||||
_addMQTTLog(topic, payload, 1); // add to the log, using type of 1 for Publish
|
||||
if (packet_id) {
|
||||
_addMQTTLog(topic, payload, 1); // add to the log, using type of 1 for Publish
|
||||
} else {
|
||||
myDebug_P(PSTR("[MQTT] Error publishing to %s with payload %s"), _mqttTopic(topic), payload);
|
||||
}
|
||||
}
|
||||
|
||||
// MQTT onConnect - when a connect is established
|
||||
|
||||
Reference in New Issue
Block a user