Tasmota/lib/PubSubClient-2.6.09
arendst 1538d30c96 v5.11.1c - Fixes and experimental Hass Discovery
5.11.1c
 * Make command color parameter input less strict to ease Hass
support
 * Add ColorTemperature to light status message
 * Change
PubSubClient.h define MQTT_MAX_PACKET_SIZE from 512 to 1000 for Hass
support
 * Make define MESSZ dependent on PubSubClient.h define
MQTT_MAX_PACKET_SIZE
 * Fix logging line length around 400 characters
 *
Change module name Wemos D1 mini into Generic (#1220)
 * Revert HTML
change from width=100% to style=width:100% supporting HTML5 (#1358)
 *
Add experimental (still Hass python exceptions) Home Assistant Discovery
for switch and light to be enabled by command SetOption19 1 (#1534)
 *
Updated French Translation (#1561)
 * Fix DS18B20 temperature JSON
decimal dot (#1561)
 * Add Spanish language file (#1589)
 * Update
Italian Language file (#1594)
 * Consolidate WIFI_MANAGER_SEC into
WIFI_CONFIG_SEC (#1616)
 * Fix Energy JSON message (#1621)
2018-01-18 16:19:28 +01:00
..
examples v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
src v5.11.1c - Fixes and experimental Hass Discovery 2018-01-18 16:19:28 +01:00
tests v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
.gitignore v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
.travis.yml v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
CHANGES.txt v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
LICENSE.txt v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
README.md v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
keywords.txt v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
library.json v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00
library.properties v5.9.1f - Update libraries and a fix 2017-11-19 18:02:03 +01:00

README.md

Arduino Client for MQTT

This library provides a client for doing simple publish/subscribe messaging with a server that supports MQTT.

Examples

The library comes with a number of example sketches. See File > Examples > PubSubClient within the Arduino application.

Full API documentation is available here: http://pubsubclient.knolleary.net

Limitations

  • It can only publish QoS 0 messages. It can subscribe at QoS 0 or QoS 1.
  • The maximum message size, including header, is 128 bytes by default. This is configurable via MQTT_MAX_PACKET_SIZE in PubSubClient.h.
  • The keepalive interval is set to 15 seconds by default. This is configurable via MQTT_KEEPALIVE in PubSubClient.h.
  • The client uses MQTT 3.1.1 by default. It can be changed to use MQTT 3.1 by changing value of MQTT_VERSION in PubSubClient.h.

Compatible Hardware

The library uses the Arduino Ethernet Client api for interacting with the underlying network hardware. This means it Just Works with a growing number of boards and shields, including:

  • Arduino Ethernet
  • Arduino Ethernet Shield
  • Arduino YUN use the included YunClient in place of EthernetClient, and be sure to do a Bridge.begin() first
  • Arduino WiFi Shield - if you want to send packets > 90 bytes with this shield, enable the MQTT_MAX_TRANSFER_SIZE define in PubSubClient.h.
  • Sparkfun WiFly Shield library
  • TI CC3000 WiFi - library
  • Intel Galileo/Edison
  • ESP8266

The library cannot currently be used with hardware based on the ENC28J60 chip such as the Nanode or the Nuelectronics Ethernet Shield. For those, there is an alternative library available.

License

This code is released under the MIT License.