hirotakaster / MQTT

MQTT for Photon, Spark Core
Other
217 stars 118 forks source link

ESP8266 #81

Open ggadalet opened 5 years ago

ggadalet commented 5 years ago

Would this library work for ESP8266 microcontroller ?

hirotakaster commented 5 years ago

@ggadalet use pubsubclient ( https://github.com/knolleary/pubsubclient )

ggadalet commented 5 years ago

Used the https://github.com/knolleary/pubsubclient and it's working now.

Be aware of this constant I had to change in PubSubClient.h to accomodate my json message in the payload to be sent.

// MQTT_MAX_PACKET_SIZE : Maximum packet size

ifndef MQTT_MAX_PACKET_SIZE

//#define MQTT_MAX_PACKET_SIZE 128

define MQTT_MAX_PACKET_SIZE 300

endif

thanks regards Giovanni