 char friendlyName[32];
 char configBuf[512];
 StaticJsonBuffer<512> HOME_ASSISTANT_MQTT_DISCOVERY_CONFIG;
-#define MQTT_MAX_PACKET_SIZE 768
 
 volatile uint8_t cmd = ARILUX_CMD_NOT_DEFINED;
 


  sprintf(chipid, "%08X", ESP.getChipId());
  sprintf(MQTT_CLIENT_ID, HOST, chipid);
  sprintf(friendlyName, "Arilux %s LED Controller %s", arilux.getColorString(), chipid);
  Serial.print("Hostname:");
  Serial.println(MQTT_CLIENT_ID);
  WiFi.hostname(MQTT_CLIENT_ID);

          root["brightness_command_topic"] = ARILUX_MQTT_BRIGHTNESS_COMMAND_TOPIC;
          root["rgb_state_topic"] = ARILUX_MQTT_COLOR_STATE_TOPIC;
          root["rgb_command_topic"] = ARILUX_MQTT_COLOR_COMMAND_TOPIC;
          root["payload_on"] = MQTT_STATE_ON_PAYLOAD;
          root["payload_off"] = MQTT_STATE_OFF_PAYLOAD;
          root.printTo(configBuf, sizeof(configBuf));
          publishToMQTT(HOME_ASSISTANT_MQTT_DISCOVERY_TOPIC, configBuf);
        #endif
        flash(true);
      } else {
