Skip to content

Releases: Losant/losant-mqtt-arduino

v2.0.0

03 Mar 02:24
Compare
Choose a tag to compare

Switched from the PubSubClient library to the more maintained MQTT Client library which corrects default packet size, secure connection issues, and a couple Arduino board updates (e.g. ESP8266WiFi).

Default packet size is 256. To increase the size define MQTT_MAX_PACKET_SIZE in your application.

Breaking Changes:

  • Client state device.mqttClient.state() is no longer supported.
  • WiFiClientSecure now requires SSL validation, see the new ESP8266 example to be able to connect securely.
  • Constructing MQTT state JSON object is now in the ArduionJson version 6 form.

Old:

StaticJsonBuffer<200> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();

New:

StaticJsonDocument<200> doc;
JsonObject root = doc.to<JsonObject>();