       sprintf_P(svalue, PSTR("%s"), VERSION);
       mqtt_publish(stopic, svalue);
       sprintf_P(stopic, PSTR("%s/%s/FALLBACKTOPIC"), PUB_PREFIX, sysCfg.mqtt_topic);
-      sprintf_P(svalue, PSTR(MQTT_CLIENT_ID), ESP.getChipId());
+      sprintf_P(svalue, PSTR(MQTT_CLIENT_ID" MXPKSZ %d, KPALV %d"), ESP.getChipId(), MQTT_MAX_PACKET_SIZE, MQTT_KEEPALIVE);
       mqtt_publish(stopic, svalue);
     } else {
       DEBUG_MSG("APP MQTT connect failed, rc = %d retry in 5 seconds\n", mqttClient.state());

  Serial.printf("Project %s (Topic %s, Fallback "MQTT_CLIENT_ID", GroupTopic %s) Version %s (Boot %d, SDK %s)\n",
    PROJECT, sysCfg.mqtt_topic, ESP.getChipId(), sysCfg.mqtt_grptopic, VERSION, ESP.getBootVersion(), ESP.getSdkVersion());

  WIFI_Connect();

  mqttClient.setServer(sysCfg.mqtt_host, MQTT_PORT);

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266httpUpdate.h>

/*
 * Change the defined MQTT packet size and keepalive
 * to larger values, as recommended by Theo.
 *
 * Note that the PubSubClient library should be included
 * -after- these redefines, not before.
 */
#ifdef MQTT_MAX_PACKET_SIZE
	#undef MQTT_MAX_PACKET_SIZE
