 char   ARILUX_MQTT_COLOR_COMMAND_TOPIC[44];
 char   ARILUX_MQTT_WHITE_STATE_TOPIC[44];
 char   ARILUX_MQTT_WHITE_COMMAND_TOPIC[44];
-
-#define DEFARILUX_MQTT_STATE_STATE_TOPIC "%s/%s/state/state"
-#define DEFARILUX_MQTT_STATE_COMMAND_TOPIC  "%s/%s/state/set"
-#define DEFARILUX_MQTT_BRIGHTNESS_STATE_TOPIC "%s/%s/brightness/state"
-#define DEFARILUX_MQTT_BRIGHTNESS_COMMAND_TOPIC "%s/%s/brightness/set"
-#define DEFARILUX_MQTT_COLOR_STATE_TOPIC  "%s/%s/color/state"
-#define DEFARILUX_MQTT_COLOR_COMMAND_TOPIC  "%s/%s/color/set"
-#define DEFARILUX_MQTT_WHITE_STATE_TOPIC  "%s/%s/white/state"
-#define DEFARILUX_MQTT_WHITE_COMMAND_TOPIC  "%s/%s/white/set"
+char   ARILUX_MQTT_STATUS_TOPIC[44];
+
+#define DEFAULT_ARILUX_MQTT_STATE_STATE_TOPIC "%s/%s/state/state"
+#define DEFAULT_ARILUX_MQTT_STATE_COMMAND_TOPIC  "%s/%s/state/set"
+#define DEFAULT_ARILUX_MQTT_BRIGHTNESS_STATE_TOPIC "%s/%s/brightness/state"
+#define DEFAULT_ARILUX_MQTT_BRIGHTNESS_COMMAND_TOPIC "%s/%s/brightness/set"
+#define DEFAULT_ARILUX_MQTT_COLOR_STATE_TOPIC  "%s/%s/color/state"
+#define DEFAULT_ARILUX_MQTT_COLOR_COMMAND_TOPIC  "%s/%s/color/set"
+#define DEFAULT_ARILUX_MQTT_WHITE_STATE_TOPIC  "%s/%s/white/state"
+#define DEFAULT_ARILUX_MQTT_WHITE_COMMAND_TOPIC  "%s/%s/white/set"
+#define DEFAULT_ARILUX_MQTT_STATUS_TOPIC  "%s/%s/status"
 const char*   TOPICPING =  "ping";
 const char*   TOPICPONG = "pong";
 
 
 // MQTT payloads
-const char*   ARILUX_MQTT_STATE_WHITE015_PAYLOAD         = "4";
-const char*   ARILUX_MQTT_STATE_WHITE001_PAYLOAD         = "3";
 const char*   ARILUX_MQTT_STATE_WHITEFULLON_PAYLOAD         = "2";
 const char*   ARILUX_MQTT_STATE_ON_PAYLOAD          = "1";
 const char*   ARILUX_MQTT_STATE_OFF_PAYLOAD         = "0";
 
 // MQTT buffer
 char msgBuffer[32];
-
-// MQTT
-char          MQTT_CLIENT_ID[32];
-const char*   MQTT_SERVER_IP                        = "192.168.1.200";
-const int     MQTT_SERVER_PORT                      = 1883;
-const char*   MQTT_USER                             = "";
-const char*   MQTT_PASSWORD                         = "";
 
 volatile uint8_t cmd = ARILUX_CMD_NOT_DEFINED;
 

volatile unsigned long lastmqttreconnect = 0;
void connectMQTT(void) {
  if (!mqttClient.connected()) {
    if (lastmqttreconnect + 1000 < millis()) {  
      if (mqttClient.connect(MQTT_CLIENT_ID, MQTT_USER, MQTT_PASSWORD)) {
        DEBUG_PRINTLN(F("INFO: The client is successfully connected to the MQTT broker"));
      } else {
        DEBUG_PRINTLN(F("ERROR: The connection to the MQTT broker failed"));
        DEBUG_PRINT(F("Username: "));
        DEBUG_PRINTLN(MQTT_USER);
        DEBUG_PRINT(F("Password: "));
        DEBUG_PRINTLN(MQTT_PASSWORD);
        DEBUG_PRINT(F("Broker: "));
        DEBUG_PRINTLN(MQTT_SERVER_IP);
      }
  
      if (mqttClient.subscribe(ARILUX_MQTT_STATE_COMMAND_TOPIC)) {
        DEBUG_PRINT(F("INFO: Sending the MQTT subscribe succeeded. Topic: "));
        DEBUG_PRINTLN(ARILUX_MQTT_STATE_COMMAND_TOPIC);

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

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