Browse Source

Added MQTT debug info about will topic, QoS and retain flag

fastled
Xose Pérez 7 years ago
parent
commit
91847c5659
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      code/espurna/mqtt.ino

+ 8
- 0
code/espurna/mqtt.ino View File

@ -373,6 +373,10 @@ void mqttConnect() {
#endif // ASYNC_TCP_SSL_ENABLED #endif // ASYNC_TCP_SSL_ENABLED
DEBUG_MSG_P(PSTR("[MQTT] Will topic: %s\n"), _mqtt_will);
DEBUG_MSG_P(PSTR("[MQTT] QoS: %d\n"), MQTT_QOS);
DEBUG_MSG_P(PSTR("[MQTT] Retain flag: %d\n"), MQTT_RETAIN);
_mqtt.connect(); _mqtt.connect();
#else // not MQTT_USE_ASYNC #else // not MQTT_USE_ASYNC
@ -425,6 +429,10 @@ void mqttConnect() {
response = _mqtt.connect(getIdentifier().c_str(), _mqtt_will, MQTT_QOS, MQTT_RETAIN, "0"); response = _mqtt.connect(getIdentifier().c_str(), _mqtt_will, MQTT_QOS, MQTT_RETAIN, "0");
} }
DEBUG_MSG_P(PSTR("[MQTT] Will topic: %s\n"), _mqtt_will);
DEBUG_MSG_P(PSTR("[MQTT] QoS: %d\n"), MQTT_QOS);
DEBUG_MSG_P(PSTR("[MQTT] Retain flag: %d\n"), MQTT_RETAIN);
} }
if (response) { if (response) {


Loading…
Cancel
Save