arendst / Sonoff-MQTT-OTA

Provide ESP8266 based itead Sonoff with MQTT and OTA firmware - Now EOL
202 stars 47 forks source link

Add define for MQTT_MAX_PACKET_SIZE #14

Open tbnobody opened 7 years ago

tbnobody commented 7 years ago

Instead of editing the pubsubclient.h file you could just change the code from:

#ifdef USE_MQTT
  #include <PubSubClient.h>                 // MQTT
#endif  // USE_MQTT

to:

#ifdef USE_MQTT
  #define MQTT_MAX_PACKET_SIZE 400
  #include <PubSubClient.h>                 // MQTT
#endif  // USE_MQTT