 // Macros for debugging
 #ifdef DEBUG_TELNET
   #define     DEBUG_PRINT(x)    telnetClient.print(x)
+  #define     DEBUG_PRINT_WITH_FMT(x, fmt)    telnetClient.print(x, fmt)
   #define     DEBUG_PRINTLN(x)  telnetClient.println(x)
+  #define     DEBUG_PRINTLN_WITH_FMT(x, fmt)  telnetClient.println(x, fmt)
 #else
   #define     DEBUG_PRINT(x)    Serial.print(x)
+  #define     DEBUG_PRINT_WITH_FMT(x, fmt)    Serial.print(x, fmt)
   #define     DEBUG_PRINTLN(x)  Serial.println(x)
-#endif
-
-// Wi-Fi
-const char*   WIFI_SSID     = "Netgear";
-const char*   WIFI_PASSWORD = "0stem4dder";
+  #define     DEBUG_PRINTLN_WITH_FMT(x, fmt)  Serial.println(x, fmt)
+#endif
+
 #define HOST "ARILUX%s"
 char chipid[12];
+
+char          MQTT_CLIENT_ID[32];
 
 // MQTT topics
 char   ARILUX_MQTT_STATE_STATE_TOPIC[44];

#include <ArduinoOTA.h>
#include "Arilux.h"

#ifdef TLS
  // SHA1 fingerprint of the certificate
  // openssl x509 -fingerprint -in  <certificate>.crt
  const char* fingerprint = "A5 02 FF 13 99 9F 8B 39 8E F1 83 4F 11 23 65 0B 32 36 FC 07";
#endif

// in a terminal: telnet arilux.local
#ifdef DEBUG_TELNET
  WiFiServer  telnetServer(23);

        DEBUG_PRINTLN(F("INFO: IR_CODE_KEY_SMOOTH"));
        break;
      default:
        DEBUG_PRINT(F("ERROR: IR code not defined: "));
        DEBUG_PRINTLN_WITH_FMT(results.value, HEX);
        break;
    }
    irRecv.resume();
